Skip to content

Commit 5614339

Browse files
author
BitsAdmin
committed
Merge 'tis-Python-2024-07-31-online-2284-2026_02_25_16_10_47' into 'integration_2026-02-26_1118030915074'
feat: [development task] tis-2284-Python (2130127) See merge request: !1061
2 parents 7608bb0 + 19ee686 commit 5614339

7 files changed

Lines changed: 756 additions & 0 deletions

volcenginesdktis/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
from volcenginesdktis.models.category_for_get_speaker_list_output import CategoryForGetSpeakerListOutput
2828
from volcenginesdktis.models.clear_device_long_memory_request import ClearDeviceLongMemoryRequest
2929
from volcenginesdktis.models.clear_device_long_memory_response import ClearDeviceLongMemoryResponse
30+
from volcenginesdktis.models.create_device_without_approval_request import CreateDeviceWithoutApprovalRequest
31+
from volcenginesdktis.models.create_device_without_approval_response import CreateDeviceWithoutApprovalResponse
3032
from volcenginesdktis.models.device_info_list_for_get_quota_info_output import DeviceInfoListForGetQuotaInfoOutput
33+
from volcenginesdktis.models.device_list_for_create_device_without_approval_input import DeviceListForCreateDeviceWithoutApprovalInput
34+
from volcenginesdktis.models.fail_device_list_for_create_device_without_approval_output import FailDeviceListForCreateDeviceWithoutApprovalOutput
3135
from volcenginesdktis.models.get_agent_list_request import GetAgentListRequest
3236
from volcenginesdktis.models.get_agent_list_response import GetAgentListResponse
3337
from volcenginesdktis.models.get_device_bind_tc_order_id_request import GetDeviceBindTcOrderIDRequest

volcenginesdktis/api/tis_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,103 @@ def clear_device_long_memory_with_http_info(self, body, **kwargs): # noqa: E501
324324
_request_timeout=params.get('_request_timeout'),
325325
collection_formats=collection_formats)
326326

327+
def create_device_without_approval(self, body, **kwargs): # noqa: E501
328+
"""create_device_without_approval # noqa: E501
329+
330+
This method makes a synchronous HTTP request by default. To make an
331+
asynchronous HTTP request, please pass async_req=True
332+
>>> thread = api.create_device_without_approval(body, async_req=True)
333+
>>> result = thread.get()
334+
335+
:param async_req bool
336+
:param CreateDeviceWithoutApprovalRequest body: (required)
337+
:return: CreateDeviceWithoutApprovalResponse
338+
If the method is called asynchronously,
339+
returns the request thread.
340+
"""
341+
kwargs['_return_http_data_only'] = True
342+
if kwargs.get('async_req'):
343+
return self.create_device_without_approval_with_http_info(body, **kwargs) # noqa: E501
344+
else:
345+
(data) = self.create_device_without_approval_with_http_info(body, **kwargs) # noqa: E501
346+
return data
347+
348+
def create_device_without_approval_with_http_info(self, body, **kwargs): # noqa: E501
349+
"""create_device_without_approval # noqa: E501
350+
351+
This method makes a synchronous HTTP request by default. To make an
352+
asynchronous HTTP request, please pass async_req=True
353+
>>> thread = api.create_device_without_approval_with_http_info(body, async_req=True)
354+
>>> result = thread.get()
355+
356+
:param async_req bool
357+
:param CreateDeviceWithoutApprovalRequest body: (required)
358+
:return: CreateDeviceWithoutApprovalResponse
359+
If the method is called asynchronously,
360+
returns the request thread.
361+
"""
362+
363+
all_params = ['body'] # noqa: E501
364+
all_params.append('async_req')
365+
all_params.append('_return_http_data_only')
366+
all_params.append('_preload_content')
367+
all_params.append('_request_timeout')
368+
369+
params = locals()
370+
for key, val in six.iteritems(params['kwargs']):
371+
if key not in all_params:
372+
raise TypeError(
373+
"Got an unexpected keyword argument '%s'"
374+
" to method create_device_without_approval" % key
375+
)
376+
params[key] = val
377+
del params['kwargs']
378+
# verify the required parameter 'body' is set
379+
if self.api_client.client_side_validation and ('body' not in params or
380+
params['body'] is None): # noqa: E501
381+
raise ValueError("Missing the required parameter `body` when calling `create_device_without_approval`") # noqa: E501
382+
383+
collection_formats = {}
384+
385+
path_params = {}
386+
387+
query_params = []
388+
389+
header_params = {}
390+
391+
form_params = []
392+
local_var_files = {}
393+
394+
body_params = None
395+
if 'body' in params:
396+
body_params = params['body']
397+
# HTTP header `Accept`
398+
header_params['Accept'] = self.api_client.select_header_accept(
399+
['application/json']) # noqa: E501
400+
401+
# HTTP header `Content-Type`
402+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
403+
['application/json']) # noqa: E501
404+
405+
# Authentication setting
406+
auth_settings = ['volcengineSign'] # noqa: E501
407+
408+
return self.api_client.call_api(
409+
'/CreateDeviceWithoutApproval/2024-07-31/tis/post/application_json/', 'POST',
410+
path_params,
411+
query_params,
412+
header_params,
413+
body=body_params,
414+
post_params=form_params,
415+
files=local_var_files,
416+
response_type='CreateDeviceWithoutApprovalResponse', # noqa: E501
417+
auth_settings=auth_settings,
418+
async_req=params.get('async_req'),
419+
_return_http_data_only=params.get('_return_http_data_only'),
420+
_preload_content=params.get('_preload_content', True),
421+
_request_timeout=params.get('_request_timeout'),
422+
collection_formats=collection_formats)
423+
327424
def get_agent_list(self, body, **kwargs): # noqa: E501
328425
"""get_agent_list # noqa: E501
329426

volcenginesdktis/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
from volcenginesdktis.models.category_for_get_speaker_list_output import CategoryForGetSpeakerListOutput
2424
from volcenginesdktis.models.clear_device_long_memory_request import ClearDeviceLongMemoryRequest
2525
from volcenginesdktis.models.clear_device_long_memory_response import ClearDeviceLongMemoryResponse
26+
from volcenginesdktis.models.create_device_without_approval_request import CreateDeviceWithoutApprovalRequest
27+
from volcenginesdktis.models.create_device_without_approval_response import CreateDeviceWithoutApprovalResponse
2628
from volcenginesdktis.models.device_info_list_for_get_quota_info_output import DeviceInfoListForGetQuotaInfoOutput
29+
from volcenginesdktis.models.device_list_for_create_device_without_approval_input import DeviceListForCreateDeviceWithoutApprovalInput
30+
from volcenginesdktis.models.fail_device_list_for_create_device_without_approval_output import FailDeviceListForCreateDeviceWithoutApprovalOutput
2731
from volcenginesdktis.models.get_agent_list_request import GetAgentListRequest
2832
from volcenginesdktis.models.get_agent_list_response import GetAgentListResponse
2933
from volcenginesdktis.models.get_device_bind_tc_order_id_request import GetDeviceBindTcOrderIDRequest
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# coding: utf-8
2+
3+
"""
4+
tis
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 CreateDeviceWithoutApprovalRequest(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+
'device_list': 'list[DeviceListForCreateDeviceWithoutApprovalInput]',
37+
'product_key': 'str',
38+
'project_id': 'str',
39+
'tc_id': 'str'
40+
}
41+
42+
attribute_map = {
43+
'device_list': 'DeviceList',
44+
'product_key': 'ProductKey',
45+
'project_id': 'ProjectId',
46+
'tc_id': 'TcId'
47+
}
48+
49+
def __init__(self, device_list=None, product_key=None, project_id=None, tc_id=None, _configuration=None): # noqa: E501
50+
"""CreateDeviceWithoutApprovalRequest - a model defined in Swagger""" # noqa: E501
51+
if _configuration is None:
52+
_configuration = Configuration()
53+
self._configuration = _configuration
54+
55+
self._device_list = None
56+
self._product_key = None
57+
self._project_id = None
58+
self._tc_id = None
59+
self.discriminator = None
60+
61+
if device_list is not None:
62+
self.device_list = device_list
63+
self.product_key = product_key
64+
self.project_id = project_id
65+
self.tc_id = tc_id
66+
67+
@property
68+
def device_list(self):
69+
"""Gets the device_list of this CreateDeviceWithoutApprovalRequest. # noqa: E501
70+
71+
72+
:return: The device_list of this CreateDeviceWithoutApprovalRequest. # noqa: E501
73+
:rtype: list[DeviceListForCreateDeviceWithoutApprovalInput]
74+
"""
75+
return self._device_list
76+
77+
@device_list.setter
78+
def device_list(self, device_list):
79+
"""Sets the device_list of this CreateDeviceWithoutApprovalRequest.
80+
81+
82+
:param device_list: The device_list of this CreateDeviceWithoutApprovalRequest. # noqa: E501
83+
:type: list[DeviceListForCreateDeviceWithoutApprovalInput]
84+
"""
85+
86+
self._device_list = device_list
87+
88+
@property
89+
def product_key(self):
90+
"""Gets the product_key of this CreateDeviceWithoutApprovalRequest. # noqa: E501
91+
92+
93+
:return: The product_key of this CreateDeviceWithoutApprovalRequest. # noqa: E501
94+
:rtype: str
95+
"""
96+
return self._product_key
97+
98+
@product_key.setter
99+
def product_key(self, product_key):
100+
"""Sets the product_key of this CreateDeviceWithoutApprovalRequest.
101+
102+
103+
:param product_key: The product_key of this CreateDeviceWithoutApprovalRequest. # noqa: E501
104+
:type: str
105+
"""
106+
if self._configuration.client_side_validation and product_key is None:
107+
raise ValueError("Invalid value for `product_key`, must not be `None`") # noqa: E501
108+
109+
self._product_key = product_key
110+
111+
@property
112+
def project_id(self):
113+
"""Gets the project_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
114+
115+
116+
:return: The project_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
117+
:rtype: str
118+
"""
119+
return self._project_id
120+
121+
@project_id.setter
122+
def project_id(self, project_id):
123+
"""Sets the project_id of this CreateDeviceWithoutApprovalRequest.
124+
125+
126+
:param project_id: The project_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
127+
:type: str
128+
"""
129+
if self._configuration.client_side_validation and project_id is None:
130+
raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
131+
132+
self._project_id = project_id
133+
134+
@property
135+
def tc_id(self):
136+
"""Gets the tc_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
137+
138+
139+
:return: The tc_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
140+
:rtype: str
141+
"""
142+
return self._tc_id
143+
144+
@tc_id.setter
145+
def tc_id(self, tc_id):
146+
"""Sets the tc_id of this CreateDeviceWithoutApprovalRequest.
147+
148+
149+
:param tc_id: The tc_id of this CreateDeviceWithoutApprovalRequest. # noqa: E501
150+
:type: str
151+
"""
152+
if self._configuration.client_side_validation and tc_id is None:
153+
raise ValueError("Invalid value for `tc_id`, must not be `None`") # noqa: E501
154+
155+
self._tc_id = tc_id
156+
157+
def to_dict(self):
158+
"""Returns the model properties as a dict"""
159+
result = {}
160+
161+
for attr, _ in six.iteritems(self.swagger_types):
162+
value = getattr(self, attr)
163+
if isinstance(value, list):
164+
result[attr] = list(map(
165+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
166+
value
167+
))
168+
elif hasattr(value, "to_dict"):
169+
result[attr] = value.to_dict()
170+
elif isinstance(value, dict):
171+
result[attr] = dict(map(
172+
lambda item: (item[0], item[1].to_dict())
173+
if hasattr(item[1], "to_dict") else item,
174+
value.items()
175+
))
176+
else:
177+
result[attr] = value
178+
if issubclass(CreateDeviceWithoutApprovalRequest, dict):
179+
for key, value in self.items():
180+
result[key] = value
181+
182+
return result
183+
184+
def to_str(self):
185+
"""Returns the string representation of the model"""
186+
return pprint.pformat(self.to_dict())
187+
188+
def __repr__(self):
189+
"""For `print` and `pprint`"""
190+
return self.to_str()
191+
192+
def __eq__(self, other):
193+
"""Returns true if both objects are equal"""
194+
if not isinstance(other, CreateDeviceWithoutApprovalRequest):
195+
return False
196+
197+
return self.to_dict() == other.to_dict()
198+
199+
def __ne__(self, other):
200+
"""Returns true if both objects are not equal"""
201+
if not isinstance(other, CreateDeviceWithoutApprovalRequest):
202+
return True
203+
204+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)