Skip to content

Commit 9ea8e1f

Browse files
committed
Merge branch 'zhangpeihua-kafka1012' into 'master'
feat: auto generate for zhangpeihua-kafka1012 [skipped] See merge request iaasng/volcengine-python-sdk!241
2 parents a324ec0 + 77dc453 commit 9ea8e1f

File tree

10 files changed

+403
-6
lines changed

10 files changed

+403
-6
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": "1.0.46",
3-
"meta_commit": "10381e98d548d4fc3f0d898e2a0452e2ab6aef5f"
2+
"lasted": "1.0.47",
3+
"meta_commit": "7f07e42dbf5909d019fd4ec6f7d8ba094f8ec7e3"
44
}

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 = "1.0.46"
6+
VERSION = "1.0.47"
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
@@ -67,7 +67,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
6767
self.default_headers[header_name] = header_value
6868
self.cookie = cookie
6969
# Set default User-Agent.
70-
self.user_agent = 'volcstack-python-sdk/1.0.46'
70+
self.user_agent = 'volcstack-python-sdk/1.0.47'
7171
self.client_side_validation = configuration.client_side_validation
7272

7373
def __del__(self):

volcenginesdkcore/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,5 @@ def to_debug_report(self):
221221
"OS: {env}\n"\
222222
"Python Version: {pyversion}\n"\
223223
"Version of the API: 0.1.0\n"\
224-
"SDK Package Version: 1.0.46".\
224+
"SDK Package Version: 1.0.47".\
225225
format(env=sys.platform, pyversion=sys.version)

volcenginesdkkafka/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
from volcenginesdkkafka.models.connection_info_for_describe_instance_detail_output import ConnectionInfoForDescribeInstanceDetailOutput
3333
from volcenginesdkkafka.models.consumed_partitions_info_for_describe_consumed_partitions_output import ConsumedPartitionsInfoForDescribeConsumedPartitionsOutput
3434
from volcenginesdkkafka.models.consumed_topics_info_for_describe_consumed_topics_output import ConsumedTopicsInfoForDescribeConsumedTopicsOutput
35+
from volcenginesdkkafka.models.create_group_request import CreateGroupRequest
36+
from volcenginesdkkafka.models.create_group_response import CreateGroupResponse
3537
from volcenginesdkkafka.models.create_instance_request import CreateInstanceRequest
3638
from volcenginesdkkafka.models.create_instance_response import CreateInstanceResponse
3739
from volcenginesdkkafka.models.create_public_address_request import CreatePublicAddressRequest

volcenginesdkkafka/api/kafka_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,103 @@ def add_tags_to_resource_with_http_info(self, body, **kwargs): # noqa: E501
130130
_request_timeout=params.get('_request_timeout'),
131131
collection_formats=collection_formats)
132132

133+
def create_group(self, body, **kwargs): # noqa: E501
134+
"""create_group # noqa: E501
135+
136+
This method makes a synchronous HTTP request by default. To make an
137+
asynchronous HTTP request, please pass async_req=True
138+
>>> thread = api.create_group(body, async_req=True)
139+
>>> result = thread.get()
140+
141+
:param async_req bool
142+
:param CreateGroupRequest body: (required)
143+
:return: CreateGroupResponse
144+
If the method is called asynchronously,
145+
returns the request thread.
146+
"""
147+
kwargs['_return_http_data_only'] = True
148+
if kwargs.get('async_req'):
149+
return self.create_group_with_http_info(body, **kwargs) # noqa: E501
150+
else:
151+
(data) = self.create_group_with_http_info(body, **kwargs) # noqa: E501
152+
return data
153+
154+
def create_group_with_http_info(self, body, **kwargs): # noqa: E501
155+
"""create_group # noqa: E501
156+
157+
This method makes a synchronous HTTP request by default. To make an
158+
asynchronous HTTP request, please pass async_req=True
159+
>>> thread = api.create_group_with_http_info(body, async_req=True)
160+
>>> result = thread.get()
161+
162+
:param async_req bool
163+
:param CreateGroupRequest body: (required)
164+
:return: CreateGroupResponse
165+
If the method is called asynchronously,
166+
returns the request thread.
167+
"""
168+
169+
all_params = ['body'] # noqa: E501
170+
all_params.append('async_req')
171+
all_params.append('_return_http_data_only')
172+
all_params.append('_preload_content')
173+
all_params.append('_request_timeout')
174+
175+
params = locals()
176+
for key, val in six.iteritems(params['kwargs']):
177+
if key not in all_params:
178+
raise TypeError(
179+
"Got an unexpected keyword argument '%s'"
180+
" to method create_group" % key
181+
)
182+
params[key] = val
183+
del params['kwargs']
184+
# verify the required parameter 'body' is set
185+
if self.api_client.client_side_validation and ('body' not in params or
186+
params['body'] is None): # noqa: E501
187+
raise ValueError("Missing the required parameter `body` when calling `create_group`") # noqa: E501
188+
189+
collection_formats = {}
190+
191+
path_params = {}
192+
193+
query_params = []
194+
195+
header_params = {}
196+
197+
form_params = []
198+
local_var_files = {}
199+
200+
body_params = None
201+
if 'body' in params:
202+
body_params = params['body']
203+
# HTTP header `Accept`
204+
header_params['Accept'] = self.api_client.select_header_accept(
205+
['application/json']) # noqa: E501
206+
207+
# HTTP header `Content-Type`
208+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
209+
['application/json']) # noqa: E501
210+
211+
# Authentication setting
212+
auth_settings = ['volcengineSign'] # noqa: E501
213+
214+
return self.api_client.call_api(
215+
'/CreateGroup/2022-05-01/kafka/post/application_json/', 'POST',
216+
path_params,
217+
query_params,
218+
header_params,
219+
body=body_params,
220+
post_params=form_params,
221+
files=local_var_files,
222+
response_type='CreateGroupResponse', # noqa: E501
223+
auth_settings=auth_settings,
224+
async_req=params.get('async_req'),
225+
_return_http_data_only=params.get('_return_http_data_only'),
226+
_preload_content=params.get('_preload_content', True),
227+
_request_timeout=params.get('_request_timeout'),
228+
collection_formats=collection_formats)
229+
133230
def create_instance(self, body, **kwargs): # noqa: E501
134231
"""create_instance # noqa: E501
135232

volcenginesdkkafka/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from volcenginesdkkafka.models.connection_info_for_describe_instance_detail_output import ConnectionInfoForDescribeInstanceDetailOutput
2929
from volcenginesdkkafka.models.consumed_partitions_info_for_describe_consumed_partitions_output import ConsumedPartitionsInfoForDescribeConsumedPartitionsOutput
3030
from volcenginesdkkafka.models.consumed_topics_info_for_describe_consumed_topics_output import ConsumedTopicsInfoForDescribeConsumedTopicsOutput
31+
from volcenginesdkkafka.models.create_group_request import CreateGroupRequest
32+
from volcenginesdkkafka.models.create_group_response import CreateGroupResponse
3133
from volcenginesdkkafka.models.create_instance_request import CreateInstanceRequest
3234
from volcenginesdkkafka.models.create_instance_response import CreateInstanceResponse
3335
from volcenginesdkkafka.models.create_public_address_request import CreatePublicAddressRequest
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# coding: utf-8
2+
3+
"""
4+
kafka
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 CreateGroupRequest(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+
'description': 'str',
37+
'group_id': 'str',
38+
'instance_id': 'str'
39+
}
40+
41+
attribute_map = {
42+
'description': 'Description',
43+
'group_id': 'GroupId',
44+
'instance_id': 'InstanceId'
45+
}
46+
47+
def __init__(self, description=None, group_id=None, instance_id=None, _configuration=None): # noqa: E501
48+
"""CreateGroupRequest - a model defined in Swagger""" # noqa: E501
49+
if _configuration is None:
50+
_configuration = Configuration()
51+
self._configuration = _configuration
52+
53+
self._description = None
54+
self._group_id = None
55+
self._instance_id = None
56+
self.discriminator = None
57+
58+
if description is not None:
59+
self.description = description
60+
if group_id is not None:
61+
self.group_id = group_id
62+
if instance_id is not None:
63+
self.instance_id = instance_id
64+
65+
@property
66+
def description(self):
67+
"""Gets the description of this CreateGroupRequest. # noqa: E501
68+
69+
70+
:return: The description of this CreateGroupRequest. # noqa: E501
71+
:rtype: str
72+
"""
73+
return self._description
74+
75+
@description.setter
76+
def description(self, description):
77+
"""Sets the description of this CreateGroupRequest.
78+
79+
80+
:param description: The description of this CreateGroupRequest. # noqa: E501
81+
:type: str
82+
"""
83+
84+
self._description = description
85+
86+
@property
87+
def group_id(self):
88+
"""Gets the group_id of this CreateGroupRequest. # noqa: E501
89+
90+
91+
:return: The group_id of this CreateGroupRequest. # noqa: E501
92+
:rtype: str
93+
"""
94+
return self._group_id
95+
96+
@group_id.setter
97+
def group_id(self, group_id):
98+
"""Sets the group_id of this CreateGroupRequest.
99+
100+
101+
:param group_id: The group_id of this CreateGroupRequest. # noqa: E501
102+
:type: str
103+
"""
104+
105+
self._group_id = group_id
106+
107+
@property
108+
def instance_id(self):
109+
"""Gets the instance_id of this CreateGroupRequest. # noqa: E501
110+
111+
112+
:return: The instance_id of this CreateGroupRequest. # noqa: E501
113+
:rtype: str
114+
"""
115+
return self._instance_id
116+
117+
@instance_id.setter
118+
def instance_id(self, instance_id):
119+
"""Sets the instance_id of this CreateGroupRequest.
120+
121+
122+
:param instance_id: The instance_id of this CreateGroupRequest. # noqa: E501
123+
:type: str
124+
"""
125+
126+
self._instance_id = instance_id
127+
128+
def to_dict(self):
129+
"""Returns the model properties as a dict"""
130+
result = {}
131+
132+
for attr, _ in six.iteritems(self.swagger_types):
133+
value = getattr(self, attr)
134+
if isinstance(value, list):
135+
result[attr] = list(map(
136+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
137+
value
138+
))
139+
elif hasattr(value, "to_dict"):
140+
result[attr] = value.to_dict()
141+
elif isinstance(value, dict):
142+
result[attr] = dict(map(
143+
lambda item: (item[0], item[1].to_dict())
144+
if hasattr(item[1], "to_dict") else item,
145+
value.items()
146+
))
147+
else:
148+
result[attr] = value
149+
if issubclass(CreateGroupRequest, dict):
150+
for key, value in self.items():
151+
result[key] = value
152+
153+
return result
154+
155+
def to_str(self):
156+
"""Returns the string representation of the model"""
157+
return pprint.pformat(self.to_dict())
158+
159+
def __repr__(self):
160+
"""For `print` and `pprint`"""
161+
return self.to_str()
162+
163+
def __eq__(self, other):
164+
"""Returns true if both objects are equal"""
165+
if not isinstance(other, CreateGroupRequest):
166+
return False
167+
168+
return self.to_dict() == other.to_dict()
169+
170+
def __ne__(self, other):
171+
"""Returns true if both objects are not equal"""
172+
if not isinstance(other, CreateGroupRequest):
173+
return True
174+
175+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)