# coding: utf-8

"""
    Octopus Server API

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

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from octopus_deploy_swagger_client.api_client import ApiClient


class VariablesApi(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 custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action  # noqa: E501

        Get list of non-printable variable characters.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action(async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_with_http_info(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action  # noqa: E501

        Get list of non-printable variable characters.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[int]
                 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 custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action" % 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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/nonPrintableChars', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces  # noqa: E501

        Get list of non-printable variable characters.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces_with_http_info(base_space_id, **kwargs)  # noqa: E501
        else:
            (data) = self.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces_with_http_info(base_space_id, **kwargs)  # noqa: E501
            return data

    def custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces_with_http_info(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces  # noqa: E501

        Get list of non-printable variable characters.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_check_for_non_printable_chars_action_spaces_with_http_info(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/nonPrintableChars', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action  # noqa: E501

        List the names of variables that can be used in deployment actions. If a project is specified, this will include variables in that project.  If a project environments filter is specified, project variables only scoped to the environment will be excluded.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action(async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_with_http_info(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action  # noqa: E501

        List the names of variables that can be used in deployment actions. If a project is specified, this will include variables in that project.  If a project environments filter is specified, project variables only scoped to the environment will be excluded.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: None
                 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action" % 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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/names', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces  # noqa: E501

        List the names of variables that can be used in deployment actions. If a project is specified, this will include variables in that project.  If a project environments filter is specified, project variables only scoped to the environment will be excluded.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces(base_space_id, async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces_with_http_info(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces  # noqa: E501

        List the names of variables that can be used in deployment actions. If a project is specified, this will include variables in that project.  If a project environments filter is specified, project variables only scoped to the environment will be excluded.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_names_list_action_spaces_with_http_info(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/names', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action  # noqa: E501

        List the evaluated variables for a deployment.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action(async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_with_http_info(self, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action  # noqa: E501

        List the evaluated variables for a deployment.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: VariableSetResource
                 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action" % 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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/preview', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces  # noqa: E501

        List the evaluated variables for a deployment.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces(base_space_id, async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces_with_http_info(self, base_space_id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces  # noqa: E501

        List the evaluated variables for a deployment.   NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_preview_list_action_spaces_with_http_info(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: VariableSetResource
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/preview', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action(self, id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action  # noqa: E501

        Updates a variable set.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action(id, async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_with_http_info(self, id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action  # noqa: E501

        Updates a variable set.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_with_http_info(id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'library_variable_set_resource']  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action" % 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 `custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action`")  # 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 'library_variable_set_resource' in params:
            body_params = params['library_variable_set_resource']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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 custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces(self, base_space_id, id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces  # noqa: E501

        Updates a variable set.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces(base_space_id, id, async_req=True)
        >>> result = thread.get()

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

    def custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces_with_http_info(self, base_space_id, id, **kwargs):  # noqa: E501
        """custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces  # noqa: E501

        Updates a variable set.  NOTE: This definition is not complete. We will be adding more detail in future releases of Octopus.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custom_action_response_descriptor_octopus_server_web_api_actions_variable_set_update_action_spaces_with_http_info(base_space_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :param str id: ID of the resource (required)
        :return: VariableSetResource
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 'library_variable_set_resource' in params:
            body_params = params['library_variable_set_resource']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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 list_all_response_descriptor_variables_variable_set_variable_set_resource(self, **kwargs):  # noqa: E501
        """Get a list of VariableSetResources  # noqa: E501

        Lists all the variable sets in the supplied Octopus Deploy 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.list_all_response_descriptor_variables_variable_set_variable_set_resource(async_req=True)
        >>> result = thread.get()

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

    def list_all_response_descriptor_variables_variable_set_variable_set_resource_with_http_info(self, **kwargs):  # noqa: E501
        """Get a list of VariableSetResources  # noqa: E501

        Lists all the variable sets in the supplied Octopus Deploy 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.list_all_response_descriptor_variables_variable_set_variable_set_resource_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[VariableSetResource]
                 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 list_all_response_descriptor_variables_variable_set_variable_set_resource" % 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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/all', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[VariableSetResource]',  # 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 list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces(self, base_space_id, **kwargs):  # noqa: E501
        """Get a list of VariableSetResources  # noqa: E501

        Lists all the variable sets in the supplied Octopus Deploy 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.list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: list[VariableSetResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, **kwargs)  # noqa: E501
            return data

    def list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(self, base_space_id, **kwargs):  # noqa: E501
        """Get a list of VariableSetResources  # noqa: E501

        Lists all the variable sets in the supplied Octopus Deploy 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.list_all_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :return: list[VariableSetResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/all', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[VariableSetResource]',  # 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 load_response_descriptor_variables_variable_set_variable_set_resource(self, id, **kwargs):  # noqa: E501
        """Get a VariableSetResource by ID  # noqa: E501

        Gets a variable set by Id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.load_response_descriptor_variables_variable_set_variable_set_resource(id, async_req=True)
        >>> result = thread.get()

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

    def load_response_descriptor_variables_variable_set_variable_set_resource_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a VariableSetResource by ID  # noqa: E501

        Gets a variable set by Id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.load_response_descriptor_variables_variable_set_variable_set_resource_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: ID of the VariableSetResource to load (required)
        :return: VariableSetResource
                 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 load_response_descriptor_variables_variable_set_variable_set_resource" % 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 `load_response_descriptor_variables_variable_set_variable_set_resource`")  # 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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/variables/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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 load_response_descriptor_variables_variable_set_variable_set_resource_spaces(self, base_space_id, id, **kwargs):  # noqa: E501
        """Get a VariableSetResource by ID  # noqa: E501

        Gets a variable set by Id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.load_response_descriptor_variables_variable_set_variable_set_resource_spaces(base_space_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :param str id: ID of the VariableSetResource to load (required)
        :return: VariableSetResource
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.load_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, id, **kwargs)  # noqa: E501
        else:
            (data) = self.load_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, id, **kwargs)  # noqa: E501
            return data

    def load_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(self, base_space_id, id, **kwargs):  # noqa: E501
        """Get a VariableSetResource by ID  # noqa: E501

        Gets a variable set by Id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.load_response_descriptor_variables_variable_set_variable_set_resource_spaces_with_http_info(base_space_id, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str base_space_id: ID of the space (required)
        :param str id: ID of the VariableSetResource to load (required)
        :return: VariableSetResource
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'base_space_id' in params:
            path_params['baseSpaceId'] = params['base_space_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 = ['APIKeyHeader', 'APIKeyQuery', 'NugetApiKeyHeader']  # noqa: E501

        return self.api_client.call_api(
            '/api/{baseSpaceId}/variables/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='VariableSetResource',  # 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)
