Skip to content

Commit afdd9e6

Browse files
author
BitsAdmin
committed
Merge branch 'ark-Python-2024-01-01-online-987-2025_02_21_16_08_12' into 'integration_2025-02-27_769114010626'
feat: [development task] ark-987-Python (1042917) See merge request iaasng/volcengine-python-sdk!517
2 parents 961411c + ee1eac6 commit afdd9e6

File tree

5 files changed

+504
-0
lines changed

5 files changed

+504
-0
lines changed

volcenginesdkark/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
from volcenginesdkark.models.foundation_model_for_list_model_customization_jobs_output import FoundationModelForListModelCustomizationJobsOutput
4949
from volcenginesdkark.models.get_api_key_request import GetApiKeyRequest
5050
from volcenginesdkark.models.get_api_key_response import GetApiKeyResponse
51+
from volcenginesdkark.models.get_endpoint_certificate_request import GetEndpointCertificateRequest
52+
from volcenginesdkark.models.get_endpoint_certificate_response import GetEndpointCertificateResponse
5153
from volcenginesdkark.models.get_endpoint_request import GetEndpointRequest
5254
from volcenginesdkark.models.get_endpoint_response import GetEndpointResponse
5355
from volcenginesdkark.models.get_model_customization_job_request import GetModelCustomizationJobRequest

volcenginesdkark/api/ark_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,103 @@ def get_endpoint_with_http_info(self, body, **kwargs): # noqa: E501
615615
_request_timeout=params.get('_request_timeout'),
616616
collection_formats=collection_formats)
617617

618+
def get_endpoint_certificate(self, body, **kwargs): # noqa: E501
619+
"""get_endpoint_certificate # noqa: E501
620+
621+
This method makes a synchronous HTTP request by default. To make an
622+
asynchronous HTTP request, please pass async_req=True
623+
>>> thread = api.get_endpoint_certificate(body, async_req=True)
624+
>>> result = thread.get()
625+
626+
:param async_req bool
627+
:param GetEndpointCertificateRequest body: (required)
628+
:return: GetEndpointCertificateResponse
629+
If the method is called asynchronously,
630+
returns the request thread.
631+
"""
632+
kwargs['_return_http_data_only'] = True
633+
if kwargs.get('async_req'):
634+
return self.get_endpoint_certificate_with_http_info(body, **kwargs) # noqa: E501
635+
else:
636+
(data) = self.get_endpoint_certificate_with_http_info(body, **kwargs) # noqa: E501
637+
return data
638+
639+
def get_endpoint_certificate_with_http_info(self, body, **kwargs): # noqa: E501
640+
"""get_endpoint_certificate # noqa: E501
641+
642+
This method makes a synchronous HTTP request by default. To make an
643+
asynchronous HTTP request, please pass async_req=True
644+
>>> thread = api.get_endpoint_certificate_with_http_info(body, async_req=True)
645+
>>> result = thread.get()
646+
647+
:param async_req bool
648+
:param GetEndpointCertificateRequest body: (required)
649+
:return: GetEndpointCertificateResponse
650+
If the method is called asynchronously,
651+
returns the request thread.
652+
"""
653+
654+
all_params = ['body'] # noqa: E501
655+
all_params.append('async_req')
656+
all_params.append('_return_http_data_only')
657+
all_params.append('_preload_content')
658+
all_params.append('_request_timeout')
659+
660+
params = locals()
661+
for key, val in six.iteritems(params['kwargs']):
662+
if key not in all_params:
663+
raise TypeError(
664+
"Got an unexpected keyword argument '%s'"
665+
" to method get_endpoint_certificate" % key
666+
)
667+
params[key] = val
668+
del params['kwargs']
669+
# verify the required parameter 'body' is set
670+
if self.api_client.client_side_validation and ('body' not in params or
671+
params['body'] is None): # noqa: E501
672+
raise ValueError("Missing the required parameter `body` when calling `get_endpoint_certificate`") # noqa: E501
673+
674+
collection_formats = {}
675+
676+
path_params = {}
677+
678+
query_params = []
679+
680+
header_params = {}
681+
682+
form_params = []
683+
local_var_files = {}
684+
685+
body_params = None
686+
if 'body' in params:
687+
body_params = params['body']
688+
# HTTP header `Accept`
689+
header_params['Accept'] = self.api_client.select_header_accept(
690+
['application/json']) # noqa: E501
691+
692+
# HTTP header `Content-Type`
693+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
694+
['application/json']) # noqa: E501
695+
696+
# Authentication setting
697+
auth_settings = ['volcengineSign'] # noqa: E501
698+
699+
return self.api_client.call_api(
700+
'/GetEndpointCertificate/2024-01-01/ark/post/application_json/', 'POST',
701+
path_params,
702+
query_params,
703+
header_params,
704+
body=body_params,
705+
post_params=form_params,
706+
files=local_var_files,
707+
response_type='GetEndpointCertificateResponse', # noqa: E501
708+
auth_settings=auth_settings,
709+
async_req=params.get('async_req'),
710+
_return_http_data_only=params.get('_return_http_data_only'),
711+
_preload_content=params.get('_preload_content', True),
712+
_request_timeout=params.get('_request_timeout'),
713+
collection_formats=collection_formats)
714+
618715
def get_model_customization_job(self, body, **kwargs): # noqa: E501
619716
"""get_model_customization_job # noqa: E501
620717

volcenginesdkark/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
from volcenginesdkark.models.foundation_model_for_list_model_customization_jobs_output import FoundationModelForListModelCustomizationJobsOutput
4545
from volcenginesdkark.models.get_api_key_request import GetApiKeyRequest
4646
from volcenginesdkark.models.get_api_key_response import GetApiKeyResponse
47+
from volcenginesdkark.models.get_endpoint_certificate_request import GetEndpointCertificateRequest
48+
from volcenginesdkark.models.get_endpoint_certificate_response import GetEndpointCertificateResponse
4749
from volcenginesdkark.models.get_endpoint_request import GetEndpointRequest
4850
from volcenginesdkark.models.get_endpoint_response import GetEndpointResponse
4951
from volcenginesdkark.models.get_model_customization_job_request import GetModelCustomizationJobRequest
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)