<reponame>Atomicology/isilon_sdk_python
# coding: utf-8

"""
ClusterApi.py
Copyright 2016 SmartBear Software

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class ClusterApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def create_cluster_add_node_item(self, cluster_add_node_item, **kwargs):
        """
        
        Serial number and arguments of node to add.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_cluster_add_node_item(cluster_add_node_item, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterAddNodeItem cluster_add_node_item:  (required)
        :return: Empty
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_add_node_item']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_add_node_item' is set
        if ('cluster_add_node_item' not in params) or (params['cluster_add_node_item'] is None):
            raise ValueError("Missing the required parameter `cluster_add_node_item` when calling `create_cluster_add_node_item`")


        resource_path = '/platform/3/cluster/add-node'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_add_node_item' in params:
            body_params = params['cluster_add_node_item']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='Empty',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_config(self, **kwargs):
        """
        
        Retrieve the cluster information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_config(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/config'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterConfig',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_email(self, **kwargs):
        """
        
        Get the cluster email notification settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_email(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterEmail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/email'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterEmail',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_identity(self, **kwargs):
        """
        
        Retrieve the login information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_identity(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterIdentity
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/identity'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterIdentity',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_node(self, cluster_node_id, **kwargs):
        """
        
        Retrieve node information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_node(cluster_node_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int cluster_node_id: Retrieve node information. (required)
        :return: ClusterNodes
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_node_id']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_node_id' is set
        if ('cluster_node_id' not in params) or (params['cluster_node_id'] is None):
            raise ValueError("Missing the required parameter `cluster_node_id` when calling `get_cluster_node`")


        resource_path = '/platform/3/cluster/nodes/{ClusterNodeId}'.replace('{format}', 'json')
        path_params = {}
        if 'cluster_node_id' in params:
            path_params['ClusterNodeId'] = params['cluster_node_id']

        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodes',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_nodes(self, **kwargs):
        """
        
        List the nodes on this cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_nodes(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterNodesExtended
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/nodes'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodesExtended',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_nodes_available(self, **kwargs):
        """
        
        List all nodes that are available to add to this cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_nodes_available(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterNodesAvailable
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/nodes-available'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodesAvailable',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_owner(self, **kwargs):
        """
        
        Get the cluster contact info settings

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_owner(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterOwner
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/owner'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterOwner',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_statfs(self, **kwargs):
        """
        
        Retrieve the filesystem statistics.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_statfs(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterStatfs
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/statfs'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterStatfs',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_time(self, **kwargs):
        """
        
        Retrieve the current time as reported by each node.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_time(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterTime
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/time'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterTime',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_timezone(self, **kwargs):
        """
        
        Get the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_timezone(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterTimezone
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/timezone'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterTimezone',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_version(self, **kwargs):
        """
        
        Retrieve the OneFS version as reported by each node.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_version(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterVersion
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/version'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterVersion',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_timezone_region(self, timezone_region_id, **kwargs):
        """
        
        List timezone regions.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_timezone_region(timezone_region_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str timezone_region_id: List timezone regions. (required)
        :param str sort: The field that will be used for sorting.
        :param str resume: Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options).
        :param bool show_all: Show all timezones within the region specified in the URI.
        :param bool dst_reset: This query arg is not needed in normal use cases.
        :param int limit: Return no more than this many results at once (see resume).
        :param str dir: The direction of the sort.
        :return: TimezoneRegions
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['timezone_region_id', 'sort', 'resume', 'show_all', 'dst_reset', 'limit', 'dir']
        all_params.append('callback')

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

        # verify the required parameter 'timezone_region_id' is set
        if ('timezone_region_id' not in params) or (params['timezone_region_id'] is None):
            raise ValueError("Missing the required parameter `timezone_region_id` when calling `get_timezone_region`")

        if 'limit' in params and params['limit'] < 1.0: 
            raise ValueError("Invalid value for parameter `limit` when calling `get_timezone_region`, must be a value greater than or equal to `1.0`")

        resource_path = '/platform/3/cluster/timezone/regions/{TimezoneRegionId}'.replace('{format}', 'json')
        path_params = {}
        if 'timezone_region_id' in params:
            path_params['TimezoneRegionId'] = params['timezone_region_id']

        query_params = {}
        if 'sort' in params:
            query_params['sort'] = params['sort']
        if 'resume' in params:
            query_params['resume'] = params['resume']
        if 'show_all' in params:
            query_params['show_all'] = params['show_all']
        if 'dst_reset' in params:
            query_params['dst_reset'] = params['dst_reset']
        if 'limit' in params:
            query_params['limit'] = params['limit']
        if 'dir' in params:
            query_params['dir'] = params['dir']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TimezoneRegions',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_timezone_settings(self, **kwargs):
        """
        
        Retrieve the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_timezone_settings(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: TimezoneSettings
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/timezone/settings'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TimezoneSettings',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_email(self, cluster_email, **kwargs):
        """
        
        Modify the cluster email notification settings.  All input fields are optional, but one or more must be supplied.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_email(cluster_email, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterEmailExtended cluster_email:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_email']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_email' is set
        if ('cluster_email' not in params) or (params['cluster_email'] is None):
            raise ValueError("Missing the required parameter `cluster_email` when calling `update_cluster_email`")


        resource_path = '/platform/1/cluster/email'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_email' in params:
            body_params = params['cluster_email']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_identity(self, cluster_identity, **kwargs):
        """
        
        Modify the login information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_identity(cluster_identity, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterIdentityExtended cluster_identity:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_identity']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_identity' is set
        if ('cluster_identity' not in params) or (params['cluster_identity'] is None):
            raise ValueError("Missing the required parameter `cluster_identity` when calling `update_cluster_identity`")


        resource_path = '/platform/3/cluster/identity'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_identity' in params:
            body_params = params['cluster_identity']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_node(self, cluster_node, cluster_node_id, **kwargs):
        """
        
        Modify one or more node settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_node(cluster_node, cluster_node_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterNode cluster_node:  (required)
        :param int cluster_node_id: Modify one or more node settings. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_node', 'cluster_node_id']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_node' is set
        if ('cluster_node' not in params) or (params['cluster_node'] is None):
            raise ValueError("Missing the required parameter `cluster_node` when calling `update_cluster_node`")
        # verify the required parameter 'cluster_node_id' is set
        if ('cluster_node_id' not in params) or (params['cluster_node_id'] is None):
            raise ValueError("Missing the required parameter `cluster_node_id` when calling `update_cluster_node`")


        resource_path = '/platform/3/cluster/nodes/{ClusterNodeId}'.replace('{format}', 'json')
        path_params = {}
        if 'cluster_node_id' in params:
            path_params['ClusterNodeId'] = params['cluster_node_id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_node' in params:
            body_params = params['cluster_node']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_owner(self, cluster_owner, **kwargs):
        """
        
        Modify the cluster contact info settings.  All input fields are optional, but one or more must be supplied.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_owner(cluster_owner, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterOwner cluster_owner:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_owner']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_owner' is set
        if ('cluster_owner' not in params) or (params['cluster_owner'] is None):
            raise ValueError("Missing the required parameter `cluster_owner` when calling `update_cluster_owner`")


        resource_path = '/platform/1/cluster/owner'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_owner' in params:
            body_params = params['cluster_owner']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_time(self, cluster_time, **kwargs):
        """
        
        Set cluster time.  Time will mostly be synchronized across nodes, but there may be slight drift.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_time(cluster_time, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterTimeExtended cluster_time:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_time']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_time' is set
        if ('cluster_time' not in params) or (params['cluster_time'] is None):
            raise ValueError("Missing the required parameter `cluster_time` when calling `update_cluster_time`")


        resource_path = '/platform/3/cluster/time'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_time' in params:
            body_params = params['cluster_time']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_timezone(self, cluster_timezone, **kwargs):
        """
        
        Set a new timezone for the cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_timezone(cluster_timezone, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterTimezoneExtended cluster_timezone:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_timezone']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_timezone' is set
        if ('cluster_timezone' not in params) or (params['cluster_timezone'] is None):
            raise ValueError("Missing the required parameter `cluster_timezone` when calling `update_cluster_timezone`")


        resource_path = '/platform/3/cluster/timezone'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_timezone' in params:
            body_params = params['cluster_timezone']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_timezone_settings(self, timezone_settings, **kwargs):
        """
        
        Modify the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_timezone_settings(timezone_settings, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TimezoneRegionTimezone timezone_settings:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['timezone_settings']
        all_params.append('callback')

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

        # verify the required parameter 'timezone_settings' is set
        if ('timezone_settings' not in params) or (params['timezone_settings'] is None):
            raise ValueError("Missing the required parameter `timezone_settings` when calling `update_timezone_settings`")


        resource_path = '/platform/3/cluster/timezone/settings'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'timezone_settings' in params:
            body_params = params['timezone_settings']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

# coding: utf-8

"""
ClusterApi.py
Copyright 2016 SmartBear Software

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class ClusterApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def create_cluster_add_node_item(self, cluster_add_node_item, **kwargs):
        """
        
        Serial number and arguments of node to add.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_cluster_add_node_item(cluster_add_node_item, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterAddNodeItem cluster_add_node_item:  (required)
        :return: Empty
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_add_node_item']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_add_node_item' is set
        if ('cluster_add_node_item' not in params) or (params['cluster_add_node_item'] is None):
            raise ValueError("Missing the required parameter `cluster_add_node_item` when calling `create_cluster_add_node_item`")


        resource_path = '/platform/3/cluster/add-node'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_add_node_item' in params:
            body_params = params['cluster_add_node_item']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='Empty',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_config(self, **kwargs):
        """
        
        Retrieve the cluster information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_config(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/config'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterConfig',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_email(self, **kwargs):
        """
        
        Get the cluster email notification settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_email(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterEmail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/email'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterEmail',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_identity(self, **kwargs):
        """
        
        Retrieve the login information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_identity(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterIdentity
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/identity'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterIdentity',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_node(self, cluster_node_id, **kwargs):
        """
        
        Retrieve node information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_node(cluster_node_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int cluster_node_id: Retrieve node information. (required)
        :return: ClusterNodes
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_node_id']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_node_id' is set
        if ('cluster_node_id' not in params) or (params['cluster_node_id'] is None):
            raise ValueError("Missing the required parameter `cluster_node_id` when calling `get_cluster_node`")


        resource_path = '/platform/3/cluster/nodes/{ClusterNodeId}'.replace('{format}', 'json')
        path_params = {}
        if 'cluster_node_id' in params:
            path_params['ClusterNodeId'] = params['cluster_node_id']

        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodes',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_nodes(self, **kwargs):
        """
        
        List the nodes on this cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_nodes(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterNodesExtended
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/nodes'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodesExtended',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_nodes_available(self, **kwargs):
        """
        
        List all nodes that are available to add to this cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_nodes_available(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterNodesAvailable
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/nodes-available'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterNodesAvailable',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_owner(self, **kwargs):
        """
        
        Get the cluster contact info settings

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_owner(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterOwner
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/owner'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterOwner',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_statfs(self, **kwargs):
        """
        
        Retrieve the filesystem statistics.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_statfs(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterStatfs
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/1/cluster/statfs'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterStatfs',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_time(self, **kwargs):
        """
        
        Retrieve the current time as reported by each node.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_time(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterTime
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/time'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterTime',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_timezone(self, **kwargs):
        """
        
        Get the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_timezone(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterTimezone
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/timezone'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterTimezone',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_cluster_version(self, **kwargs):
        """
        
        Retrieve the OneFS version as reported by each node.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_cluster_version(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: ClusterVersion
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/version'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ClusterVersion',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_timezone_region(self, timezone_region_id, **kwargs):
        """
        
        List timezone regions.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_timezone_region(timezone_region_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str timezone_region_id: List timezone regions. (required)
        :param str sort: The field that will be used for sorting.
        :param str resume: Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options).
        :param bool show_all: Show all timezones within the region specified in the URI.
        :param bool dst_reset: This query arg is not needed in normal use cases.
        :param int limit: Return no more than this many results at once (see resume).
        :param str dir: The direction of the sort.
        :return: TimezoneRegions
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['timezone_region_id', 'sort', 'resume', 'show_all', 'dst_reset', 'limit', 'dir']
        all_params.append('callback')

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

        # verify the required parameter 'timezone_region_id' is set
        if ('timezone_region_id' not in params) or (params['timezone_region_id'] is None):
            raise ValueError("Missing the required parameter `timezone_region_id` when calling `get_timezone_region`")

        if 'limit' in params and params['limit'] < 1.0: 
            raise ValueError("Invalid value for parameter `limit` when calling `get_timezone_region`, must be a value greater than or equal to `1.0`")

        resource_path = '/platform/3/cluster/timezone/regions/{TimezoneRegionId}'.replace('{format}', 'json')
        path_params = {}
        if 'timezone_region_id' in params:
            path_params['TimezoneRegionId'] = params['timezone_region_id']

        query_params = {}
        if 'sort' in params:
            query_params['sort'] = params['sort']
        if 'resume' in params:
            query_params['resume'] = params['resume']
        if 'show_all' in params:
            query_params['show_all'] = params['show_all']
        if 'dst_reset' in params:
            query_params['dst_reset'] = params['dst_reset']
        if 'limit' in params:
            query_params['limit'] = params['limit']
        if 'dir' in params:
            query_params['dir'] = params['dir']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TimezoneRegions',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def get_timezone_settings(self, **kwargs):
        """
        
        Retrieve the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_timezone_settings(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: TimezoneSettings
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')

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



        resource_path = '/platform/3/cluster/timezone/settings'.replace('{format}', 'json')
        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'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TimezoneSettings',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_email(self, cluster_email, **kwargs):
        """
        
        Modify the cluster email notification settings.  All input fields are optional, but one or more must be supplied.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_email(cluster_email, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterEmailExtended cluster_email:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_email']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_email' is set
        if ('cluster_email' not in params) or (params['cluster_email'] is None):
            raise ValueError("Missing the required parameter `cluster_email` when calling `update_cluster_email`")


        resource_path = '/platform/1/cluster/email'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_email' in params:
            body_params = params['cluster_email']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_identity(self, cluster_identity, **kwargs):
        """
        
        Modify the login information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_identity(cluster_identity, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterIdentityExtended cluster_identity:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_identity']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_identity' is set
        if ('cluster_identity' not in params) or (params['cluster_identity'] is None):
            raise ValueError("Missing the required parameter `cluster_identity` when calling `update_cluster_identity`")


        resource_path = '/platform/3/cluster/identity'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_identity' in params:
            body_params = params['cluster_identity']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_node(self, cluster_node, cluster_node_id, **kwargs):
        """
        
        Modify one or more node settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_node(cluster_node, cluster_node_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterNode cluster_node:  (required)
        :param int cluster_node_id: Modify one or more node settings. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_node', 'cluster_node_id']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_node' is set
        if ('cluster_node' not in params) or (params['cluster_node'] is None):
            raise ValueError("Missing the required parameter `cluster_node` when calling `update_cluster_node`")
        # verify the required parameter 'cluster_node_id' is set
        if ('cluster_node_id' not in params) or (params['cluster_node_id'] is None):
            raise ValueError("Missing the required parameter `cluster_node_id` when calling `update_cluster_node`")


        resource_path = '/platform/3/cluster/nodes/{ClusterNodeId}'.replace('{format}', 'json')
        path_params = {}
        if 'cluster_node_id' in params:
            path_params['ClusterNodeId'] = params['cluster_node_id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_node' in params:
            body_params = params['cluster_node']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_owner(self, cluster_owner, **kwargs):
        """
        
        Modify the cluster contact info settings.  All input fields are optional, but one or more must be supplied.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_owner(cluster_owner, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterOwner cluster_owner:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_owner']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_owner' is set
        if ('cluster_owner' not in params) or (params['cluster_owner'] is None):
            raise ValueError("Missing the required parameter `cluster_owner` when calling `update_cluster_owner`")


        resource_path = '/platform/1/cluster/owner'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_owner' in params:
            body_params = params['cluster_owner']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_time(self, cluster_time, **kwargs):
        """
        
        Set cluster time.  Time will mostly be synchronized across nodes, but there may be slight drift.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_time(cluster_time, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterTimeExtended cluster_time:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_time']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_time' is set
        if ('cluster_time' not in params) or (params['cluster_time'] is None):
            raise ValueError("Missing the required parameter `cluster_time` when calling `update_cluster_time`")


        resource_path = '/platform/3/cluster/time'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_time' in params:
            body_params = params['cluster_time']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_cluster_timezone(self, cluster_timezone, **kwargs):
        """
        
        Set a new timezone for the cluster.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_cluster_timezone(cluster_timezone, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ClusterTimezoneExtended cluster_timezone:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_timezone']
        all_params.append('callback')

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

        # verify the required parameter 'cluster_timezone' is set
        if ('cluster_timezone' not in params) or (params['cluster_timezone'] is None):
            raise ValueError("Missing the required parameter `cluster_timezone` when calling `update_cluster_timezone`")


        resource_path = '/platform/3/cluster/timezone'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cluster_timezone' in params:
            body_params = params['cluster_timezone']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def update_timezone_settings(self, timezone_settings, **kwargs):
        """
        
        Modify the cluster timezone.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_timezone_settings(timezone_settings, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TimezoneRegionTimezone timezone_settings:  (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['timezone_settings']
        all_params.append('callback')

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

        # verify the required parameter 'timezone_settings' is set
        if ('timezone_settings' not in params) or (params['timezone_settings'] is None):
            raise ValueError("Missing the required parameter `timezone_settings` when calling `update_timezone_settings`")


        resource_path = '/platform/3/cluster/timezone/settings'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'timezone_settings' in params:
            body_params = params['timezone_settings']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = ['basic_auth']

        response = self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response
# coding: utf-8 ClusterApi.py Copyright 2016 SmartBear Software     Licensed under the Apache License, Version 2.0 (the "License");    you may not use this file except in compliance with the License.    You may obtain a copy of the License at         http://www.apache.org/licenses/LICENSE-2.0     Unless required by applicable law or agreed to in writing, software    distributed under the License is distributed on an "AS IS" BASIS,    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    See the License for the specific language governing permissions and    limitations under the License. # python 2 and python 3 compatibility library 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 Serial number and arguments of node to add.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.create_cluster_add_node_item(cluster_add_node_item, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterAddNodeItem cluster_add_node_item:  (required)         :return: Empty                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_add_node_item' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the cluster information.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_config(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterConfig                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Get the cluster email notification settings.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_email(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterEmail                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the login information.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_identity(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterIdentity                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve node information.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_node(cluster_node_id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param int cluster_node_id: Retrieve node information. (required)         :return: ClusterNodes                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_node_id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting List the nodes on this cluster.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_nodes(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterNodesExtended                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting List all nodes that are available to add to this cluster.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_nodes_available(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterNodesAvailable                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Get the cluster contact info settings          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_owner(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterOwner                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the filesystem statistics.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_statfs(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterStatfs                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the current time as reported by each node.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_time(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterTime                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Get the cluster timezone.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_timezone(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterTimezone                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the OneFS version as reported by each node.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_cluster_version(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: ClusterVersion                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting List timezone regions.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_timezone_region(timezone_region_id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str timezone_region_id: List timezone regions. (required)         :param str sort: The field that will be used for sorting.         :param str resume: Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options).         :param bool show_all: Show all timezones within the region specified in the URI.         :param bool dst_reset: This query arg is not needed in normal use cases.         :param int limit: Return no more than this many results at once (see resume).         :param str dir: The direction of the sort.         :return: TimezoneRegions                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'timezone_region_id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Retrieve the cluster timezone.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.get_timezone_settings(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :return: TimezoneSettings                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Modify the cluster email notification settings.  All input fields are optional, but one or more must be supplied.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_email(cluster_email, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterEmailExtended cluster_email:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_email' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Modify the login information.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_identity(cluster_identity, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterIdentityExtended cluster_identity:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_identity' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Modify one or more node settings.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_node(cluster_node, cluster_node_id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterNode cluster_node:  (required)         :param int cluster_node_id: Modify one or more node settings. (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_node' is set # verify the required parameter 'cluster_node_id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Modify the cluster contact info settings.  All input fields are optional, but one or more must be supplied.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_owner(cluster_owner, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterOwner cluster_owner:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_owner' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Set cluster time.  Time will mostly be synchronized across nodes, but there may be slight drift.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_time(cluster_time, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterTimeExtended cluster_time:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_time' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Set a new timezone for the cluster.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_cluster_timezone(cluster_timezone, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param ClusterTimezoneExtended cluster_timezone:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'cluster_timezone' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Modify the cluster timezone.          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.update_timezone_settings(timezone_settings, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param TimezoneRegionTimezone timezone_settings:  (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'timezone_settings' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting