# coding: utf-8

"""
    Gluster Management API

    Gluster Management APIs  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: you@your-company.com
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from openapi_client.api_client import ApiClient


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

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def snapshot_activate(self, snapname, **kwargs):  # noqa: E501
        """snapshot_activate  # noqa: E501

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

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

    def snapshot_activate_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_activate  # noqa: E501

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

        :param async_req bool
        :param str snapname: (required)
        :param Activate activate:
        :return: CreateResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_activate" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_activate`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'activate' in local_var_params:
            body_params = local_var_params['activate']
        # 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(
            '/snapshots/{snapname}/activate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateResp',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_clone(self, snapname, **kwargs):  # noqa: E501
        """snapshot_clone  # noqa: E501

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

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

    def snapshot_clone_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_clone  # noqa: E501

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

        :param async_req bool
        :param str snapname: (required)
        :param Clone clone:
        :return: Volume
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_clone" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_clone`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'clone' in local_var_params:
            body_params = local_var_params['clone']
        # 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(
            '/snapshots/{snapname}/clone', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Volume',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

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

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

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

    def snapshot_create_with_http_info(self, **kwargs):  # noqa: E501
        """snapshot_create  # noqa: E501

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

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_create" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create' in local_var_params:
            body_params = local_var_params['create']
        # 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(
            '/snapshots', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateResp',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_deactivate(self, snapname, **kwargs):  # noqa: E501
        """snapshot_deactivate  # noqa: E501

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

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

    def snapshot_deactivate_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_deactivate  # noqa: E501

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

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_deactivate" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_deactivate`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # 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(
            '/snapshots/{snapname}/deactivate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateResp',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_delete(self, snapname, **kwargs):  # noqa: E501
        """snapshot_delete  # noqa: E501

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

        :param async_req bool
        :param str snapname: (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.snapshot_delete_with_http_info(snapname, **kwargs)  # noqa: E501
        else:
            (data) = self.snapshot_delete_with_http_info(snapname, **kwargs)  # noqa: E501
            return data

    def snapshot_delete_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_delete  # noqa: E501

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

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_delete" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_delete`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/snapshots/{snapname}', 'DELETE',
            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=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_info  # noqa: E501

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

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

    def snapshot_info_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_info  # noqa: E501

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

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_info" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_info`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # 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(
            '/snapshots/{snapname}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateResp',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

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

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

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

    def snapshot_list_all_with_http_info(self, **kwargs):  # noqa: E501
        """snapshot_list_all  # noqa: E501

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

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

        local_var_params = locals()

        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')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_list_all" % key
                )
            local_var_params[key] = val
        del local_var_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(
            '/snapshots', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SnapList',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_restore(self, snapname, **kwargs):  # noqa: E501
        """snapshot_restore  # noqa: E501

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

        :param async_req bool
        :param str snapname: (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.snapshot_restore_with_http_info(snapname, **kwargs)  # noqa: E501
        else:
            (data) = self.snapshot_restore_with_http_info(snapname, **kwargs)  # noqa: E501
            return data

    def snapshot_restore_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_restore  # noqa: E501

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

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_restore" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_restore`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/snapshots/{snapname}/restore', 'POST',
            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=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def snapshot_status(self, snapname, **kwargs):  # noqa: E501
        """snapshot_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.snapshot_status(snapname, async_req=True)
        >>> result = thread.get()

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

    def snapshot_status_with_http_info(self, snapname, **kwargs):  # noqa: E501
        """snapshot_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.snapshot_status_with_http_info(snapname, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method snapshot_status" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'snapname' is set
        if ('snapname' not in local_var_params or
                local_var_params['snapname'] is None):
            raise ValueError("Missing the required parameter `snapname` when calling `snapshot_status`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapname' in local_var_params:
            path_params['snapname'] = local_var_params['snapname']  # 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(
            '/snapshots/{snapname}/status', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Status',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
