# coding: utf-8


"""
IGNORE:
    Nutanix Storage Versioned APIs

    Manages volume groups and storage containers in Nutanix cluster.  # noqa: E501

    OpenAPI spec version: 4.0.2-alpha-3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
IGNORE
"""
from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from ntnx_storage_py_client.api_client import ApiClient


class StorageContainerApi(object):
    """IGNORE:
    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
    IGNORE
    """ # noqa: E501

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

    def add_data_store_for_cluster(self, body, containerExtId, **kwargs):  # noqa: E501
        """Add a Data Store instance to the cluster.
        Add a Data Store instance to the cluster.

        >>> response = api.add_data_store_for_cluster(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_data_store_for_cluster(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.DataStoreMount body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

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

    def add_data_store_for_cluster_with_http_info(self, body, containerExtId, **kwargs):  # noqa: E501
        """Add a Data Store instance to the cluster.
        Add a Data Store instance to the cluster.

        >>> response = api.add_data_store_for_cluster(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_data_store_for_cluster_with_http_info(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.DataStoreMount body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/{containerExtId}/$actions/mount', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainerTaskResponse',  # 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 add_storage_container_for_cluster(self, body, X_Cluster_Id, **kwargs):  # noqa: E501
        """Add a Storage Container instance to the cluster.
        Add a Storage Container instance to the cluster.

        >>> response = api.add_storage_container_for_cluster(body, X_Cluster_Id)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_storage_container_for_cluster(body, X_Cluster_Id, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.StorageContainer body: (required)
        :param str X_Cluster_Id: Remote cluster uuid to forward the request. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

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

    def add_storage_container_for_cluster_with_http_info(self, body, X_Cluster_Id, **kwargs):  # noqa: E501
        """Add a Storage Container instance to the cluster.
        Add a Storage Container instance to the cluster.

        >>> response = api.add_storage_container_for_cluster(body, X_Cluster_Id)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_storage_container_for_cluster_with_http_info(body, X_Cluster_Id, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.StorageContainer body: (required)
        :param str X_Cluster_Id: Remote cluster uuid to forward the request. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501
        if 'X_Cluster_Id' in params:
            header_params['X-Cluster-Id'] = params['X_Cluster_Id']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainerTaskResponse',  # 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 delete_data_store_for_cluster(self, body, containerExtId, **kwargs):  # noqa: E501
        """delete a Data Store instance in the cluster.
        delete a Data Store instance in the cluster.

        >>> response = api.delete_data_store_for_cluster(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_data_store_for_cluster(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.DataStoreUnmount body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.DataStoreTaskResponse

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

    def delete_data_store_for_cluster_with_http_info(self, body, containerExtId, **kwargs):  # noqa: E501
        """delete a Data Store instance in the cluster.
        delete a Data Store instance in the cluster.

        >>> response = api.delete_data_store_for_cluster(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_data_store_for_cluster_with_http_info(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.DataStoreUnmount body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.DataStoreTaskResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/{containerExtId}/$actions/unmount', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.DataStoreTaskResponse',  # 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 delete_storage_container_by_ext_id(self, containerExtId, **kwargs):  # noqa: E501
        """Delete an existing storage container.
        Delete an existing storage container.

        >>> response = api.delete_storage_container_by_ext_id(containerExtId, (optional) ignoreSmallFiles)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_storage_container_by_ext_id(containerExtId, async_req=True)
        >>> result = thread.get()

        :param str containerExtId: Uuid of the storage container. (required)
        :param bool ignoreSmallFiles:
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

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

    def delete_storage_container_by_ext_id_with_http_info(self, containerExtId, **kwargs):  # noqa: E501
        """Delete an existing storage container.
        Delete an existing storage container.

        >>> response = api.delete_storage_container_by_ext_id(containerExtId, (optional) ignoreSmallFiles)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_storage_container_by_ext_id_with_http_info(containerExtId, async_req=True)
        >>> result = thread.get()

        :param str containerExtId: Uuid of the storage container. (required)
        :param bool ignoreSmallFiles:
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['containerExtId', 'ignoreSmallFiles']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')
        all_params.append('if_match')
        all_params.append('if_none_match')

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

        collection_formats = {}

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

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

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/{containerExtId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainerTaskResponse',  # 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 get_all_storage_containers(self, **kwargs):  # noqa: E501
        """Get the list of all storage containers configured in the cluster.
        Get the list of all storage containers configured in the cluster.

        >>> response = api.get_all_storage_containers((optional) _page, (optional) _limit, (optional) _filter, (optional) _orderby, (optional) _select)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_all_storage_containers(async_req=True)
        >>> result = thread.get()

        :param int _page: A URL query parameter that specifies the page number of the result set.  Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned.

        :param int _limit: A URL query parameter that specifies the total number of records returned in the result set.  Must be a positive integer between 0 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set.

        :param str _filter: A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions.
        The filter can be applied on the following fields:
        
        - affinityHostUuid
        - clusterExtId
        - containerExtId
        - containerId
        - name
        - ownerUuid
        - replicationFactor
        - storagePoolUuid
        
        :param str _orderby: A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified the resources will be sorted in ascending order by default. For example, 'orderby=templateName desc' would get all templates sorted by templateName in desc order.
        The orderby can be applied to the following fields:
        
        - name
        
        :param str _select: A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e. *), then all properties on the matching resource will be returned.
- advertisedCapacity
- affinityHostUuid
- clusterExtId
- compressionDelayInSecs
- compressionEnabled
- containerExtId
- containerId
- downMigrateTimesInSecs
- enableSoftwareEncryption
- encrypted
- erasureCode
- erasureCodeDelaySecs
- extId
- fingerPrintOnWrite
- inlineEcEnabled
- isNfsWhitelistInherited
- isNutanixManaged
- links
- mappedRemoteContainers
- markedForRemoval
- maxCapacity
- name
- nfsWhitelistAddress
- onDiskDedup
- oplogReplicationFactor
- ownerUuid
- preferHigherECFaultDomain
- randomIoPreference
- replicationFactor
- seqIoPreference
- storagePoolUuid
- tenantId
- totalExplicitReservedCapacity
- totalImplicitReservedCapacity
- vstoreNameList

        :param bool async_req:
        :return: storage.v4.config.StorageContainersResponse

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

    def get_all_storage_containers_with_http_info(self, **kwargs):  # noqa: E501
        """Get the list of all storage containers configured in the cluster.
        Get the list of all storage containers configured in the cluster.

        >>> response = api.get_all_storage_containers((optional) _page, (optional) _limit, (optional) _filter, (optional) _orderby, (optional) _select)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_all_storage_containers_with_http_info(async_req=True)
        >>> result = thread.get()

        :param int _page: A URL query parameter that specifies the page number of the result set.  Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned.

        :param int _limit: A URL query parameter that specifies the total number of records returned in the result set.  Must be a positive integer between 0 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set.

        :param str _filter: A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions.
        The filter can be applied on the following fields:
        
        - affinityHostUuid
        - clusterExtId
        - containerExtId
        - containerId
        - name
        - ownerUuid
        - replicationFactor
        - storagePoolUuid
        
        :param str _orderby: A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified the resources will be sorted in ascending order by default. For example, 'orderby=templateName desc' would get all templates sorted by templateName in desc order.
        The orderby can be applied to the following fields:
        
        - name
        
        :param str _select: A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e. *), then all properties on the matching resource will be returned.
- advertisedCapacity
- affinityHostUuid
- clusterExtId
- compressionDelayInSecs
- compressionEnabled
- containerExtId
- containerId
- downMigrateTimesInSecs
- enableSoftwareEncryption
- encrypted
- erasureCode
- erasureCodeDelaySecs
- extId
- fingerPrintOnWrite
- inlineEcEnabled
- isNfsWhitelistInherited
- isNutanixManaged
- links
- mappedRemoteContainers
- markedForRemoval
- maxCapacity
- name
- nfsWhitelistAddress
- onDiskDedup
- oplogReplicationFactor
- ownerUuid
- preferHigherECFaultDomain
- randomIoPreference
- replicationFactor
- seqIoPreference
- storagePoolUuid
- tenantId
- totalExplicitReservedCapacity
- totalImplicitReservedCapacity
- vstoreNameList

        :param bool async_req:
        :return: storage.v4.config.StorageContainersResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_page', '_limit', '_filter', '_orderby', '_select']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')
        all_params.append('if_match')
        all_params.append('if_none_match')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_page' in params:
            query_params.append(('$page', params['_page']))  # noqa: E501
        if '_limit' in params:
            query_params.append(('$limit', params['_limit']))  # noqa: E501
        if '_filter' in params:
            query_params.append(('$filter', params['_filter']))  # noqa: E501
        if '_orderby' in params:
            query_params.append(('$orderby', params['_orderby']))  # noqa: E501
        if '_select' in params:
            query_params.append(('$select', params['_select']))  # noqa: E501

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainersResponse',  # 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 get_data_stores(self, **kwargs):  # noqa: E501
        """Get the datastore.
        Get the datastore.

        >>> response = api.get_data_stores((optional) _filter)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_data_stores(async_req=True)
        >>> result = thread.get()

        :param str _filter: A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions.
        The filter can be applied on the following fields:
        
        - containerExtId
        
        :param bool async_req:
        :return: storage.v4.config.DataStoreResponse

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

    def get_data_stores_with_http_info(self, **kwargs):  # noqa: E501
        """Get the datastore.
        Get the datastore.

        >>> response = api.get_data_stores((optional) _filter)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_data_stores_with_http_info(async_req=True)
        >>> result = thread.get()

        :param str _filter: A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions.
        The filter can be applied on the following fields:
        
        - containerExtId
        
        :param bool async_req:
        :return: storage.v4.config.DataStoreResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/datastores', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.DataStoreResponse',  # 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 get_storage_container_by_ext_id(self, containerExtId, **kwargs):  # noqa: E501
        """Get the attributes of an existing storage container.
        Get the attributes of an existing storage container.

        >>> response = api.get_storage_container_by_ext_id(containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_storage_container_by_ext_id(containerExtId, async_req=True)
        >>> result = thread.get()

        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerResponse

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

    def get_storage_container_by_ext_id_with_http_info(self, containerExtId, **kwargs):  # noqa: E501
        """Get the attributes of an existing storage container.
        Get the attributes of an existing storage container.

        >>> response = api.get_storage_container_by_ext_id(containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_storage_container_by_ext_id_with_http_info(containerExtId, async_req=True)
        >>> result = thread.get()

        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/{containerExtId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainerResponse',  # 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 update_storage_container(self, body, containerExtId, **kwargs):  # noqa: E501
        """Updates the attributes of an existing storage container.
        Updates the attributes of an existing storage container.

        >>> response = api.update_storage_container(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_storage_container(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.StorageContainer body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

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

    def update_storage_container_with_http_info(self, body, containerExtId, **kwargs):  # noqa: E501
        """Updates the attributes of an existing storage container.
        Updates the attributes of an existing storage container.

        >>> response = api.update_storage_container(body, containerExtId)

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_storage_container_with_http_info(body, containerExtId, async_req=True)
        >>> result = thread.get()

        :param storage.v4.config.StorageContainer body: (required)
        :param str containerExtId: Uuid of the storage container. (required)
        :param bool async_req:
        :return: storage.v4.config.StorageContainerTaskResponse

                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'if_match' in params and params['if_match'] is not None:
            header_params['If-Match'] = params['if_match']  # noqa: E501
        if 'if_none_match' in params and params['if_none_match'] is not None:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/storage/v4.0.a3/config/storage-containers/{containerExtId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='storage.v4.config.StorageContainerTaskResponse',  # 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)
