Skip to content

Commit

Permalink
Merge branch 'nta-Python-2024-07-30-online-620-2024_08_16_11_58_38' i…
Browse files Browse the repository at this point in the history
…nto 'integration_2024-08-22_404454435074'

feat: [development task] nta-620-Python (757591)

See merge request iaasng/volcengine-python-sdk!370
  • Loading branch information
BitsAdmin committed Aug 22, 2024
2 parents 6142ba7 + f1b35a9 commit 997d8cb
Show file tree
Hide file tree
Showing 8 changed files with 887 additions and 0 deletions.
25 changes: 25 additions & 0 deletions volcenginesdknta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# coding: utf-8

# flake8: noqa

"""
nta
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: common-version
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

# import apis into sdk package
from volcenginesdknta.api.nta_api import NTAApi

# import models into sdk package
from volcenginesdknta.models.create_file_detection_request import CreateFileDetectionRequest
from volcenginesdknta.models.create_file_detection_response import CreateFileDetectionResponse
from volcenginesdknta.models.get_file_detection_request import GetFileDetectionRequest
from volcenginesdknta.models.get_file_detection_response import GetFileDetectionResponse
6 changes: 6 additions & 0 deletions volcenginesdknta/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import absolute_import

# flake8: noqa

# import apis into api package
from volcenginesdknta.api.nta_api import NTAApi
228 changes: 228 additions & 0 deletions volcenginesdknta/api/nta_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# coding: utf-8

"""
nta
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: common-version
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re # noqa: F401

# python 2 and python 3 compatibility library
import six

import volcenginesdkcore


class NTAApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""

def __init__(self, api_client=None):
if api_client is None:
api_client = volcenginesdkcore.ApiClient()
self.api_client = api_client

def create_file_detection(self, body, **kwargs): # noqa: E501
"""create_file_detection # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_file_detection(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param CreateFileDetectionRequest body: (required)
:return: CreateFileDetectionResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_file_detection_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.create_file_detection_with_http_info(body, **kwargs) # noqa: E501
return data

def create_file_detection_with_http_info(self, body, **kwargs): # noqa: E501
"""create_file_detection # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_file_detection_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param CreateFileDetectionRequest body: (required)
:return: CreateFileDetectionResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method create_file_detection" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if self.api_client.client_side_validation and ('body' not in params or
params['body'] is None): # noqa: E501
raise ValueError("Missing the required parameter `body` when calling `create_file_detection`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['volcengineSign'] # noqa: E501

return self.api_client.call_api(
'/CreateFileDetection/2024-07-30/nta/post/application_json/', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CreateFileDetectionResponse', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def get_file_detection(self, body, **kwargs): # noqa: E501
"""get_file_detection # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_file_detection(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GetFileDetectionRequest body: (required)
:return: GetFileDetectionResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_file_detection_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.get_file_detection_with_http_info(body, **kwargs) # noqa: E501
return data

def get_file_detection_with_http_info(self, body, **kwargs): # noqa: E501
"""get_file_detection # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_file_detection_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GetFileDetectionRequest body: (required)
:return: GetFileDetectionResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_file_detection" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if self.api_client.client_side_validation and ('body' not in params or
params['body'] is None): # noqa: E501
raise ValueError("Missing the required parameter `body` when calling `get_file_detection`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['volcengineSign'] # noqa: E501

return self.api_client.call_api(
'/GetFileDetection/2024-07-30/nta/post/application_json/', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='GetFileDetectionResponse', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
21 changes: 21 additions & 0 deletions volcenginesdknta/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# coding: utf-8

# flake8: noqa
"""
nta
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: common-version
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

# import models into model package
from volcenginesdknta.models.create_file_detection_request import CreateFileDetectionRequest
from volcenginesdknta.models.create_file_detection_response import CreateFileDetectionResponse
from volcenginesdknta.models.get_file_detection_request import GetFileDetectionRequest
from volcenginesdknta.models.get_file_detection_response import GetFileDetectionResponse
Loading

0 comments on commit 997d8cb

Please sign in to comment.