Skip to content

Commit 1947772

Browse files
author
BitsAdmin
committed
Merge branch 'ml_platform-Python-2024-07-01-online-1849-2025_11_19_16_45_57' into 'integration_2025-11-20_1085328386050'
feat: [development task] ml_platform-1849-Python (1853088) See merge request iaasng/volcengine-python-sdk!928
2 parents 840e622 + 91c20c8 commit 1947772

File tree

168 files changed

+16790
-7533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+16790
-7533
lines changed

volcenginesdkmlplatform20240701/__init__.py

Lines changed: 88 additions & 26 deletions
Large diffs are not rendered by default.

volcenginesdkmlplatform20240701/api/ml_platform20240701_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,103 @@ def get_instance_type_with_http_info(self, body, **kwargs): # noqa: E501
18761876
_request_timeout=params.get('_request_timeout'),
18771877
collection_formats=collection_formats)
18781878

1879+
def get_job(self, body, **kwargs): # noqa: E501
1880+
"""get_job # noqa: E501
1881+
1882+
This method makes a synchronous HTTP request by default. To make an
1883+
asynchronous HTTP request, please pass async_req=True
1884+
>>> thread = api.get_job(body, async_req=True)
1885+
>>> result = thread.get()
1886+
1887+
:param async_req bool
1888+
:param GetJobRequest body: (required)
1889+
:return: GetJobResponse
1890+
If the method is called asynchronously,
1891+
returns the request thread.
1892+
"""
1893+
kwargs['_return_http_data_only'] = True
1894+
if kwargs.get('async_req'):
1895+
return self.get_job_with_http_info(body, **kwargs) # noqa: E501
1896+
else:
1897+
(data) = self.get_job_with_http_info(body, **kwargs) # noqa: E501
1898+
return data
1899+
1900+
def get_job_with_http_info(self, body, **kwargs): # noqa: E501
1901+
"""get_job # noqa: E501
1902+
1903+
This method makes a synchronous HTTP request by default. To make an
1904+
asynchronous HTTP request, please pass async_req=True
1905+
>>> thread = api.get_job_with_http_info(body, async_req=True)
1906+
>>> result = thread.get()
1907+
1908+
:param async_req bool
1909+
:param GetJobRequest body: (required)
1910+
:return: GetJobResponse
1911+
If the method is called asynchronously,
1912+
returns the request thread.
1913+
"""
1914+
1915+
all_params = ['body'] # noqa: E501
1916+
all_params.append('async_req')
1917+
all_params.append('_return_http_data_only')
1918+
all_params.append('_preload_content')
1919+
all_params.append('_request_timeout')
1920+
1921+
params = locals()
1922+
for key, val in six.iteritems(params['kwargs']):
1923+
if key not in all_params:
1924+
raise TypeError(
1925+
"Got an unexpected keyword argument '%s'"
1926+
" to method get_job" % key
1927+
)
1928+
params[key] = val
1929+
del params['kwargs']
1930+
# verify the required parameter 'body' is set
1931+
if self.api_client.client_side_validation and ('body' not in params or
1932+
params['body'] is None): # noqa: E501
1933+
raise ValueError("Missing the required parameter `body` when calling `get_job`") # noqa: E501
1934+
1935+
collection_formats = {}
1936+
1937+
path_params = {}
1938+
1939+
query_params = []
1940+
1941+
header_params = {}
1942+
1943+
form_params = []
1944+
local_var_files = {}
1945+
1946+
body_params = None
1947+
if 'body' in params:
1948+
body_params = params['body']
1949+
# HTTP header `Accept`
1950+
header_params['Accept'] = self.api_client.select_header_accept(
1951+
['application/json']) # noqa: E501
1952+
1953+
# HTTP header `Content-Type`
1954+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1955+
['application/json']) # noqa: E501
1956+
1957+
# Authentication setting
1958+
auth_settings = ['volcengineSign'] # noqa: E501
1959+
1960+
return self.api_client.call_api(
1961+
'/GetJob/2024-07-01/ml_platform/post/application_json/', 'POST',
1962+
path_params,
1963+
query_params,
1964+
header_params,
1965+
body=body_params,
1966+
post_params=form_params,
1967+
files=local_var_files,
1968+
response_type='GetJobResponse', # noqa: E501
1969+
auth_settings=auth_settings,
1970+
async_req=params.get('async_req'),
1971+
_return_http_data_only=params.get('_return_http_data_only'),
1972+
_preload_content=params.get('_preload_content', True),
1973+
_request_timeout=params.get('_request_timeout'),
1974+
collection_formats=collection_formats)
1975+
18791976
def get_resource_group(self, body, **kwargs): # noqa: E501
18801977
"""get_resource_group # noqa: E501
18811978

volcenginesdkmlplatform20240701/models/__init__.py

Lines changed: 88 additions & 26 deletions
Large diffs are not rendered by default.

volcenginesdkmlplatform20240701/models/apig_config_for_create_deployment_input.py

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,28 @@ class ApigConfigForCreateDeploymentInput(object):
3434
"""
3535
swagger_types = {
3636
'instance_id': 'str',
37-
'upstream_config': 'UpstreamConfigForCreateDeploymentInput',
38-
'use_public_instance': 'bool'
37+
'upstream_config': 'UpstreamConfigForCreateDeploymentInput'
3938
}
4039

4140
attribute_map = {
4241
'instance_id': 'InstanceID',
43-
'upstream_config': 'UpstreamConfig',
44-
'use_public_instance': 'UsePublicInstance'
42+
'upstream_config': 'UpstreamConfig'
4543
}
4644

47-
def __init__(self, instance_id=None, upstream_config=None, use_public_instance=None, _configuration=None): # noqa: E501
45+
def __init__(self, instance_id=None, upstream_config=None, _configuration=None): # noqa: E501
4846
"""ApigConfigForCreateDeploymentInput - a model defined in Swagger""" # noqa: E501
4947
if _configuration is None:
5048
_configuration = Configuration()
5149
self._configuration = _configuration
5250

5351
self._instance_id = None
5452
self._upstream_config = None
55-
self._use_public_instance = None
5653
self.discriminator = None
5754

5855
if instance_id is not None:
5956
self.instance_id = instance_id
6057
if upstream_config is not None:
6158
self.upstream_config = upstream_config
62-
if use_public_instance is not None:
63-
self.use_public_instance = use_public_instance
6459

6560
@property
6661
def instance_id(self):
@@ -104,27 +99,6 @@ def upstream_config(self, upstream_config):
10499

105100
self._upstream_config = upstream_config
106101

107-
@property
108-
def use_public_instance(self):
109-
"""Gets the use_public_instance of this ApigConfigForCreateDeploymentInput. # noqa: E501
110-
111-
112-
:return: The use_public_instance of this ApigConfigForCreateDeploymentInput. # noqa: E501
113-
:rtype: bool
114-
"""
115-
return self._use_public_instance
116-
117-
@use_public_instance.setter
118-
def use_public_instance(self, use_public_instance):
119-
"""Sets the use_public_instance of this ApigConfigForCreateDeploymentInput.
120-
121-
122-
:param use_public_instance: The use_public_instance of this ApigConfigForCreateDeploymentInput. # noqa: E501
123-
:type: bool
124-
"""
125-
126-
self._use_public_instance = use_public_instance
127-
128102
def to_dict(self):
129103
"""Returns the model properties as a dict"""
130104
result = {}
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# coding: utf-8
2+
3+
"""
4+
ml_platform20240701
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 CfsForCreateDeploymentInput(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+
'file_system_name': 'str',
37+
'namespace_id': 'str',
38+
'options': 'OptionsForCreateDeploymentInput',
39+
'tos': 'TosForCreateDeploymentInput'
40+
}
41+
42+
attribute_map = {
43+
'file_system_name': 'FileSystemName',
44+
'namespace_id': 'NamespaceId',
45+
'options': 'Options',
46+
'tos': 'Tos'
47+
}
48+
49+
def __init__(self, file_system_name=None, namespace_id=None, options=None, tos=None, _configuration=None): # noqa: E501
50+
"""CfsForCreateDeploymentInput - a model defined in Swagger""" # noqa: E501
51+
if _configuration is None:
52+
_configuration = Configuration()
53+
self._configuration = _configuration
54+
55+
self._file_system_name = None
56+
self._namespace_id = None
57+
self._options = None
58+
self._tos = None
59+
self.discriminator = None
60+
61+
if file_system_name is not None:
62+
self.file_system_name = file_system_name
63+
if namespace_id is not None:
64+
self.namespace_id = namespace_id
65+
if options is not None:
66+
self.options = options
67+
if tos is not None:
68+
self.tos = tos
69+
70+
@property
71+
def file_system_name(self):
72+
"""Gets the file_system_name of this CfsForCreateDeploymentInput. # noqa: E501
73+
74+
75+
:return: The file_system_name of this CfsForCreateDeploymentInput. # noqa: E501
76+
:rtype: str
77+
"""
78+
return self._file_system_name
79+
80+
@file_system_name.setter
81+
def file_system_name(self, file_system_name):
82+
"""Sets the file_system_name of this CfsForCreateDeploymentInput.
83+
84+
85+
:param file_system_name: The file_system_name of this CfsForCreateDeploymentInput. # noqa: E501
86+
:type: str
87+
"""
88+
89+
self._file_system_name = file_system_name
90+
91+
@property
92+
def namespace_id(self):
93+
"""Gets the namespace_id of this CfsForCreateDeploymentInput. # noqa: E501
94+
95+
96+
:return: The namespace_id of this CfsForCreateDeploymentInput. # noqa: E501
97+
:rtype: str
98+
"""
99+
return self._namespace_id
100+
101+
@namespace_id.setter
102+
def namespace_id(self, namespace_id):
103+
"""Sets the namespace_id of this CfsForCreateDeploymentInput.
104+
105+
106+
:param namespace_id: The namespace_id of this CfsForCreateDeploymentInput. # noqa: E501
107+
:type: str
108+
"""
109+
110+
self._namespace_id = namespace_id
111+
112+
@property
113+
def options(self):
114+
"""Gets the options of this CfsForCreateDeploymentInput. # noqa: E501
115+
116+
117+
:return: The options of this CfsForCreateDeploymentInput. # noqa: E501
118+
:rtype: OptionsForCreateDeploymentInput
119+
"""
120+
return self._options
121+
122+
@options.setter
123+
def options(self, options):
124+
"""Sets the options of this CfsForCreateDeploymentInput.
125+
126+
127+
:param options: The options of this CfsForCreateDeploymentInput. # noqa: E501
128+
:type: OptionsForCreateDeploymentInput
129+
"""
130+
131+
self._options = options
132+
133+
@property
134+
def tos(self):
135+
"""Gets the tos of this CfsForCreateDeploymentInput. # noqa: E501
136+
137+
138+
:return: The tos of this CfsForCreateDeploymentInput. # noqa: E501
139+
:rtype: TosForCreateDeploymentInput
140+
"""
141+
return self._tos
142+
143+
@tos.setter
144+
def tos(self, tos):
145+
"""Sets the tos of this CfsForCreateDeploymentInput.
146+
147+
148+
:param tos: The tos of this CfsForCreateDeploymentInput. # noqa: E501
149+
:type: TosForCreateDeploymentInput
150+
"""
151+
152+
self._tos = tos
153+
154+
def to_dict(self):
155+
"""Returns the model properties as a dict"""
156+
result = {}
157+
158+
for attr, _ in six.iteritems(self.swagger_types):
159+
value = getattr(self, attr)
160+
if isinstance(value, list):
161+
result[attr] = list(map(
162+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
163+
value
164+
))
165+
elif hasattr(value, "to_dict"):
166+
result[attr] = value.to_dict()
167+
elif isinstance(value, dict):
168+
result[attr] = dict(map(
169+
lambda item: (item[0], item[1].to_dict())
170+
if hasattr(item[1], "to_dict") else item,
171+
value.items()
172+
))
173+
else:
174+
result[attr] = value
175+
if issubclass(CfsForCreateDeploymentInput, dict):
176+
for key, value in self.items():
177+
result[key] = value
178+
179+
return result
180+
181+
def to_str(self):
182+
"""Returns the string representation of the model"""
183+
return pprint.pformat(self.to_dict())
184+
185+
def __repr__(self):
186+
"""For `print` and `pprint`"""
187+
return self.to_str()
188+
189+
def __eq__(self, other):
190+
"""Returns true if both objects are equal"""
191+
if not isinstance(other, CfsForCreateDeploymentInput):
192+
return False
193+
194+
return self.to_dict() == other.to_dict()
195+
196+
def __ne__(self, other):
197+
"""Returns true if both objects are not equal"""
198+
if not isinstance(other, CfsForCreateDeploymentInput):
199+
return True
200+
201+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)