# coding: utf-8

"""
    external/v1/auth_service.proto

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: version not set
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""

from __future__ import absolute_import

import re  # noqa: F401
from typing import TYPE_CHECKING, Any

# python 2 and python 3 compatibility library
import six

from lightning_cloud.openapi.api_client import ApiClient

if TYPE_CHECKING:
    from datetime import datetime
    from lightning_cloud.openapi.models import *

class LightningappInstanceServiceApi(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 = ApiClient()
        self.api_client = api_client

    def lightningapp_instance_service_complete_multipart_upload_project_artifact(self, body: 'MultipartCompleteBody', project_id: 'str', **kwargs) -> 'V1CompleteMultipartUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_complete_multipart_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_complete_multipart_upload_project_artifact(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param MultipartCompleteBody body: (required)
        :param str project_id: (required)
        :return: V1CompleteMultipartUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_complete_multipart_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_complete_multipart_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_complete_multipart_upload_project_artifact_with_http_info(self, body: 'MultipartCompleteBody', project_id: 'str', **kwargs) -> 'V1CompleteMultipartUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_complete_multipart_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_complete_multipart_upload_project_artifact_with_http_info(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param MultipartCompleteBody body: (required)
        :param str project_id: (required)
        :return: V1CompleteMultipartUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id']  # 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 lightningapp_instance_service_complete_multipart_upload_project_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_complete_multipart_upload_project_artifact`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_complete_multipart_upload_project_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage/multipart/complete', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CompleteMultipartUploadProjectArtifactResponse',  # 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 lightningapp_instance_service_complete_upload_project_artifact(self, body: 'StorageCompleteBody', project_id: 'str', **kwargs) -> 'V1CompleteUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_complete_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_complete_upload_project_artifact(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param StorageCompleteBody body: (required)
        :param str project_id: (required)
        :return: V1CompleteUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_complete_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_complete_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_complete_upload_project_artifact_with_http_info(self, body: 'StorageCompleteBody', project_id: 'str', **kwargs) -> 'V1CompleteUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_complete_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_complete_upload_project_artifact_with_http_info(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param StorageCompleteBody body: (required)
        :param str project_id: (required)
        :return: V1CompleteUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id']  # 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 lightningapp_instance_service_complete_upload_project_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_complete_upload_project_artifact`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_complete_upload_project_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage/complete', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CompleteUploadProjectArtifactResponse',  # 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 lightningapp_instance_service_create_multipart_upload_project_artifact(self, body: 'StorageMultipartBody', project_id: 'str', **kwargs) -> 'V1CreateMultipartUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_create_multipart_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_create_multipart_upload_project_artifact(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param StorageMultipartBody body: (required)
        :param str project_id: (required)
        :return: V1CreateMultipartUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_create_multipart_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_create_multipart_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_create_multipart_upload_project_artifact_with_http_info(self, body: 'StorageMultipartBody', project_id: 'str', **kwargs) -> 'V1CreateMultipartUploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_create_multipart_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_create_multipart_upload_project_artifact_with_http_info(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param StorageMultipartBody body: (required)
        :param str project_id: (required)
        :return: V1CreateMultipartUploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id']  # 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 lightningapp_instance_service_create_multipart_upload_project_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_create_multipart_upload_project_artifact`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_create_multipart_upload_project_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage/multipart', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CreateMultipartUploadProjectArtifactResponse',  # 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 lightningapp_instance_service_delete_lightningapp_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningappInstanceResponse':  # noqa: E501
        """lightningapp_instance_service_delete_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_lightningapp_instance(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: V1DeleteLightningappInstanceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_delete_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_delete_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_delete_lightningapp_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningappInstanceResponse':  # noqa: E501
        """lightningapp_instance_service_delete_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_lightningapp_instance_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: V1DeleteLightningappInstanceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id']  # 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 lightningapp_instance_service_delete_lightningapp_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_delete_lightningapp_instance`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_delete_lightningapp_instance`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteLightningappInstanceResponse',  # 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 lightningapp_instance_service_delete_lightningapp_instance_artifact(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningappInstanceArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_delete_lightningapp_instance_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_lightningapp_instance_artifact(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str filename:
        :return: V1DeleteLightningappInstanceArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_delete_lightningapp_instance_artifact_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_delete_lightningapp_instance_artifact_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_delete_lightningapp_instance_artifact_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningappInstanceArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_delete_lightningapp_instance_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_lightningapp_instance_artifact_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str filename:
        :return: V1DeleteLightningappInstanceArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'filename']  # 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 lightningapp_instance_service_delete_lightningapp_instance_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_delete_lightningapp_instance_artifact`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_delete_lightningapp_instance_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'filename' in params:
            query_params.append(('filename', params['filename']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/artifacts', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteLightningappInstanceArtifactResponse',  # 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 lightningapp_instance_service_delete_project_artifact(self, project_id: 'str', **kwargs) -> 'V1DeleteProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_delete_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_project_artifact(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str cluster_id:
        :param str filename:
        :return: V1DeleteProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_delete_project_artifact_with_http_info(project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_delete_project_artifact_with_http_info(project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_delete_project_artifact_with_http_info(self, project_id: 'str', **kwargs) -> 'V1DeleteProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_delete_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_delete_project_artifact_with_http_info(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str cluster_id:
        :param str filename:
        :return: V1DeleteProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'cluster_id', 'filename']  # 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 lightningapp_instance_service_delete_project_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_delete_project_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        query_params = []
        if 'cluster_id' in params:
            query_params.append(('clusterId', params['cluster_id']))  # noqa: E501
        if 'filename' in params:
            query_params.append(('filename', params['filename']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteProjectArtifactResponse',  # 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 lightningapp_instance_service_download_lightningapp_instance_logs(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DownloadLightningappInstanceLogsResponse':  # noqa: E501
        """lightningapp_instance_service_download_lightningapp_instance_logs  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_download_lightningapp_instance_logs(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str work_id:
        :return: V1DownloadLightningappInstanceLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_download_lightningapp_instance_logs_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_download_lightningapp_instance_logs_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_download_lightningapp_instance_logs_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DownloadLightningappInstanceLogsResponse':  # noqa: E501
        """lightningapp_instance_service_download_lightningapp_instance_logs  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_download_lightningapp_instance_logs_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str work_id:
        :return: V1DownloadLightningappInstanceLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'work_id']  # 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 lightningapp_instance_service_download_lightningapp_instance_logs" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_download_lightningapp_instance_logs`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_download_lightningapp_instance_logs`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'work_id' in params:
            query_params.append(('workId', params['work_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/download-logs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DownloadLightningappInstanceLogsResponse',  # 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 lightningapp_instance_service_find_lightningapp_instance(self, project_id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_find_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_find_lightningapp_instance(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str name:
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_find_lightningapp_instance_with_http_info(project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_find_lightningapp_instance_with_http_info(project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_find_lightningapp_instance_with_http_info(self, project_id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_find_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_find_lightningapp_instance_with_http_info(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str name:
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'name']  # 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 lightningapp_instance_service_find_lightningapp_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_find_lightningapp_instance`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        query_params = []
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/find', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Externalv1LightningappInstance',  # 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 lightningapp_instance_service_get_lightningapp_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_get_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_get_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_get_lightningapp_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id']  # 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 lightningapp_instance_service_get_lightningapp_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_get_lightningapp_instance`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_get_lightningapp_instance`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Externalv1LightningappInstance',  # 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 lightningapp_instance_service_get_lightningapp_instance_logs(self, project_id: 'str', id: 'str', **kwargs) -> 'V1LogsResponse':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance_logs  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_logs(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str since:
        :param str until:
        :return: V1LogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_get_lightningapp_instance_logs_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_get_lightningapp_instance_logs_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_get_lightningapp_instance_logs_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1LogsResponse':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance_logs  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_logs_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str since:
        :param str until:
        :return: V1LogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'since', 'until']  # 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 lightningapp_instance_service_get_lightningapp_instance_logs" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_get_lightningapp_instance_logs`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_get_lightningapp_instance_logs`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'since' in params:
            query_params.append(('since', params['since']))  # noqa: E501
        if 'until' in params:
            query_params.append(('until', params['until']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/page-logs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1LogsResponse',  # 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 lightningapp_instance_service_get_lightningapp_instance_system_metrics(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetLightningappInstanceSystemMetricsResponse':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance_system_metrics  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_system_metrics(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param list[str] work_ids:
        :param datetime start:
        :param datetime end:
        :param str frequency:
        :param bool first_query:
        :return: V1GetLightningappInstanceSystemMetricsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_get_lightningapp_instance_system_metrics_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_get_lightningapp_instance_system_metrics_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_get_lightningapp_instance_system_metrics_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetLightningappInstanceSystemMetricsResponse':  # noqa: E501
        """lightningapp_instance_service_get_lightningapp_instance_system_metrics  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_system_metrics_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param list[str] work_ids:
        :param datetime start:
        :param datetime end:
        :param str frequency:
        :param bool first_query:
        :return: V1GetLightningappInstanceSystemMetricsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'work_ids', 'start', 'end', 'frequency', 'first_query']  # 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 lightningapp_instance_service_get_lightningapp_instance_system_metrics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_get_lightningapp_instance_system_metrics`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_get_lightningapp_instance_system_metrics`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'work_ids' in params:
            query_params.append(('workIds', params['work_ids']))  # noqa: E501
            collection_formats['workIds'] = 'multi'  # noqa: E501
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'end' in params:
            query_params.append(('end', params['end']))  # noqa: E501
        if 'frequency' in params:
            query_params.append(('frequency', params['frequency']))  # noqa: E501
        if 'first_query' in params:
            query_params.append(('firstQuery', params['first_query']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/system-metrics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetLightningappInstanceSystemMetricsResponse',  # 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 lightningapp_instance_service_list_lightningapp_instance_artifacts(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListLightningappInstanceArtifactsResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instance_artifacts  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instance_artifacts(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str filename:
        :param str page_token:
        :param str page_size:
        :return: V1ListLightningappInstanceArtifactsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_list_lightningapp_instance_artifacts_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_list_lightningapp_instance_artifacts_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_list_lightningapp_instance_artifacts_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListLightningappInstanceArtifactsResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instance_artifacts  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instance_artifacts_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str filename:
        :param str page_token:
        :param str page_size:
        :return: V1ListLightningappInstanceArtifactsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'filename', 'page_token', 'page_size']  # 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 lightningapp_instance_service_list_lightningapp_instance_artifacts" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_list_lightningapp_instance_artifacts`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_list_lightningapp_instance_artifacts`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'filename' in params:
            query_params.append(('filename', params['filename']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/artifacts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListLightningappInstanceArtifactsResponse',  # 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 lightningapp_instance_service_list_lightningapp_instance_events(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListLightningappInstanceEventsResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instance_events  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instance_events(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param bool include_costs:
        :return: V1ListLightningappInstanceEventsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_list_lightningapp_instance_events_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_list_lightningapp_instance_events_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_list_lightningapp_instance_events_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListLightningappInstanceEventsResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instance_events  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instance_events_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param bool include_costs:
        :return: V1ListLightningappInstanceEventsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'include_costs']  # 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 lightningapp_instance_service_list_lightningapp_instance_events" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_list_lightningapp_instance_events`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_list_lightningapp_instance_events`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'include_costs' in params:
            query_params.append(('includeCosts', params['include_costs']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/events', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListLightningappInstanceEventsResponse',  # 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 lightningapp_instance_service_list_lightningapp_instances(self, project_id: 'str', **kwargs) -> 'V1ListLightningappInstancesResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instances  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instances(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str page_token: Pagination.
        :param str limit:
        :param list[str] user_ids: Filters.
        :param str cluster_id:
        :param list[str] phase_in:
        :param list[str] phase_not_in:
        :param str app_id:
        :param str release_id:
        :return: V1ListLightningappInstancesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_list_lightningapp_instances_with_http_info(project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_list_lightningapp_instances_with_http_info(project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_list_lightningapp_instances_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListLightningappInstancesResponse':  # noqa: E501
        """lightningapp_instance_service_list_lightningapp_instances  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_lightningapp_instances_with_http_info(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str page_token: Pagination.
        :param str limit:
        :param list[str] user_ids: Filters.
        :param str cluster_id:
        :param list[str] phase_in:
        :param list[str] phase_not_in:
        :param str app_id:
        :param str release_id:
        :return: V1ListLightningappInstancesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'page_token', 'limit', 'user_ids', 'cluster_id', 'phase_in', 'phase_not_in', 'app_id', 'release_id']  # 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 lightningapp_instance_service_list_lightningapp_instances" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_list_lightningapp_instances`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        query_params = []
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'user_ids' in params:
            query_params.append(('userIds', params['user_ids']))  # noqa: E501
            collection_formats['userIds'] = 'multi'  # noqa: E501
        if 'cluster_id' in params:
            query_params.append(('clusterId', params['cluster_id']))  # noqa: E501
        if 'phase_in' in params:
            query_params.append(('phaseIn', params['phase_in']))  # noqa: E501
            collection_formats['phaseIn'] = 'multi'  # noqa: E501
        if 'phase_not_in' in params:
            query_params.append(('phaseNotIn', params['phase_not_in']))  # noqa: E501
            collection_formats['phaseNotIn'] = 'multi'  # noqa: E501
        if 'app_id' in params:
            query_params.append(('appId', params['app_id']))  # noqa: E501
        if 'release_id' in params:
            query_params.append(('releaseId', params['release_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListLightningappInstancesResponse',  # 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 lightningapp_instance_service_list_project_artifacts(self, project_id: 'str', **kwargs) -> 'V1ListProjectArtifactsResponse':  # noqa: E501
        """lightningapp_instance_service_list_project_artifacts  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_project_artifacts(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str cluster_id:
        :param str page_token:
        :param str page_size:
        :param str prefix:
        :param bool include_download_url:
        :return: V1ListProjectArtifactsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_list_project_artifacts_with_http_info(project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_list_project_artifacts_with_http_info(project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_list_project_artifacts_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListProjectArtifactsResponse':  # noqa: E501
        """lightningapp_instance_service_list_project_artifacts  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_list_project_artifacts_with_http_info(project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str cluster_id:
        :param str page_token:
        :param str page_size:
        :param str prefix:
        :param bool include_download_url:
        :return: V1ListProjectArtifactsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'cluster_id', 'page_token', 'page_size', 'prefix', 'include_download_url']  # 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 lightningapp_instance_service_list_project_artifacts" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_list_project_artifacts`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        query_params = []
        if 'cluster_id' in params:
            query_params.append(('clusterId', params['cluster_id']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))  # noqa: E501
        if 'prefix' in params:
            query_params.append(('prefix', params['prefix']))  # noqa: E501
        if 'include_download_url' in params:
            query_params.append(('includeDownloadUrl', params['include_download_url']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListProjectArtifactsResponse',  # 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 lightningapp_instance_service_restart_lightningapp_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_restart_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_restart_lightningapp_instance(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_restart_lightningapp_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_restart_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id']  # 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 lightningapp_instance_service_restart_lightningapp_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_restart_lightningapp_instance`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_restart_lightningapp_instance`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/restart', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Externalv1LightningappInstance',  # 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 lightningapp_instance_service_update_lightningapp_instance(self, body: 'AppinstancesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_update_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_update_lightningapp_instance(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AppinstancesIdBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_update_lightningapp_instance_with_http_info(self, body: 'AppinstancesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_update_lightningapp_instance  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AppinstancesIdBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id', 'id']  # 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 lightningapp_instance_service_update_lightningapp_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_update_lightningapp_instance`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_update_lightningapp_instance`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_update_lightningapp_instance`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Externalv1LightningappInstance',  # 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 lightningapp_instance_service_update_lightningapp_instance_release(self, body: 'IdReleaseBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_update_lightningapp_instance_release  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_release(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdReleaseBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(self, body: 'IdReleaseBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """lightningapp_instance_service_update_lightningapp_instance_release  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdReleaseBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: Externalv1LightningappInstance
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id', 'id']  # 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 lightningapp_instance_service_update_lightningapp_instance_release" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_update_lightningapp_instance_release`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_update_lightningapp_instance_release`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_update_lightningapp_instance_release`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/release', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Externalv1LightningappInstance',  # 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 lightningapp_instance_service_upload_lightningapp_instance_artifact(self, body: 'IdArtifactsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UploadLightningappInstanceArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_upload_lightningapp_instance_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_upload_lightningapp_instance_artifact(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdArtifactsBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1UploadLightningappInstanceArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_upload_lightningapp_instance_artifact_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_upload_lightningapp_instance_artifact_with_http_info(body, project_id, id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_upload_lightningapp_instance_artifact_with_http_info(self, body: 'IdArtifactsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UploadLightningappInstanceArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_upload_lightningapp_instance_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_upload_lightningapp_instance_artifact_with_http_info(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdArtifactsBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1UploadLightningappInstanceArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id', 'id']  # 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 lightningapp_instance_service_upload_lightningapp_instance_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_upload_lightningapp_instance_artifact`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_upload_lightningapp_instance_artifact`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_upload_lightningapp_instance_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/appinstances/{id}/artifacts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UploadLightningappInstanceArtifactResponse',  # 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 lightningapp_instance_service_upload_project_artifact(self, body: 'ProjectIdStorageBody', project_id: 'str', **kwargs) -> 'V1UploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_upload_project_artifact(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ProjectIdStorageBody body: (required)
        :param str project_id: (required)
        :return: V1UploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.lightningapp_instance_service_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.lightningapp_instance_service_upload_project_artifact_with_http_info(body, project_id, **kwargs)  # noqa: E501
            return data

    def lightningapp_instance_service_upload_project_artifact_with_http_info(self, body: 'ProjectIdStorageBody', project_id: 'str', **kwargs) -> 'V1UploadProjectArtifactResponse':  # noqa: E501
        """lightningapp_instance_service_upload_project_artifact  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.lightningapp_instance_service_upload_project_artifact_with_http_info(body, project_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ProjectIdStorageBody body: (required)
        :param str project_id: (required)
        :return: V1UploadProjectArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'project_id']  # 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 lightningapp_instance_service_upload_project_artifact" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_upload_project_artifact`")  # noqa: E501
        # verify the required parameter 'project_id' is set
        if ('project_id' not in params or
                params['project_id'] is None):
            raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_upload_project_artifact`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/projects/{projectId}/storage', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UploadProjectArtifactResponse',  # 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)
