# coding: utf-8

"""
    Domino Volumes for NetApp ONTAP Microservice API

    Microservice responsible for managing Domino Volumes for NetApp ONTAP feature  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: support@dominodatalab.com
    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 remotefs_api_client.api_client import ApiClient


class VolumesApi(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 account_authz_permissions_volumeid_post(self, body, id, **kwargs):  # noqa: E501
        """Get if user has all provided volume permissions  # noqa: E501

        Get if user has all provided volume permissions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.account_authz_permissions_volumeid_post(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumePermissionsRequest body: Volume permissions and user to check against (required)
        :param str id: ID of Volume to check permissions against (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.account_authz_permissions_volumeid_post_with_http_info(
                body, id, **kwargs
            )  # noqa: E501
        else:
            (data) = self.account_authz_permissions_volumeid_post_with_http_info(
                body, id, **kwargs
            )  # noqa: E501
            return data

    def account_authz_permissions_volumeid_post_with_http_info(
        self, body, id, **kwargs
    ):  # noqa: E501
        """Get if user has all provided volume permissions  # noqa: E501

        Get if user has all provided volume permissions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.account_authz_permissions_volumeid_post_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumePermissionsRequest body: Volume permissions and user to check against (required)
        :param str id: ID of Volume to check permissions against (required)
        :return: bool
                 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 account_authz_permissions_volumeid_post" % 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 `account_authz_permissions_volumeid_post`"
            )  # 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 `account_authz_permissions_volumeid_post`"
            )  # 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(
            "/account/authz/permissions/volume/:id",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="bool",  # 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 rpc_attach_volume_to_project_post(self, body, **kwargs):  # noqa: E501
        """Attach volume to project  # noqa: E501

        Attach volume to project  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_attach_volume_to_project_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeProject body: Project ID to attach to Volume ID (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.rpc_attach_volume_to_project_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
        else:
            (data) = self.rpc_attach_volume_to_project_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
            return data

    def rpc_attach_volume_to_project_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Attach volume to project  # noqa: E501

        Attach volume to project  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_attach_volume_to_project_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeProject body: Project ID to attach to Volume ID (required)
        :return: RemotefsVolume
                 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 rpc_attach_volume_to_project_post" % 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 `rpc_attach_volume_to_project_post`"
            )  # 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(
            "/rpc/attach-volume-to-project",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 rpc_check_is_over_limit_post(self, **kwargs):  # noqa: E501
        """Check whether requesting user is over allowed volume limit  # noqa: E501

        Check whether requesting user is over allowed volume limit  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_check_is_over_limit_post(async_req=True)
        >>> result = thread.get()

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

    def rpc_check_is_over_limit_post_with_http_info(self, **kwargs):  # noqa: E501
        """Check whether requesting user is over allowed volume limit  # noqa: E501

        Check whether requesting user is over allowed volume limit  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_check_is_over_limit_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: bool
                 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 rpc_check_is_over_limit_post" % 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(
            "/rpc/check-is-over-limit",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="bool",  # 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 rpc_delete_volume_post(self, body, **kwargs):  # noqa: E501
        """Delete volume by ID  # noqa: E501

        Delete a volume 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.rpc_delete_volume_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to delete (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.rpc_delete_volume_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.rpc_delete_volume_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def rpc_delete_volume_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Delete volume by ID  # noqa: E501

        Delete a volume 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.rpc_delete_volume_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to delete (required)
        :return: None
                 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 rpc_delete_volume_post" % 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 `rpc_delete_volume_post`"
            )  # 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(
            "/rpc/delete-volume",
            "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=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 rpc_detach_volume_from_project_post(self, body, **kwargs):  # noqa: E501
        """Detach volume from project  # noqa: E501

        Detach volume from project  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_detach_volume_from_project_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeProject body: Project ID to detach from Volume ID (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.rpc_detach_volume_from_project_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
        else:
            (data) = self.rpc_detach_volume_from_project_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
            return data

    def rpc_detach_volume_from_project_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Detach volume from project  # noqa: E501

        Detach volume from project  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_detach_volume_from_project_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeProject body: Project ID to detach from Volume ID (required)
        :return: RemotefsVolume
                 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 rpc_detach_volume_from_project_post" % 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 `rpc_detach_volume_from_project_post`"
            )  # 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(
            "/rpc/detach-volume-from-project",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 rpc_get_volume_mounts_post(self, body, **kwargs):  # noqa: E501
        """Get volume mounts by project ID  # noqa: E501

        Get volume and snapshot mounts by project ID and optional data plane ID or volume 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.rpc_get_volume_mounts_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerListVolumeMountsRequest body: Filters to apply to returned volume mounts (required)
        :return: list[RemotefsVolumeMount]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.rpc_get_volume_mounts_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.rpc_get_volume_mounts_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def rpc_get_volume_mounts_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Get volume mounts by project ID  # noqa: E501

        Get volume and snapshot mounts by project ID and optional data plane ID or volume 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.rpc_get_volume_mounts_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerListVolumeMountsRequest body: Filters to apply to returned volume mounts (required)
        :return: list[RemotefsVolumeMount]
                 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 rpc_get_volume_mounts_post" % 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 `rpc_get_volume_mounts_post`"
            )  # 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(
            "/rpc/get-volume-mounts",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[RemotefsVolumeMount]",  # 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 rpc_mark_volume_for_deletion_post(self, body, **kwargs):  # noqa: E501
        """Mark volume for deletion  # noqa: E501

        Mark volume for deletion  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_mark_volume_for_deletion_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to mark for deletion (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.rpc_mark_volume_for_deletion_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
        else:
            (data) = self.rpc_mark_volume_for_deletion_post_with_http_info(
                body, **kwargs
            )  # noqa: E501
            return data

    def rpc_mark_volume_for_deletion_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Mark volume for deletion  # noqa: E501

        Mark volume for deletion  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_mark_volume_for_deletion_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to mark for deletion (required)
        :return: RemotefsVolume
                 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 rpc_mark_volume_for_deletion_post" % 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 `rpc_mark_volume_for_deletion_post`"
            )  # 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(
            "/rpc/mark-volume-for-deletion",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 rpc_restore_volume_post(self, body, **kwargs):  # noqa: E501
        """Restore volume to active state  # noqa: E501

        Restore volume to active state  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_restore_volume_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to restore to active state (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.rpc_restore_volume_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.rpc_restore_volume_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def rpc_restore_volume_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Restore volume to active state  # noqa: E501

        Restore volume to active state  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rpc_restore_volume_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerVolumeIDRequest body: Volume ID to restore to active state (required)
        :return: RemotefsVolume
                 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 rpc_restore_volume_post" % 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 `rpc_restore_volume_post`"
            )  # 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(
            "/rpc/restore-volume",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 staging_volume_get(self, **kwargs):  # noqa: E501
        """Get domino staging volume name  # noqa: E501

        Get domino staging volume 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.staging_volume_get(async_req=True)
        >>> result = thread.get()

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

    def staging_volume_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get domino staging volume name  # noqa: E501

        Get domino staging volume 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.staging_volume_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 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 staging_volume_get" % 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(
            "/staging-volume",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="str",  # 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 volumes_get(self, **kwargs):  # noqa: E501
        """List volumes  # noqa: E501

        List volumes  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int limit: Limit
        :param int offset: Offset
        :param str order: Order
        :param str search: Search
        :param str sort_by: Sort by
        :param bool filter_strictly_by_volume_roles: Filter strictly by volume roles
        :param list[str] project_id: Project ID
        :param list[str] data_plane_id: Data Plane ID
        :param list[str] status: Status
        :return: ServerPaginatedVolumes
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.volumes_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.volumes_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def volumes_get_with_http_info(self, **kwargs):  # noqa: E501
        """List volumes  # noqa: E501

        List volumes  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int limit: Limit
        :param int offset: Offset
        :param str order: Order
        :param str search: Search
        :param str sort_by: Sort by
        :param bool filter_strictly_by_volume_roles: Filter strictly by volume roles
        :param list[str] project_id: Project ID
        :param list[str] data_plane_id: Data Plane ID
        :param list[str] status: Status
        :return: ServerPaginatedVolumes
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "limit",
            "offset",
            "order",
            "search",
            "sort_by",
            "filter_strictly_by_volume_roles",
            "project_id",
            "data_plane_id",
            "status",
        ]  # 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 volumes_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "limit" in params:
            query_params.append(("limit", params["limit"]))  # noqa: E501
        if "offset" in params:
            query_params.append(("offset", params["offset"]))  # noqa: E501
        if "order" in params:
            query_params.append(("order", params["order"]))  # noqa: E501
        if "search" in params:
            query_params.append(("search", params["search"]))  # noqa: E501
        if "sort_by" in params:
            query_params.append(("sort_by", params["sort_by"]))  # noqa: E501
        if "filter_strictly_by_volume_roles" in params:
            query_params.append(
                ("filter_strictly_by_volume_roles", params["filter_strictly_by_volume_roles"])
            )  # noqa: E501
        if "project_id" in params:
            query_params.append(("project_id", params["project_id"]))  # noqa: E501
            collection_formats["project_id"] = "multi"  # noqa: E501
        if "data_plane_id" in params:
            query_params.append(("data_plane_id", params["data_plane_id"]))  # noqa: E501
            collection_formats["data_plane_id"] = "multi"  # noqa: E501
        if "status" in params:
            query_params.append(("status", params["status"]))  # noqa: E501
            collection_formats["status"] = "multi"  # 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(
            "/volumes",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ServerPaginatedVolumes",  # 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 volumes_id_connection_snippets_get(self, id, **kwargs):  # noqa: E501
        """Get the connection snippets for a given volume to access as a datasource  # noqa: E501

        Get the connection snippets for a given volume to access as a datasource  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_id_connection_snippets_get(id, async_req=True)
        >>> result = thread.get()

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

    def volumes_id_connection_snippets_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get the connection snippets for a given volume to access as a datasource  # noqa: E501

        Get the connection snippets for a given volume to access as a datasource  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_id_connection_snippets_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Volume ID (required)
        :return: list[RemotefsConnectionSnippet]
                 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 volumes_id_connection_snippets_get" % 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 `volumes_id_connection_snippets_get`"
            )  # 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(
            "/volumes/{id}/connection-snippets",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[RemotefsConnectionSnippet]",  # 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 volumes_id_get(self, id, **kwargs):  # noqa: E501
        """Get volume by ID  # noqa: E501

        Get volume 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.volumes_id_get(id, async_req=True)
        >>> result = thread.get()

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

    def volumes_id_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get volume by ID  # noqa: E501

        Get volume 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.volumes_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: ID of volume to retrieve (required)
        :return: RemotefsVolume
                 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 volumes_id_get" % 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 `volumes_id_get`"
            )  # 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(
            "/volumes/{id}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 volumes_id_grants_get(self, id, **kwargs):  # noqa: E501
        """Get grants by Volume ID  # noqa: E501

        Get grants by Volume 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.volumes_id_grants_get(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: ID of volume to retrieve grants from (required)
        :return: list[RemotefsVolumeGrant]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.volumes_id_grants_get_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.volumes_id_grants_get_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def volumes_id_grants_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get grants by Volume ID  # noqa: E501

        Get grants by Volume 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.volumes_id_grants_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: ID of volume to retrieve grants from (required)
        :return: list[RemotefsVolumeGrant]
                 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 volumes_id_grants_get" % 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 `volumes_id_grants_get`"
            )  # 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(
            "/volumes/{id}/grants",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[RemotefsVolumeGrant]",  # 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 volumes_id_grants_put(self, body, id, **kwargs):  # noqa: E501
        """Update grants by Volume ID  # noqa: E501

        Update grants by Volume 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.volumes_id_grants_put(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RemotefsVolumeGrantDTO] body: New grants to replace current volume grants (required)
        :param str id: ID of volume to update grants (required)
        :return: RemotefsVolumeGrant
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.volumes_id_grants_put_with_http_info(body, id, **kwargs)  # noqa: E501
        else:
            (data) = self.volumes_id_grants_put_with_http_info(body, id, **kwargs)  # noqa: E501
            return data

    def volumes_id_grants_put_with_http_info(self, body, id, **kwargs):  # noqa: E501
        """Update grants by Volume ID  # noqa: E501

        Update grants by Volume 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.volumes_id_grants_put_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RemotefsVolumeGrantDTO] body: New grants to replace current volume grants (required)
        :param str id: ID of volume to update grants (required)
        :return: RemotefsVolumeGrant
                 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 volumes_id_grants_put" % 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 `volumes_id_grants_put`"
            )  # 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 `volumes_id_grants_put`"
            )  # 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(
            "/volumes/{id}/grants",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolumeGrant",  # 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 volumes_id_patch(self, body, id, **kwargs):  # noqa: E501
        """Update Volume  # noqa: E501

        Update Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_id_patch(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeRequest body: Name and description fields to update (required)
        :param str id: ID of volume to retrieve (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.volumes_id_patch_with_http_info(body, id, **kwargs)  # noqa: E501
        else:
            (data) = self.volumes_id_patch_with_http_info(body, id, **kwargs)  # noqa: E501
            return data

    def volumes_id_patch_with_http_info(self, body, id, **kwargs):  # noqa: E501
        """Update Volume  # noqa: E501

        Update Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_id_patch_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerUpdateVolumeRequest body: Name and description fields to update (required)
        :param str id: ID of volume to retrieve (required)
        :return: RemotefsVolume
                 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 volumes_id_patch" % 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 `volumes_id_patch`"
            )  # 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 `volumes_id_patch`"
            )  # 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(
            "/volumes/{id}",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 volumes_post(self, body, **kwargs):  # noqa: E501
        """Create new volume  # noqa: E501

        Create new volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_post(body, async_req=True)
        >>> result = thread.get()

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

    def volumes_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Create new volume  # noqa: E501

        Create new volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.volumes_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServerCreateVolumeRequest body: Volume to create (required)
        :return: RemotefsVolume
                 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 volumes_post" % 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 `volumes_post`"
            )  # 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(
            "/volumes",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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 volumes_unique_name_unique_name_get(self, unique_name, **kwargs):  # noqa: E501
        """Get a volume by unique name  # noqa: E501

        Get a volume by unique 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.volumes_unique_name_unique_name_get(unique_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str unique_name: Unique name of volume to retrieve (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.volumes_unique_name_unique_name_get_with_http_info(
                unique_name, **kwargs
            )  # noqa: E501
        else:
            (data) = self.volumes_unique_name_unique_name_get_with_http_info(
                unique_name, **kwargs
            )  # noqa: E501
            return data

    def volumes_unique_name_unique_name_get_with_http_info(
        self, unique_name, **kwargs
    ):  # noqa: E501
        """Get a volume by unique name  # noqa: E501

        Get a volume by unique 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.volumes_unique_name_unique_name_get_with_http_info(unique_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str unique_name: Unique name of volume to retrieve (required)
        :return: RemotefsVolume
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if "unique_name" in params:
            path_params["uniqueName"] = params["unique_name"]  # 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(
            "/volumes/unique-name/{uniqueName}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="RemotefsVolume",  # 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,
        )
