Skip to content

Commit 81de38b

Browse files
author
ci_volc_sdk_gen
committed
feat: auto generate for redis-Python-2020-12-07-online-1969-2025_12_22_20_42_28
1 parent 9799cdc commit 81de38b

13 files changed

+358
-39
lines changed

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"lasted": "4.0.44",
3-
"meta_commit": "0f9046deafb25b7a0ac9d00d0793ed887b451442"
2+
"lasted": "4.0.45",
3+
"meta_commit": "dd4ba3bbc550470fc1ee409c4c3fed086aed2a85"
44
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "volcengine-python-sdk"
3-
version = "4.0.44"
3+
version = "4.0.45"
44
authors = [
55
{name = "volc-engine", email = "[email protected]"},
66
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages # noqa: H301
44

55
NAME = "volcengine-python-sdk"
6-
VERSION = "4.0.44"
6+
VERSION = "4.0.45"
77
# To install the library, run the following
88
#
99
# python setup.py install

volcenginesdkcore/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
6464
self.default_headers[header_name] = header_value
6565
self.cookie = cookie
6666
# Set default User-Agent.
67-
self.user_agent = 'volcstack-python-sdk/4.0.44'
67+
self.user_agent = 'volcstack-python-sdk/4.0.45'
6868
self.client_side_validation = configuration.client_side_validation
6969

7070
self.interceptor_chain = InterceptorChain()

volcenginesdkcore/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def to_debug_report(self):
272272
"OS: {env}\n" \
273273
"Python Version: {pyversion}\n" \
274274
"Version of the API: 0.1.0\n" \
275-
"SDK Package Version: 4.0.44".\
275+
"SDK Package Version: 4.0.45".\
276276
format(env=sys.platform, pyversion=sys.version)
277277

278278
@property

volcenginesdkredis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@
153153
from volcenginesdkredis.models.instance_shard_for_describe_db_instance_shards_output import InstanceShardForDescribeDBInstanceShardsOutput
154154
from volcenginesdkredis.models.instance_spec_for_describe_db_instance_specs_output import InstanceSpecForDescribeDBInstanceSpecsOutput
155155
from volcenginesdkredis.models.instance_spec_for_describe_enterprise_db_instance_specs_output import InstanceSpecForDescribeEnterpriseDBInstanceSpecsOutput
156+
from volcenginesdkredis.models.interrupt_key_scan_job_request import InterruptKeyScanJobRequest
157+
from volcenginesdkredis.models.interrupt_key_scan_job_response import InterruptKeyScanJobResponse
156158
from volcenginesdkredis.models.job_list_for_describe_key_scan_jobs_output import JobListForDescribeKeyScanJobsOutput
157159
from volcenginesdkredis.models.list_db_account_request import ListDBAccountRequest
158160
from volcenginesdkredis.models.list_db_account_response import ListDBAccountResponse

volcenginesdkredis/api/redis_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5465,6 +5465,103 @@ def increase_db_instance_node_number_with_http_info(self, body, **kwargs): # no
54655465
_request_timeout=params.get('_request_timeout'),
54665466
collection_formats=collection_formats)
54675467

5468+
def interrupt_key_scan_job(self, body, **kwargs): # noqa: E501
5469+
"""interrupt_key_scan_job # noqa: E501
5470+
5471+
This method makes a synchronous HTTP request by default. To make an
5472+
asynchronous HTTP request, please pass async_req=True
5473+
>>> thread = api.interrupt_key_scan_job(body, async_req=True)
5474+
>>> result = thread.get()
5475+
5476+
:param async_req bool
5477+
:param InterruptKeyScanJobRequest body: (required)
5478+
:return: InterruptKeyScanJobResponse
5479+
If the method is called asynchronously,
5480+
returns the request thread.
5481+
"""
5482+
kwargs['_return_http_data_only'] = True
5483+
if kwargs.get('async_req'):
5484+
return self.interrupt_key_scan_job_with_http_info(body, **kwargs) # noqa: E501
5485+
else:
5486+
(data) = self.interrupt_key_scan_job_with_http_info(body, **kwargs) # noqa: E501
5487+
return data
5488+
5489+
def interrupt_key_scan_job_with_http_info(self, body, **kwargs): # noqa: E501
5490+
"""interrupt_key_scan_job # noqa: E501
5491+
5492+
This method makes a synchronous HTTP request by default. To make an
5493+
asynchronous HTTP request, please pass async_req=True
5494+
>>> thread = api.interrupt_key_scan_job_with_http_info(body, async_req=True)
5495+
>>> result = thread.get()
5496+
5497+
:param async_req bool
5498+
:param InterruptKeyScanJobRequest body: (required)
5499+
:return: InterruptKeyScanJobResponse
5500+
If the method is called asynchronously,
5501+
returns the request thread.
5502+
"""
5503+
5504+
all_params = ['body'] # noqa: E501
5505+
all_params.append('async_req')
5506+
all_params.append('_return_http_data_only')
5507+
all_params.append('_preload_content')
5508+
all_params.append('_request_timeout')
5509+
5510+
params = locals()
5511+
for key, val in six.iteritems(params['kwargs']):
5512+
if key not in all_params:
5513+
raise TypeError(
5514+
"Got an unexpected keyword argument '%s'"
5515+
" to method interrupt_key_scan_job" % key
5516+
)
5517+
params[key] = val
5518+
del params['kwargs']
5519+
# verify the required parameter 'body' is set
5520+
if self.api_client.client_side_validation and ('body' not in params or
5521+
params['body'] is None): # noqa: E501
5522+
raise ValueError("Missing the required parameter `body` when calling `interrupt_key_scan_job`") # noqa: E501
5523+
5524+
collection_formats = {}
5525+
5526+
path_params = {}
5527+
5528+
query_params = []
5529+
5530+
header_params = {}
5531+
5532+
form_params = []
5533+
local_var_files = {}
5534+
5535+
body_params = None
5536+
if 'body' in params:
5537+
body_params = params['body']
5538+
# HTTP header `Accept`
5539+
header_params['Accept'] = self.api_client.select_header_accept(
5540+
['application/json']) # noqa: E501
5541+
5542+
# HTTP header `Content-Type`
5543+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
5544+
['application/json']) # noqa: E501
5545+
5546+
# Authentication setting
5547+
auth_settings = ['volcengineSign'] # noqa: E501
5548+
5549+
return self.api_client.call_api(
5550+
'/InterruptKeyScanJob/2020-12-07/redis/post/application_json/', 'POST',
5551+
path_params,
5552+
query_params,
5553+
header_params,
5554+
body=body_params,
5555+
post_params=form_params,
5556+
files=local_var_files,
5557+
response_type='InterruptKeyScanJobResponse', # noqa: E501
5558+
auth_settings=auth_settings,
5559+
async_req=params.get('async_req'),
5560+
_return_http_data_only=params.get('_return_http_data_only'),
5561+
_preload_content=params.get('_preload_content', True),
5562+
_request_timeout=params.get('_request_timeout'),
5563+
collection_formats=collection_formats)
5564+
54685565
def list_db_account(self, body, **kwargs): # noqa: E501
54695566
"""list_db_account # noqa: E501
54705567

volcenginesdkredis/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
from volcenginesdkredis.models.instance_shard_for_describe_db_instance_shards_output import InstanceShardForDescribeDBInstanceShardsOutput
150150
from volcenginesdkredis.models.instance_spec_for_describe_db_instance_specs_output import InstanceSpecForDescribeDBInstanceSpecsOutput
151151
from volcenginesdkredis.models.instance_spec_for_describe_enterprise_db_instance_specs_output import InstanceSpecForDescribeEnterpriseDBInstanceSpecsOutput
152+
from volcenginesdkredis.models.interrupt_key_scan_job_request import InterruptKeyScanJobRequest
153+
from volcenginesdkredis.models.interrupt_key_scan_job_response import InterruptKeyScanJobResponse
152154
from volcenginesdkredis.models.job_list_for_describe_key_scan_jobs_output import JobListForDescribeKeyScanJobsOutput
153155
from volcenginesdkredis.models.list_db_account_request import ListDBAccountRequest
154156
from volcenginesdkredis.models.list_db_account_response import ListDBAccountResponse

volcenginesdkredis/models/instance_for_describe_db_instances_output.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class InstanceForDescribeDBInstancesOutput(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'blue_green_role': 'str',
3637
'capacity': 'CapacityForDescribeDBInstancesOutput',
3738
'charge_type': 'str',
3839
'create_time': 'str',
@@ -62,6 +63,7 @@ class InstanceForDescribeDBInstancesOutput(object):
6263
}
6364

6465
attribute_map = {
66+
'blue_green_role': 'BlueGreenRole',
6567
'capacity': 'Capacity',
6668
'charge_type': 'ChargeType',
6769
'create_time': 'CreateTime',
@@ -90,12 +92,13 @@ class InstanceForDescribeDBInstancesOutput(object):
9092
'zone_ids': 'ZoneIds'
9193
}
9294

93-
def __init__(self, capacity=None, charge_type=None, create_time=None, data_layout=None, deletion_protection=None, engine_version=None, expired_time=None, instance_class=None, instance_id=None, instance_name=None, multi_az=None, node_number=None, private_address=None, private_port=None, project_name=None, region_id=None, service_type=None, shard_capacity=None, shard_number=None, sharded_cluster=None, status=None, tags=None, vip=None, vipv6=None, vpc_id=None, zone_ids=None, _configuration=None): # noqa: E501
95+
def __init__(self, blue_green_role=None, capacity=None, charge_type=None, create_time=None, data_layout=None, deletion_protection=None, engine_version=None, expired_time=None, instance_class=None, instance_id=None, instance_name=None, multi_az=None, node_number=None, private_address=None, private_port=None, project_name=None, region_id=None, service_type=None, shard_capacity=None, shard_number=None, sharded_cluster=None, status=None, tags=None, vip=None, vipv6=None, vpc_id=None, zone_ids=None, _configuration=None): # noqa: E501
9496
"""InstanceForDescribeDBInstancesOutput - a model defined in Swagger""" # noqa: E501
9597
if _configuration is None:
9698
_configuration = Configuration()
9799
self._configuration = _configuration
98100

101+
self._blue_green_role = None
99102
self._capacity = None
100103
self._charge_type = None
101104
self._create_time = None
@@ -124,6 +127,8 @@ def __init__(self, capacity=None, charge_type=None, create_time=None, data_layou
124127
self._zone_ids = None
125128
self.discriminator = None
126129

130+
if blue_green_role is not None:
131+
self.blue_green_role = blue_green_role
127132
if capacity is not None:
128133
self.capacity = capacity
129134
if charge_type is not None:
@@ -177,6 +182,27 @@ def __init__(self, capacity=None, charge_type=None, create_time=None, data_layou
177182
if zone_ids is not None:
178183
self.zone_ids = zone_ids
179184

185+
@property
186+
def blue_green_role(self):
187+
"""Gets the blue_green_role of this InstanceForDescribeDBInstancesOutput. # noqa: E501
188+
189+
190+
:return: The blue_green_role of this InstanceForDescribeDBInstancesOutput. # noqa: E501
191+
:rtype: str
192+
"""
193+
return self._blue_green_role
194+
195+
@blue_green_role.setter
196+
def blue_green_role(self, blue_green_role):
197+
"""Sets the blue_green_role of this InstanceForDescribeDBInstancesOutput.
198+
199+
200+
:param blue_green_role: The blue_green_role of this InstanceForDescribeDBInstancesOutput. # noqa: E501
201+
:type: str
202+
"""
203+
204+
self._blue_green_role = blue_green_role
205+
180206
@property
181207
def capacity(self):
182208
"""Gets the capacity of this InstanceForDescribeDBInstancesOutput. # noqa: E501
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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 InterruptKeyScanJobRequest(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+
'job_id': 'str'
37+
}
38+
39+
attribute_map = {
40+
'job_id': 'JobId'
41+
}
42+
43+
def __init__(self, job_id=None, _configuration=None): # noqa: E501
44+
"""InterruptKeyScanJobRequest - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._job_id = None
50+
self.discriminator = None
51+
52+
self.job_id = job_id
53+
54+
@property
55+
def job_id(self):
56+
"""Gets the job_id of this InterruptKeyScanJobRequest. # noqa: E501
57+
58+
59+
:return: The job_id of this InterruptKeyScanJobRequest. # noqa: E501
60+
:rtype: str
61+
"""
62+
return self._job_id
63+
64+
@job_id.setter
65+
def job_id(self, job_id):
66+
"""Sets the job_id of this InterruptKeyScanJobRequest.
67+
68+
69+
:param job_id: The job_id of this InterruptKeyScanJobRequest. # noqa: E501
70+
:type: str
71+
"""
72+
if self._configuration.client_side_validation and job_id is None:
73+
raise ValueError("Invalid value for `job_id`, must not be `None`") # noqa: E501
74+
75+
self._job_id = job_id
76+
77+
def to_dict(self):
78+
"""Returns the model properties as a dict"""
79+
result = {}
80+
81+
for attr, _ in six.iteritems(self.swagger_types):
82+
value = getattr(self, attr)
83+
if isinstance(value, list):
84+
result[attr] = list(map(
85+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86+
value
87+
))
88+
elif hasattr(value, "to_dict"):
89+
result[attr] = value.to_dict()
90+
elif isinstance(value, dict):
91+
result[attr] = dict(map(
92+
lambda item: (item[0], item[1].to_dict())
93+
if hasattr(item[1], "to_dict") else item,
94+
value.items()
95+
))
96+
else:
97+
result[attr] = value
98+
if issubclass(InterruptKeyScanJobRequest, dict):
99+
for key, value in self.items():
100+
result[key] = value
101+
102+
return result
103+
104+
def to_str(self):
105+
"""Returns the string representation of the model"""
106+
return pprint.pformat(self.to_dict())
107+
108+
def __repr__(self):
109+
"""For `print` and `pprint`"""
110+
return self.to_str()
111+
112+
def __eq__(self, other):
113+
"""Returns true if both objects are equal"""
114+
if not isinstance(other, InterruptKeyScanJobRequest):
115+
return False
116+
117+
return self.to_dict() == other.to_dict()
118+
119+
def __ne__(self, other):
120+
"""Returns true if both objects are not equal"""
121+
if not isinstance(other, InterruptKeyScanJobRequest):
122+
return True
123+
124+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)