Skip to content

Commit 3ef6b37

Browse files
author
BitsAdmin
committed
Merge branch 'feat/ark/e2e' into 'integration_2024-10-10_164644111375'
feat: [development task] ark-runtime-manual-Python (801294) See merge request iaasng/volcengine-python-sdk!396
2 parents 63777f9 + d3077b6 commit 3ef6b37

File tree

11 files changed

+830
-14
lines changed

11 files changed

+830
-14
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"httpx>=0.23.0, <1",
3030
"anyio>=3.5.0, <5",
3131
"cached-property; python_version < '3.8'",
32+
"cryptography>=38.0.4, <39.0.0"
3233
]
3334
},
3435
)

volcenginesdkark/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
# import models into sdk package
2222
from volcenginesdkark.models.get_api_key_request import GetApiKeyRequest
2323
from volcenginesdkark.models.get_api_key_response import GetApiKeyResponse
24+
from volcenginesdkark.models.get_endpoint_certificate_request import GetEndpointCertificateRequest
25+
from volcenginesdkark.models.get_endpoint_certificate_response import GetEndpointCertificateResponse

volcenginesdkark/api/ark_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,100 @@ def get_api_key_with_http_info(self, body, **kwargs): # noqa: E501
129129
_preload_content=params.get('_preload_content', True),
130130
_request_timeout=params.get('_request_timeout'),
131131
collection_formats=collection_formats)
132+
133+
def get_endpoint_certificate(self, body, **kwargs): # noqa: E501
134+
"""get_endpoint_certificate # 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.get_endpoint_certificate(body, async_req=True)
139+
>>> result = thread.get()
140+
141+
:param async_req bool
142+
:param GetEndpointCertificateRequest body: (required)
143+
:return: GetEndpointCertificateResponse
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.get_endpoint_certificate_with_http_info(body, **kwargs) # noqa: E501
150+
else:
151+
(data) = self.get_endpoint_certificate_with_http_info(body, **kwargs) # noqa: E501
152+
return data
153+
154+
def get_endpoint_certificate_with_http_info(self, body, **kwargs): # noqa: E501
155+
"""get_endpoint_certificate # 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.get_endpoint_certificate_with_http_info(body, async_req=True)
160+
>>> result = thread.get()
161+
162+
:param async_req bool
163+
:param GetEndpointCertificateRequest body: (required)
164+
:return: GetEndpointCertificateResponse
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 get_endpoint_certificate" % 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 `get_endpoint_certificate`") # 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+
'/GetEndpointCertificate/2024-01-01/ark/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='GetEndpointCertificateResponse', # 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)

volcenginesdkark/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
# import models into model package
1818
from volcenginesdkark.models.get_api_key_request import GetApiKeyRequest
1919
from volcenginesdkark.models.get_api_key_response import GetApiKeyResponse
20+
from volcenginesdkark.models.get_endpoint_certificate_request import GetEndpointCertificateRequest
21+
from volcenginesdkark.models.get_endpoint_certificate_response import GetEndpointCertificateResponse
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+
ark
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 GetEndpointCertificateRequest(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+
'id': 'str'
37+
}
38+
39+
attribute_map = {
40+
'id': 'Id'
41+
}
42+
43+
def __init__(self, id=None, _configuration=None): # noqa: E501
44+
"""GetEndpointCertificateRequest - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._id = None
50+
self.discriminator = None
51+
52+
self.id = id
53+
54+
@property
55+
def id(self):
56+
"""Gets the id of this GetEndpointCertificateRequest. # noqa: E501
57+
58+
59+
:return: The id of this GetEndpointCertificateRequest. # noqa: E501
60+
:rtype: str
61+
"""
62+
return self._id
63+
64+
@id.setter
65+
def id(self, id):
66+
"""Sets the id of this GetEndpointCertificateRequest.
67+
68+
69+
:param id: The id of this GetEndpointCertificateRequest. # noqa: E501
70+
:type: str
71+
"""
72+
if self._configuration.client_side_validation and id is None:
73+
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
74+
75+
self._id = 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(GetEndpointCertificateRequest, 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, GetEndpointCertificateRequest):
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, GetEndpointCertificateRequest):
122+
return True
123+
124+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)