Skip to content

Commit

Permalink
3.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Apr 27, 2021
1 parent aaef1c3 commit 45b61fe
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Convert API lets you effortlessly convert file formats and types.
This Python package provides a native API client for [Cloudmersive Document Conversion](https://www.cloudmersive.com/convert-api)

- API version: v1
- Package version: 3.1.4
- Package version: 3.1.5
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
34 changes: 27 additions & 7 deletions cloudmersive_convert_api_client/api/zip_archive_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,43 +414,49 @@ def zip_archive_zip_create_encrypted_with_http_info(self, password, input_file1,
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def zip_archive_zip_create_quarantine(self, **kwargs): # noqa: E501
def zip_archive_zip_create_quarantine(self, password, input_file1, **kwargs): # noqa: E501
"""Create an encrypted zip file to quarantine a dangerous file # noqa: E501
Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.zip_archive_zip_create_quarantine(async_req=True)
>>> thread = api.zip_archive_zip_create_quarantine(password, input_file1, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str password: Password to place on the Zip file; the longer the password, the more secure (required)
:param file input_file1: First input file to perform the operation on. (required)
:param str encryption_algorithm: Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256.
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.zip_archive_zip_create_quarantine_with_http_info(**kwargs) # noqa: E501
return self.zip_archive_zip_create_quarantine_with_http_info(password, input_file1, **kwargs) # noqa: E501
else:
(data) = self.zip_archive_zip_create_quarantine_with_http_info(**kwargs) # noqa: E501
(data) = self.zip_archive_zip_create_quarantine_with_http_info(password, input_file1, **kwargs) # noqa: E501
return data

def zip_archive_zip_create_quarantine_with_http_info(self, **kwargs): # noqa: E501
def zip_archive_zip_create_quarantine_with_http_info(self, password, input_file1, **kwargs): # noqa: E501
"""Create an encrypted zip file to quarantine a dangerous file # noqa: E501
Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.zip_archive_zip_create_quarantine_with_http_info(async_req=True)
>>> thread = api.zip_archive_zip_create_quarantine_with_http_info(password, input_file1, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str password: Password to place on the Zip file; the longer the password, the more secure (required)
:param file input_file1: First input file to perform the operation on. (required)
:param str encryption_algorithm: Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256.
:return: object
If the method is called asynchronously,
returns the request thread.
"""

all_params = [] # noqa: E501
all_params = ['password', 'input_file1', 'encryption_algorithm'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
Expand All @@ -465,6 +471,14 @@ def zip_archive_zip_create_quarantine_with_http_info(self, **kwargs): # noqa: E
)
params[key] = val
del params['kwargs']
# verify the required parameter 'password' is set
if ('password' not in params or
params['password'] is None):
raise ValueError("Missing the required parameter `password` when calling `zip_archive_zip_create_quarantine`") # noqa: E501
# verify the required parameter 'input_file1' is set
if ('input_file1' not in params or
params['input_file1'] is None):
raise ValueError("Missing the required parameter `input_file1` when calling `zip_archive_zip_create_quarantine`") # noqa: E501

collection_formats = {}

Expand All @@ -473,9 +487,15 @@ def zip_archive_zip_create_quarantine_with_http_info(self, **kwargs): # noqa: E
query_params = []

header_params = {}
if 'password' in params:
header_params['password'] = params['password'] # noqa: E501
if 'encryption_algorithm' in params:
header_params['encryptionAlgorithm'] = params['encryption_algorithm'] # noqa: E501

form_params = []
local_var_files = {}
if 'input_file1' in params:
local_var_files['inputFile1'] = params['input_file1'] # noqa: E501

body_params = None
# HTTP header `Accept`
Expand Down
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/3.1.4/python'
self.user_agent = 'Swagger-Codegen/3.1.5/python'

def __del__(self):
if self._pool is not None:
Expand Down
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1\n"\
"SDK Package Version: 3.1.4".\
"SDK Package Version: 3.1.5".\
format(env=sys.platform, pyversion=sys.version)
14 changes: 11 additions & 3 deletions docs/ZipArchiveApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **zip_archive_zip_create_quarantine**
> object zip_archive_zip_create_quarantine()
> object zip_archive_zip_create_quarantine(password, input_file1, encryption_algorithm=encryption_algorithm)
Create an encrypted zip file to quarantine a dangerous file

Expand All @@ -238,17 +238,25 @@ configuration.api_key['Apikey'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = cloudmersive_convert_api_client.ZipArchiveApi(cloudmersive_convert_api_client.ApiClient(configuration))
password = 'password_example' # str | Password to place on the Zip file; the longer the password, the more secure
input_file1 = '/path/to/file.txt' # file | First input file to perform the operation on.
encryption_algorithm = 'encryption_algorithm_example' # str | Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256. (optional)

try:
# Create an encrypted zip file to quarantine a dangerous file
api_response = api_instance.zip_archive_zip_create_quarantine()
api_response = api_instance.zip_archive_zip_create_quarantine(password, input_file1, encryption_algorithm=encryption_algorithm)
pprint(api_response)
except ApiException as e:
print("Exception when calling ZipArchiveApi->zip_archive_zip_create_quarantine: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**password** | **str**| Password to place on the Zip file; the longer the password, the more secure |
**input_file1** | **file**| First input file to perform the operation on. |
**encryption_algorithm** | **str**| Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256. | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "cloudmersive_convert_api_client"
VERSION = "3.1.4"
VERSION = "3.1.5"
# To install the library, run the following
#
# python setup.py install
Expand Down

0 comments on commit 45b61fe

Please sign in to comment.