# 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 CloudSpaceServiceApi(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 cloud_space_service_cancel_cloud_space_instance_switch(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CancelCloudSpaceInstanceSwitchResponse':  # noqa: E501
        """cloud_space_service_cancel_cloud_space_instance_switch  # noqa: E501

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

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

    def cloud_space_service_cancel_cloud_space_instance_switch_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CancelCloudSpaceInstanceSwitchResponse':  # noqa: E501
        """cloud_space_service_cancel_cloud_space_instance_switch  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_cancel_cloud_space_instance_switch_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: V1CancelCloudSpaceInstanceSwitchResponse
                 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 cloud_space_service_cancel_cloud_space_instance_switch" % 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 `cloud_space_service_cancel_cloud_space_instance_switch`")  # 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 `cloud_space_service_cancel_cloud_space_instance_switch`")  # 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}/cloudspaces/{id}/switch-cancel', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CancelCloudSpaceInstanceSwitchResponse',  # 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 cloud_space_service_check_external_service_status(self, **kwargs) -> 'V1CheckExternalServiceStatusResponse':  # noqa: E501
        """Endpoint for checking GitHub status so we can show an error \"it's not our fault\" when GitHub is down and stuff starts breaking for our users.  # noqa: E501

        The reason we have this as a backend service is so that we are \"good citizens\" of the internet and cache our result, only making a query every 1 minute or so to the external service from our backend, and not every minute for every cloudspace we have running.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_check_external_service_status(async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_check_external_service_status_with_http_info(self, **kwargs) -> 'V1CheckExternalServiceStatusResponse':  # noqa: E501
        """Endpoint for checking GitHub status so we can show an error \"it's not our fault\" when GitHub is down and stuff starts breaking for our users.  # noqa: E501

        The reason we have this as a backend service is so that we are \"good citizens\" of the internet and cache our result, only making a query every 1 minute or so to the external service from our backend, and not every minute for every cloudspace we have running.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_check_external_service_status_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1CheckExternalServiceStatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # 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 cloud_space_service_check_external_service_status" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        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/check-external-service-status', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CheckExternalServiceStatusResponse',  # 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 cloud_space_service_create_cloud_space(self, body: 'ProjectIdCloudspacesBody', project_id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_create_cloud_space  # noqa: E501

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

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

    def cloud_space_service_create_cloud_space_with_http_info(self, body: 'ProjectIdCloudspacesBody', project_id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_create_cloud_space  # noqa: E501

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

        :param async_req bool
        :param ProjectIdCloudspacesBody body: (required)
        :param str project_id: (required)
        :return: V1CloudSpace
                 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 cloud_space_service_create_cloud_space" % 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 `cloud_space_service_create_cloud_space`")  # 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 `cloud_space_service_create_cloud_space`")  # 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}/cloudspaces', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpace',  # 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 cloud_space_service_create_cloud_space_app(self, body: 'V1CloudSpaceApp', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_create_cloud_space_app  # noqa: E501

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

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

    def cloud_space_service_create_cloud_space_app_with_http_info(self, body: 'V1CloudSpaceApp', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_create_cloud_space_app  # noqa: E501

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

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

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method cloud_space_service_create_cloud_space_app" % 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 `cloud_space_service_create_cloud_space_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/cloudspaces/apps', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceApp',  # 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 cloud_space_service_create_cloud_space_app_instance(self, body: 'AppsIdBody1', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1CreateCloudSpaceAppInstanceResponse':  # noqa: E501
        """cloud_space_service_create_cloud_space_app_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.cloud_space_service_create_cloud_space_app_instance(body, project_id, cloudspace_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_create_cloud_space_app_instance_with_http_info(self, body: 'AppsIdBody1', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1CreateCloudSpaceAppInstanceResponse':  # noqa: E501
        """cloud_space_service_create_cloud_space_app_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.cloud_space_service_create_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/apps/{id}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CreateCloudSpaceAppInstanceResponse',  # 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 cloud_space_service_create_cloud_space_instance_metric(self, body: 'CloudspaceIdMetricBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1CreateCloudSpaceInstanceMetricResponse':  # noqa: E501
        """Endpoint for collecting Studio startup 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.cloud_space_service_create_cloud_space_instance_metric(body, project_id, cloudspace_id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_create_cloud_space_instance_metric_with_http_info(self, body: 'CloudspaceIdMetricBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1CreateCloudSpaceInstanceMetricResponse':  # noqa: E501
        """Endpoint for collecting Studio startup 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.cloud_space_service_create_cloud_space_instance_metric_with_http_info(body, project_id, cloudspace_id, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/metric', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CreateCloudSpaceInstanceMetricResponse',  # 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 cloud_space_service_create_lightning_run(self, body: 'CloudspaceIdRunsBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1LightningRun':  # noqa: E501
        """cloud_space_service_create_lightning_run  # noqa: E501

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

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

    def cloud_space_service_create_lightning_run_with_http_info(self, body: 'CloudspaceIdRunsBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1LightningRun':  # noqa: E501
        """cloud_space_service_create_lightning_run  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/runs', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1LightningRun',  # 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 cloud_space_service_create_lightning_run_instance(self, body: 'IdGetBody1', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """cloud_space_service_create_lightning_run_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.cloud_space_service_create_lightning_run_instance(body, project_id, cloudspace_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdGetBody1 body: (required)
        :param str project_id: (required)
        :param str cloudspace_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.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs)  # noqa: E501
            return data

    def cloud_space_service_create_lightning_run_instance_with_http_info(self, body: 'IdGetBody1', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance':  # noqa: E501
        """cloud_space_service_create_lightning_run_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.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/runs/{id}/get', '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 cloud_space_service_delete_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse':  # noqa: E501
        """cloud_space_service_delete_cloud_space  # noqa: E501

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

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

    def cloud_space_service_delete_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse':  # noqa: E501
        """cloud_space_service_delete_cloud_space  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_delete_cloud_space_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: V1DeleteCloudSpaceResponse
                 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 cloud_space_service_delete_cloud_space" % 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 `cloud_space_service_delete_cloud_space`")  # 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 `cloud_space_service_delete_cloud_space`")  # 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}/cloudspaces/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteCloudSpaceResponse',  # 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 cloud_space_service_delete_cloud_space_app(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceAppResponse':  # noqa: E501
        """cloud_space_service_delete_cloud_space_app  # noqa: E501

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

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

    def cloud_space_service_delete_cloud_space_app_with_http_info(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceAppResponse':  # noqa: E501
        """cloud_space_service_delete_cloud_space_app  # noqa: E501

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

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

        all_params = ['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 cloud_space_service_delete_cloud_space_app" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `cloud_space_service_delete_cloud_space_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        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/cloudspaces/apps/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteCloudSpaceAppResponse',  # 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 cloud_space_service_delete_lightning_run(self, project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningRunResponse':  # noqa: E501
        """cloud_space_service_delete_lightning_run  # noqa: E501

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

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

    def cloud_space_service_delete_lightning_run_with_http_info(self, project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningRunResponse':  # noqa: E501
        """cloud_space_service_delete_lightning_run  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/runs/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteLightningRunResponse',  # 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 cloud_space_service_engage_cloud_space(self, body: 'IdEngageBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse':  # noqa: E501
        """cloud_space_service_engage_cloud_space  # noqa: E501

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

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

    def cloud_space_service_engage_cloud_space_with_http_info(self, body: 'IdEngageBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse':  # noqa: E501
        """cloud_space_service_engage_cloud_space  # noqa: E501

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

        :param async_req bool
        :param IdEngageBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1CloudSpaceEngagementResponse
                 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 cloud_space_service_engage_cloud_space" % 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 `cloud_space_service_engage_cloud_space`")  # 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 `cloud_space_service_engage_cloud_space`")  # 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 `cloud_space_service_engage_cloud_space`")  # 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}/cloudspaces/{id}/engage', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceEngagementResponse',  # 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 cloud_space_service_execute_command_in_cloud_space(self, body: 'IdExecuteBody', project_id: 'str', id: 'str', **kwargs) -> 'V1ExecuteCloudSpaceCommandResponse':  # noqa: E501
        """cloud_space_service_execute_command_in_cloud_space  # noqa: E501

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

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

    def cloud_space_service_execute_command_in_cloud_space_with_http_info(self, body: 'IdExecuteBody', project_id: 'str', id: 'str', **kwargs) -> 'V1ExecuteCloudSpaceCommandResponse':  # noqa: E501
        """cloud_space_service_execute_command_in_cloud_space  # noqa: E501

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

        :param async_req bool
        :param IdExecuteBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1ExecuteCloudSpaceCommandResponse
                 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 cloud_space_service_execute_command_in_cloud_space" % 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 `cloud_space_service_execute_command_in_cloud_space`")  # 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 `cloud_space_service_execute_command_in_cloud_space`")  # 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 `cloud_space_service_execute_command_in_cloud_space`")  # 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}/cloudspaces/{id}/execute', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ExecuteCloudSpaceCommandResponse',  # 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 cloud_space_service_execute_plugin(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_execute_plugin  # noqa: E501

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

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

    def cloud_space_service_execute_plugin_with_http_info(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_execute_plugin  # noqa: E501

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

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

        all_params = ['project_id', 'id', 'plugin_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 cloud_space_service_execute_plugin" % 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 `cloud_space_service_execute_plugin`")  # 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 `cloud_space_service_execute_plugin`")  # noqa: E501
        # verify the required parameter 'plugin_id' is set
        if ('plugin_id' not in params or
                params['plugin_id'] is None):
            raise ValueError("Missing the required parameter `plugin_id` when calling `cloud_space_service_execute_plugin`")  # 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
        if 'plugin_id' in params:
            path_params['pluginId'] = params['plugin_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}/cloudspaces/{id}/plugins/{pluginId}/execute', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1Plugin',  # 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 cloud_space_service_fork_cloud_space(self, body: 'IdForkBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_fork_cloud_space  # noqa: E501

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

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

    def cloud_space_service_fork_cloud_space_with_http_info(self, body: 'IdForkBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_fork_cloud_space  # noqa: E501

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

        :param async_req bool
        :param IdForkBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1CloudSpace
                 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 cloud_space_service_fork_cloud_space" % 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 `cloud_space_service_fork_cloud_space`")  # 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 `cloud_space_service_fork_cloud_space`")  # 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 `cloud_space_service_fork_cloud_space`")  # 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}/cloudspaces/{id}/fork', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpace',  # 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 cloud_space_service_get_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_get_cloud_space  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_get_cloud_space  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_get_cloud_space_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: V1CloudSpace
                 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 cloud_space_service_get_cloud_space" % 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 `cloud_space_service_get_cloud_space`")  # 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 `cloud_space_service_get_cloud_space`")  # 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}/cloudspaces/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpace',  # 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 cloud_space_service_get_cloud_space_app(self, id: 'str', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_get_cloud_space_app  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_app_with_http_info(self, id: 'str', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_get_cloud_space_app  # noqa: E501

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

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

        all_params = ['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 cloud_space_service_get_cloud_space_app" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `cloud_space_service_get_cloud_space_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        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/cloudspaces/apps/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceApp',  # 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 cloud_space_service_get_cloud_space_artifacts_page(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetArtifactsPageResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_artifacts_page  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_artifacts_page_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetArtifactsPageResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_artifacts_page  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_get_cloud_space_artifacts_page_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 page_number:
        :param str prefix:
        :param bool include_download_url:
        :param str cluster_id:
        :return: V1GetArtifactsPageResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'page_number', 'prefix', 'include_download_url', 'cluster_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 cloud_space_service_get_cloud_space_artifacts_page" % 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 `cloud_space_service_get_cloud_space_artifacts_page`")  # 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 `cloud_space_service_get_cloud_space_artifacts_page`")  # 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 'page_number' in params:
            query_params.append(('pageNumber', params['page_number']))  # 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
        if 'cluster_id' in params:
            query_params.append(('clusterId', params['cluster_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}/cloudspaces/artifacts/{id}/page', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetArtifactsPageResponse',  # 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 cloud_space_service_get_cloud_space_by_collab_session(self, collab_session_id: 'str', **kwargs) -> 'V1CloudSpaceProjectResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_by_collab_session  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_by_collab_session_with_http_info(self, collab_session_id: 'str', **kwargs) -> 'V1CloudSpaceProjectResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_by_collab_session  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'collab_session_id' in params:
            path_params['collabSessionId'] = params['collab_session_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/collab-sessions/{collabSessionId}/cloudspace', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceProjectResponse',  # 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 cloud_space_service_get_cloud_space_by_name(self, user_name: 'str', project_name: 'str', cloudspace_name: 'str', **kwargs) -> 'V1CloudSpaceProjectResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_by_name  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_by_name_with_http_info(self, user_name: 'str', project_name: 'str', cloudspace_name: 'str', **kwargs) -> 'V1CloudSpaceProjectResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_by_name  # noqa: E501

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

        :param async_req bool
        :param str user_name: (required)
        :param str project_name: (required)
        :param str cloudspace_name: (required)
        :param str project_id:
        :return: V1CloudSpaceProjectResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'user_name' in params:
            path_params['userName'] = params['user_name']  # noqa: E501
        if 'project_name' in params:
            path_params['projectName'] = params['project_name']  # noqa: E501
        if 'cloudspace_name' in params:
            path_params['cloudspaceName'] = params['cloudspace_name']  # noqa: E501

        query_params = []
        if 'project_id' in params:
            query_params.append(('projectId', params['project_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/users/{userName}/projects/{projectName}/cloudspaces/{cloudspaceName}/getbyname', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceProjectResponse',  # 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 cloud_space_service_get_cloud_space_folder_index(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetFolderIndexResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_folder_index  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_folder_index_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetFolderIndexResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_folder_index  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_get_cloud_space_folder_index_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 prefix:
        :param str cluster_id:
        :return: V1GetFolderIndexResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'prefix', 'cluster_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 cloud_space_service_get_cloud_space_folder_index" % 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 `cloud_space_service_get_cloud_space_folder_index`")  # 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 `cloud_space_service_get_cloud_space_folder_index`")  # 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 'prefix' in params:
            query_params.append(('prefix', params['prefix']))  # noqa: E501
        if 'cluster_id' in params:
            query_params.append(('clusterId', params['cluster_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}/cloudspaces/{id}/folder-index', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetFolderIndexResponse',  # 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 cloud_space_service_get_cloud_space_instance_config(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceInstanceConfig':  # noqa: E501
        """cloud_space_service_get_cloud_space_instance_config  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_instance_config_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceInstanceConfig':  # noqa: E501
        """cloud_space_service_get_cloud_space_instance_config  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_get_cloud_space_instance_config_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: V1CloudSpaceInstanceConfig
                 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 cloud_space_service_get_cloud_space_instance_config" % 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 `cloud_space_service_get_cloud_space_instance_config`")  # 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 `cloud_space_service_get_cloud_space_instance_config`")  # 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}/cloudspaces/{id}/codeconfig', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceInstanceConfig',  # 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 cloud_space_service_get_cloud_space_instance_status(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetCloudSpaceInstanceStatusResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_instance_status  # noqa: E501

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

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

    def cloud_space_service_get_cloud_space_instance_status_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetCloudSpaceInstanceStatusResponse':  # noqa: E501
        """cloud_space_service_get_cloud_space_instance_status  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_get_cloud_space_instance_status_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: V1GetCloudSpaceInstanceStatusResponse
                 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 cloud_space_service_get_cloud_space_instance_status" % 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 `cloud_space_service_get_cloud_space_instance_status`")  # 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 `cloud_space_service_get_cloud_space_instance_status`")  # 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}/cloudspaces/{id}/codestatus', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetCloudSpaceInstanceStatusResponse',  # 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 cloud_space_service_get_lightning_run(self, project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1LightningRun':  # noqa: E501
        """cloud_space_service_get_lightning_run  # noqa: E501

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

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

    def cloud_space_service_get_lightning_run_with_http_info(self, project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1LightningRun':  # noqa: E501
        """cloud_space_service_get_lightning_run  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/runs/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1LightningRun',  # 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 cloud_space_service_get_lightning_run_source_code_download_url(self, project_id: 'str', cloudspace_id: 'str', run_id: 'str', **kwargs) -> 'V1GetLightningRunSourceCodeDownloadUrlResponse':  # noqa: E501
        """cloud_space_service_get_lightning_run_source_code_download_url  # noqa: E501

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

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

    def cloud_space_service_get_lightning_run_source_code_download_url_with_http_info(self, project_id: 'str', cloudspace_id: 'str', run_id: 'str', **kwargs) -> 'V1GetLightningRunSourceCodeDownloadUrlResponse':  # noqa: E501
        """cloud_space_service_get_lightning_run_source_code_download_url  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_id']  # noqa: E501
        if 'run_id' in params:
            path_params['runId'] = params['run_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}/cloudspaces/{cloudspaceId}/runs/{runId}/source-code', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetLightningRunSourceCodeDownloadUrlResponse',  # 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 cloud_space_service_install_plugin(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_install_plugin  # noqa: E501

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

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

    def cloud_space_service_install_plugin_with_http_info(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_install_plugin  # noqa: E501

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

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

        all_params = ['project_id', 'id', 'plugin_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 cloud_space_service_install_plugin" % 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 `cloud_space_service_install_plugin`")  # 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 `cloud_space_service_install_plugin`")  # noqa: E501
        # verify the required parameter 'plugin_id' is set
        if ('plugin_id' not in params or
                params['plugin_id'] is None):
            raise ValueError("Missing the required parameter `plugin_id` when calling `cloud_space_service_install_plugin`")  # 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
        if 'plugin_id' in params:
            path_params['pluginId'] = params['plugin_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}/cloudspaces/{id}/plugins/{pluginId}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1Plugin',  # 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 cloud_space_service_invalidate_cloud_space_instance_code_settings(self, project_id: 'str', id: 'str', **kwargs) -> 'V1InvalidateCloudSpaceInstanceCodeSettingsResponse':  # noqa: E501
        """cloud_space_service_invalidate_cloud_space_instance_code_settings  # noqa: E501

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

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

    def cloud_space_service_invalidate_cloud_space_instance_code_settings_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1InvalidateCloudSpaceInstanceCodeSettingsResponse':  # noqa: E501
        """cloud_space_service_invalidate_cloud_space_instance_code_settings  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_invalidate_cloud_space_instance_code_settings_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: V1InvalidateCloudSpaceInstanceCodeSettingsResponse
                 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 cloud_space_service_invalidate_cloud_space_instance_code_settings" % 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 `cloud_space_service_invalidate_cloud_space_instance_code_settings`")  # 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 `cloud_space_service_invalidate_cloud_space_instance_code_settings`")  # 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}/cloudspaces/{id}/invalidate-code-settings', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1InvalidateCloudSpaceInstanceCodeSettingsResponse',  # 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 cloud_space_service_keep_alive_cloud_space_instance(self, body: 'object', project_id: 'str', id: 'str', **kwargs) -> 'V1KeepAliveCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_keep_alive_cloud_space_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.cloud_space_service_keep_alive_cloud_space_instance(body, project_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_keep_alive_cloud_space_instance_with_http_info(self, body: 'object', project_id: 'str', id: 'str', **kwargs) -> 'V1KeepAliveCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_keep_alive_cloud_space_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.cloud_space_service_keep_alive_cloud_space_instance_with_http_info(body, project_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param object body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1KeepAliveCloudSpaceInstanceResponse
                 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 cloud_space_service_keep_alive_cloud_space_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 `cloud_space_service_keep_alive_cloud_space_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 `cloud_space_service_keep_alive_cloud_space_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 `cloud_space_service_keep_alive_cloud_space_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}/cloudspaces/{id}/keep-alive', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1KeepAliveCloudSpaceInstanceResponse',  # 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 cloud_space_service_list_available_plugins(self, **kwargs) -> 'V1PluginsListResponse':  # noqa: E501
        """cloud_space_service_list_available_plugins  # noqa: E501

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

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

    def cloud_space_service_list_available_plugins_with_http_info(self, **kwargs) -> 'V1PluginsListResponse':  # noqa: E501
        """cloud_space_service_list_available_plugins  # noqa: E501

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

        :param async_req bool
        :param str project_id:
        :param str id:
        :return: V1PluginsListResponse
                 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 cloud_space_service_list_available_plugins" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'project_id' in params:
            query_params.append(('projectId', params['project_id']))  # noqa: E501
        if 'id' in params:
            query_params.append(('id', params['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/cloudspaces/plugins', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PluginsListResponse',  # 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 cloud_space_service_list_cloud_space_apps(self, **kwargs) -> 'V1ListCloudSpaceAppsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_apps  # noqa: E501

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

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

    def cloud_space_service_list_cloud_space_apps_with_http_info(self, **kwargs) -> 'V1ListCloudSpaceAppsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_apps  # noqa: E501

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

        :param async_req bool
        :param str org_id:
        :param str project_id:
        :param str user_id:
        :return: V1ListCloudSpaceAppsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_id', 'project_id', 'user_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 cloud_space_service_list_cloud_space_apps" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'org_id' in params:
            query_params.append(('orgId', params['org_id']))  # noqa: E501
        if 'project_id' in params:
            query_params.append(('projectId', params['project_id']))  # noqa: E501
        if 'user_id' in params:
            query_params.append(('userId', params['user_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/cloudspaces/apps', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListCloudSpaceAppsResponse',  # 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 cloud_space_service_list_cloud_space_publications(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListCloudSpacePublicationsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_publications  # noqa: E501

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

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

    def cloud_space_service_list_cloud_space_publications_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListCloudSpacePublicationsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_publications  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_list_cloud_space_publications_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: V1ListCloudSpacePublicationsResponse
                 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 cloud_space_service_list_cloud_space_publications" % 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 `cloud_space_service_list_cloud_space_publications`")  # 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 `cloud_space_service_list_cloud_space_publications`")  # 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}/cloudspaces/{id}/publications', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListCloudSpacePublicationsResponse',  # 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 cloud_space_service_list_cloud_space_tags(self, **kwargs) -> 'V1ListCloudSpaceTagsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_tags  # noqa: E501

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

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

    def cloud_space_service_list_cloud_space_tags_with_http_info(self, **kwargs) -> 'V1ListCloudSpaceTagsResponse':  # noqa: E501
        """cloud_space_service_list_cloud_space_tags  # noqa: E501

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

        :param async_req bool
        :return: V1ListCloudSpaceTagsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # 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 cloud_space_service_list_cloud_space_tags" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        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/cloudspaces/tags', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListCloudSpaceTagsResponse',  # 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 cloud_space_service_list_cloud_spaces(self, project_id: 'str', **kwargs) -> 'V1ListCloudSpacesResponse':  # noqa: E501
        """cloud_space_service_list_cloud_spaces  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_list_cloud_spaces(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 limit:
        :param str name:
        :param str user_id:
        :return: V1ListCloudSpacesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cloud_space_service_list_cloud_spaces_with_http_info(project_id, **kwargs)  # noqa: E501
        else:
            (data) = self.cloud_space_service_list_cloud_spaces_with_http_info(project_id, **kwargs)  # noqa: E501
            return data

    def cloud_space_service_list_cloud_spaces_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListCloudSpacesResponse':  # noqa: E501
        """cloud_space_service_list_cloud_spaces  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_list_cloud_spaces_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 limit:
        :param str name:
        :param str user_id:
        :return: V1ListCloudSpacesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'cluster_id', 'page_token', 'limit', 'name', 'user_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 cloud_space_service_list_cloud_spaces" % 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 `cloud_space_service_list_cloud_spaces`")  # 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 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'user_id' in params:
            query_params.append(('userId', params['user_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}/cloudspaces', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListCloudSpacesResponse',  # 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 cloud_space_service_list_installed_plugins(self, project_id: 'str', id: 'str', **kwargs) -> 'V1PluginsListResponse':  # noqa: E501
        """cloud_space_service_list_installed_plugins  # noqa: E501

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

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

    def cloud_space_service_list_installed_plugins_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1PluginsListResponse':  # noqa: E501
        """cloud_space_service_list_installed_plugins  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_list_installed_plugins_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: V1PluginsListResponse
                 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 cloud_space_service_list_installed_plugins" % 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 `cloud_space_service_list_installed_plugins`")  # 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 `cloud_space_service_list_installed_plugins`")  # 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}/cloudspaces/{id}/plugins', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PluginsListResponse',  # 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 cloud_space_service_list_lightning_runs(self, project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1ListLightningRunResponse':  # noqa: E501
        """cloud_space_service_list_lightning_runs  # noqa: E501

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

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

    def cloud_space_service_list_lightning_runs_with_http_info(self, project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1ListLightningRunResponse':  # noqa: E501
        """cloud_space_service_list_lightning_runs  # noqa: E501

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

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

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

        collection_formats = {}

        path_params = {}
        if 'project_id' in params:
            path_params['projectId'] = params['project_id']  # noqa: E501
        if 'cloudspace_id' in params:
            path_params['cloudspaceId'] = params['cloudspace_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}/cloudspaces/{cloudspaceId}/runs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListLightningRunResponse',  # 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 cloud_space_service_list_published_cloud_spaces(self, **kwargs) -> 'V1ListPublishedCloudSpacesResponse':  # noqa: E501
        """cloud_space_service_list_published_cloud_spaces  # noqa: E501

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

        :param async_req bool
        :param str username:
        :param str search_query:
        :param str page_token:
        :param str limit:
        :param str sort_by:
        :param str org_id:
        :param str tag:
        :return: V1ListPublishedCloudSpacesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cloud_space_service_list_published_cloud_spaces_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.cloud_space_service_list_published_cloud_spaces_with_http_info(**kwargs)  # noqa: E501
            return data

    def cloud_space_service_list_published_cloud_spaces_with_http_info(self, **kwargs) -> 'V1ListPublishedCloudSpacesResponse':  # noqa: E501
        """cloud_space_service_list_published_cloud_spaces  # noqa: E501

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

        :param async_req bool
        :param str username:
        :param str search_query:
        :param str page_token:
        :param str limit:
        :param str sort_by:
        :param str org_id:
        :param str tag:
        :return: V1ListPublishedCloudSpacesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['username', 'search_query', 'page_token', 'limit', 'sort_by', 'org_id', 'tag']  # 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 cloud_space_service_list_published_cloud_spaces" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'search_query' in params:
            query_params.append(('searchQuery', params['search_query']))  # noqa: E501
        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 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'org_id' in params:
            query_params.append(('orgId', params['org_id']))  # noqa: E501
        if 'tag' in params:
            query_params.append(('tag', params['tag']))  # 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/cloudspaces/published', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ListPublishedCloudSpacesResponse',  # 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 cloud_space_service_publish_cloud_space(self, body: 'IdPublicationsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1PublishCloudSpaceResponse':  # noqa: E501
        """TODO(yurij/karolis): update these methods to allow publishing globally in addition to orgs and remove the \"is_published\" field from CloudSpace proto  # noqa: E501

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

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

    def cloud_space_service_publish_cloud_space_with_http_info(self, body: 'IdPublicationsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1PublishCloudSpaceResponse':  # noqa: E501
        """TODO(yurij/karolis): update these methods to allow publishing globally in addition to orgs and remove the \"is_published\" field from CloudSpace proto  # noqa: E501

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

        :param async_req bool
        :param IdPublicationsBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1PublishCloudSpaceResponse
                 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 cloud_space_service_publish_cloud_space" % 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 `cloud_space_service_publish_cloud_space`")  # 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 `cloud_space_service_publish_cloud_space`")  # 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 `cloud_space_service_publish_cloud_space`")  # 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}/cloudspaces/{id}/publications', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PublishCloudSpaceResponse',  # 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 cloud_space_service_refresh_cloud_space_index(self, body: 'IdIndexBody', project_id: 'str', id: 'str', **kwargs) -> 'V1RefreshIndexResponse':  # noqa: E501
        """cloud_space_service_refresh_cloud_space_index  # noqa: E501

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

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

    def cloud_space_service_refresh_cloud_space_index_with_http_info(self, body: 'IdIndexBody', project_id: 'str', id: 'str', **kwargs) -> 'V1RefreshIndexResponse':  # noqa: E501
        """cloud_space_service_refresh_cloud_space_index  # noqa: E501

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

        :param async_req bool
        :param IdIndexBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1RefreshIndexResponse
                 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 cloud_space_service_refresh_cloud_space_index" % 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 `cloud_space_service_refresh_cloud_space_index`")  # 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 `cloud_space_service_refresh_cloud_space_index`")  # 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 `cloud_space_service_refresh_cloud_space_index`")  # 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}/cloudspaces/{id}/index', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1RefreshIndexResponse',  # 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 cloud_space_service_restart_cloud_space_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'V1RestartCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_restart_cloud_space_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.cloud_space_service_restart_cloud_space_instance(project_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_restart_cloud_space_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1RestartCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_restart_cloud_space_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.cloud_space_service_restart_cloud_space_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: V1RestartCloudSpaceInstanceResponse
                 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 cloud_space_service_restart_cloud_space_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 `cloud_space_service_restart_cloud_space_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 `cloud_space_service_restart_cloud_space_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}/cloudspaces/{id}/restart', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1RestartCloudSpaceInstanceResponse',  # 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 cloud_space_service_start_cloud_space_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'V1StartCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_start_cloud_space_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.cloud_space_service_start_cloud_space_instance(project_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_start_cloud_space_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1StartCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_start_cloud_space_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.cloud_space_service_start_cloud_space_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: V1StartCloudSpaceInstanceResponse
                 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 cloud_space_service_start_cloud_space_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 `cloud_space_service_start_cloud_space_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 `cloud_space_service_start_cloud_space_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}/cloudspaces/{id}/start', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1StartCloudSpaceInstanceResponse',  # 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 cloud_space_service_stop_cloud_space_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'V1StopCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_stop_cloud_space_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.cloud_space_service_stop_cloud_space_instance(project_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_stop_cloud_space_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1StopCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_stop_cloud_space_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.cloud_space_service_stop_cloud_space_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: V1StopCloudSpaceInstanceResponse
                 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 cloud_space_service_stop_cloud_space_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 `cloud_space_service_stop_cloud_space_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 `cloud_space_service_stop_cloud_space_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}/cloudspaces/{id}/stop', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1StopCloudSpaceInstanceResponse',  # 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 cloud_space_service_switch_cloud_space_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'V1SwitchCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_switch_cloud_space_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.cloud_space_service_switch_cloud_space_instance(project_id, id, async_req=True)
        >>> result = thread.get()

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

    def cloud_space_service_switch_cloud_space_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1SwitchCloudSpaceInstanceResponse':  # noqa: E501
        """cloud_space_service_switch_cloud_space_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.cloud_space_service_switch_cloud_space_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: V1SwitchCloudSpaceInstanceResponse
                 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 cloud_space_service_switch_cloud_space_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 `cloud_space_service_switch_cloud_space_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 `cloud_space_service_switch_cloud_space_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}/cloudspaces/{id}/switch-confirm', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1SwitchCloudSpaceInstanceResponse',  # 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 cloud_space_service_uninstall_plugin(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_uninstall_plugin  # noqa: E501

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

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

    def cloud_space_service_uninstall_plugin_with_http_info(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin':  # noqa: E501
        """cloud_space_service_uninstall_plugin  # noqa: E501

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

        :param async_req bool
        :param str project_id: (required)
        :param str id: (required)
        :param str plugin_id: (required)
        :param str state:
        :param str error:
        :param str additional_info:
        :return: V1Plugin
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'plugin_id', 'state', 'error', 'additional_info']  # 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 cloud_space_service_uninstall_plugin" % 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 `cloud_space_service_uninstall_plugin`")  # 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 `cloud_space_service_uninstall_plugin`")  # noqa: E501
        # verify the required parameter 'plugin_id' is set
        if ('plugin_id' not in params or
                params['plugin_id'] is None):
            raise ValueError("Missing the required parameter `plugin_id` when calling `cloud_space_service_uninstall_plugin`")  # 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
        if 'plugin_id' in params:
            path_params['pluginId'] = params['plugin_id']  # noqa: E501

        query_params = []
        if 'state' in params:
            query_params.append(('state', params['state']))  # noqa: E501
        if 'error' in params:
            query_params.append(('error', params['error']))  # noqa: E501
        if 'additional_info' in params:
            query_params.append(('additionalInfo', params['additional_info']))  # 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}/cloudspaces/{id}/plugins/{pluginId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1Plugin',  # 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 cloud_space_service_unpublish_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1UnpublishCloudSpaceResponse':  # noqa: E501
        """cloud_space_service_unpublish_cloud_space  # noqa: E501

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

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

    def cloud_space_service_unpublish_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1UnpublishCloudSpaceResponse':  # noqa: E501
        """cloud_space_service_unpublish_cloud_space  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cloud_space_service_unpublish_cloud_space_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 org_id:
        :return: V1UnpublishCloudSpaceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['project_id', 'id', 'org_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 cloud_space_service_unpublish_cloud_space" % 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 `cloud_space_service_unpublish_cloud_space`")  # 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 `cloud_space_service_unpublish_cloud_space`")  # 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 'org_id' in params:
            query_params.append(('orgId', params['org_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}/cloudspaces/{id}/publications', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UnpublishCloudSpaceResponse',  # 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 cloud_space_service_update_cloud_space(self, body: 'CloudspacesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_update_cloud_space  # noqa: E501

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

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

    def cloud_space_service_update_cloud_space_with_http_info(self, body: 'CloudspacesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace':  # noqa: E501
        """cloud_space_service_update_cloud_space  # noqa: E501

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

        :param async_req bool
        :param CloudspacesIdBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1CloudSpace
                 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 cloud_space_service_update_cloud_space" % 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 `cloud_space_service_update_cloud_space`")  # 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 `cloud_space_service_update_cloud_space`")  # 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 `cloud_space_service_update_cloud_space`")  # 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}/cloudspaces/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpace',  # 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 cloud_space_service_update_cloud_space_app(self, body: 'AppsIdBody', id: 'str', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_update_cloud_space_app  # noqa: E501

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

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

    def cloud_space_service_update_cloud_space_app_with_http_info(self, body: 'AppsIdBody', id: 'str', **kwargs) -> 'V1CloudSpaceApp':  # noqa: E501
        """cloud_space_service_update_cloud_space_app  # noqa: E501

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

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

        all_params = ['body', '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 cloud_space_service_update_cloud_space_app" % 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 `cloud_space_service_update_cloud_space_app`")  # 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 `cloud_space_service_update_cloud_space_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        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/cloudspaces/apps/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceApp',  # 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 cloud_space_service_update_cloud_space_collab(self, body: 'IdCollaborateBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UpdateCloudSpaceCollabResponse':  # noqa: E501
        """cloud_space_service_update_cloud_space_collab  # noqa: E501

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

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

    def cloud_space_service_update_cloud_space_collab_with_http_info(self, body: 'IdCollaborateBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UpdateCloudSpaceCollabResponse':  # noqa: E501
        """cloud_space_service_update_cloud_space_collab  # noqa: E501

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

        :param async_req bool
        :param IdCollaborateBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1UpdateCloudSpaceCollabResponse
                 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 cloud_space_service_update_cloud_space_collab" % 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 `cloud_space_service_update_cloud_space_collab`")  # 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 `cloud_space_service_update_cloud_space_collab`")  # 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 `cloud_space_service_update_cloud_space_collab`")  # 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}/cloudspaces/{id}/collaborate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UpdateCloudSpaceCollabResponse',  # 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 cloud_space_service_update_cloud_space_instance_config(self, body: 'IdCodeconfigBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceInstanceConfig':  # noqa: E501
        """cloud_space_service_update_cloud_space_instance_config  # noqa: E501

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

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

    def cloud_space_service_update_cloud_space_instance_config_with_http_info(self, body: 'IdCodeconfigBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceInstanceConfig':  # noqa: E501
        """cloud_space_service_update_cloud_space_instance_config  # noqa: E501

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

        :param async_req bool
        :param IdCodeconfigBody body: (required)
        :param str project_id: (required)
        :param str id: (required)
        :return: V1CloudSpaceInstanceConfig
                 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 cloud_space_service_update_cloud_space_instance_config" % 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 `cloud_space_service_update_cloud_space_instance_config`")  # 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 `cloud_space_service_update_cloud_space_instance_config`")  # 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 `cloud_space_service_update_cloud_space_instance_config`")  # 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}/cloudspaces/{id}/codeconfig', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CloudSpaceInstanceConfig',  # 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)
