"""
    SORACOM API

    SORACOM API v1  # noqa: E501

    The version of the OpenAPI document: VERSION_PLACEHOLDER
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from soracom_api.api_client import ApiClient, Endpoint as _Endpoint
from soracom_api.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from soracom_api.model.create_soralet_request import CreateSoraletRequest
from soracom_api.model.execute_soralet_request import ExecuteSoraletRequest
from soracom_api.model.execute_soralet_response import ExecuteSoraletResponse
from soracom_api.model.soralet import Soralet
from soracom_api.model.soralet_log import SoraletLog
from soracom_api.model.soralet_version import SoraletVersion


class SoraletApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.create_soralet_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets',
                'operation_id': 'create_soralet',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'create_soralet_request',
                ],
                'required': [
                    'create_soralet_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'create_soralet_request':
                        (CreateSoraletRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'create_soralet_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.delete_soralet_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}',
                'operation_id': 'delete_soralet',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                ],
                'required': [
                    'soralet_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                },
                'location_map': {
                    'soralet_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [],
            },
            api_client=api_client
        )
        self.delete_soralet_version_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}/versions/{version}',
                'operation_id': 'delete_soralet_version',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                    'version',
                ],
                'required': [
                    'soralet_id',
                    'version',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                    'version':
                        (int,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                    'version': 'version',
                },
                'location_map': {
                    'soralet_id': 'path',
                    'version': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_soralet_endpoint = _Endpoint(
            settings={
                'response_type': (Soralet,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}',
                'operation_id': 'get_soralet',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                ],
                'required': [
                    'soralet_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                },
                'location_map': {
                    'soralet_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_soralet_logs_endpoint = _Endpoint(
            settings={
                'response_type': ([SoraletLog],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}/logs',
                'operation_id': 'get_soralet_logs',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                    'sort',
                    'limit',
                    'last_evaluated_key',
                ],
                'required': [
                    'soralet_id',
                ],
                'nullable': [
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('sort',): {

                        "ASC": "asc",
                        "DESC": "desc"
                    },
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                    'sort':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                    'sort': 'sort',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                },
                'location_map': {
                    'soralet_id': 'path',
                    'sort': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.list_soralet_versions_endpoint = _Endpoint(
            settings={
                'response_type': ([SoraletVersion],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}/versions',
                'operation_id': 'list_soralet_versions',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                    'sort',
                    'limit',
                    'last_evaluated_key',
                ],
                'required': [
                    'soralet_id',
                ],
                'nullable': [
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('sort',): {

                        "ASC": "asc",
                        "DESC": "desc"
                    },
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                    'sort':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                    'sort': 'sort',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                },
                'location_map': {
                    'soralet_id': 'path',
                    'sort': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.list_soralets_endpoint = _Endpoint(
            settings={
                'response_type': ([Soralet],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets',
                'operation_id': 'list_soralets',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'sort',
                    'limit',
                    'last_evaluated_key',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('sort',): {

                        "ASC": "asc",
                        "DESC": "desc"
                    },
                },
                'openapi_types': {
                    'sort':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                },
                'attribute_map': {
                    'sort': 'sort',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                },
                'location_map': {
                    'sort': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.test_soralet_endpoint = _Endpoint(
            settings={
                'response_type': (ExecuteSoraletResponse,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}/test',
                'operation_id': 'test_soralet',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                    'execute_soralet_request',
                ],
                'required': [
                    'soralet_id',
                    'execute_soralet_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                    'execute_soralet_request':
                        (ExecuteSoraletRequest,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                },
                'location_map': {
                    'soralet_id': 'path',
                    'execute_soralet_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.upload_soralet_code_endpoint = _Endpoint(
            settings={
                'response_type': (SoraletVersion,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/soralets/{soralet_id}/versions',
                'operation_id': 'upload_soralet_code',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'soralet_id',
                    'body',
                    'content_type',
                ],
                'required': [
                    'soralet_id',
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'soralet_id':
                        (str,),
                    'body':
                        (file_type,),
                    'content_type':
                        (str,),
                },
                'attribute_map': {
                    'soralet_id': 'soralet_id',
                    'content_type': 'content-type',
                },
                'location_map': {
                    'soralet_id': 'path',
                    'body': 'body',
                    'content_type': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def create_soralet(
        self,
        create_soralet_request,
        **kwargs
    ):
        """Create a Soralet.  # noqa: E501

        Create a Soralet.  # 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_soralet(create_soralet_request, async_req=True)
        >>> result = thread.get()

        Args:
            create_soralet_request (CreateSoraletRequest): request

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['create_soralet_request'] = \
            create_soralet_request
        return self.create_soralet_endpoint.call_with_http_info(**kwargs)

    def delete_soralet(
        self,
        soralet_id,
        **kwargs
    ):
        """Delete Soralet.  # noqa: E501

        Delete the specified Soralet.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_soralet(soralet_id, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        return self.delete_soralet_endpoint.call_with_http_info(**kwargs)

    def delete_soralet_version(
        self,
        soralet_id,
        version,
        **kwargs
    ):
        """Delete a Soralet version.  # noqa: E501

        Delete the specified Soralet version.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_soralet_version(soralet_id, version, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.
            version (int): Soralet version.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        kwargs['version'] = \
            version
        return self.delete_soralet_version_endpoint.call_with_http_info(**kwargs)

    def get_soralet(
        self,
        soralet_id,
        **kwargs
    ):
        """Get a Soralet.  # noqa: E501

        Returns a Soralet.  # 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_soralet(soralet_id, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Soralet
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        return self.get_soralet_endpoint.call_with_http_info(**kwargs)

    def get_soralet_logs(
        self,
        soralet_id,
        **kwargs
    ):
        """Get log messages from Soralet.  # noqa: E501

        Returns a list of log messages from the specified Soralet.  # 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_soralet_logs(soralet_id, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.

        Keyword Args:
            sort (str): Sort order. [optional] if omitted the server will use the default value of "desc"
            limit (int): The maximum number of items in a response.. [optional]
            last_evaluated_key (str): The identifier of the last log message retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next log message onward.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [SoraletLog]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        return self.get_soralet_logs_endpoint.call_with_http_info(**kwargs)

    def list_soralet_versions(
        self,
        soralet_id,
        **kwargs
    ):
        """List versions of Soralet.  # noqa: E501

        Returns a list of Soralet versions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_soralet_versions(soralet_id, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.

        Keyword Args:
            sort (str): Sort order. [optional] if omitted the server will use the default value of "desc"
            limit (int): The maximum number of items in a response.. [optional]
            last_evaluated_key (str): The identifier of the last version retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next version onward.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [SoraletVersion]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        return self.list_soralet_versions_endpoint.call_with_http_info(**kwargs)

    def list_soralets(
        self,
        **kwargs
    ):
        """List Soralets.  # noqa: E501

        Returns a list of Soralets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_soralets(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            sort (str): Sort order. [optional] if omitted the server will use the default value of "asc"
            limit (int): The maximum number of items in a response. [optional]
            last_evaluated_key (str): The identifier of the last Soralet retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next Soralet onward.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Soralet]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.list_soralets_endpoint.call_with_http_info(**kwargs)

    def test_soralet(
        self,
        soralet_id,
        execute_soralet_request,
        **kwargs
    ):
        """Execute Soralet with arguments.  # noqa: E501

        Execute the specified Soralet with the specified arguments.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.test_soralet(soralet_id, execute_soralet_request, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.
            execute_soralet_request (ExecuteSoraletRequest): request

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            ExecuteSoraletResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        kwargs['execute_soralet_request'] = \
            execute_soralet_request
        return self.test_soralet_endpoint.call_with_http_info(**kwargs)

    def upload_soralet_code(
        self,
        soralet_id,
        body,
        **kwargs
    ):
        """Upload code and create a new version.  # noqa: E501

        Upload code and create a new version.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.upload_soralet_code(soralet_id, body, async_req=True)
        >>> result = thread.get()

        Args:
            soralet_id (str): The identifier of Soralet.
            body (file_type):

        Keyword Args:
            content_type (str): Content type of the file to upload. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            SoraletVersion
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['soralet_id'] = \
            soralet_id
        kwargs['body'] = \
            body
        return self.upload_soralet_code_endpoint.call_with_http_info(**kwargs)

