# coding: utf-8

"""
    Cudo Compute service

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

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from cudo_compute.api_client import ApiClient


class DataCentersApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def count_hosts(self, data_center_id, **kwargs):  # noqa: E501
        """Get host count  # noqa: E501

        Returns the number of hosts in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_hosts(data_center_id, async_req=True)
        >>> result = thread.get()

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

    def count_hosts_with_http_info(self, data_center_id, **kwargs):  # noqa: E501
        """Get host count  # noqa: E501

        Returns the number of hosts in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_hosts_with_http_info(data_center_id, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{dataCenterId}/host-count', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CountHostsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_data_center(self, data_center, **kwargs):  # noqa: E501
        """Create data center  # noqa: E501

        Creates a new data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_data_center(data_center, async_req=True)
        >>> result = thread.get()

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

    def create_data_center_with_http_info(self, data_center, **kwargs):  # noqa: E501
        """Create data center  # noqa: E501

        Creates a new data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_data_center_with_http_info(data_center, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data_center' in params:
            body_params = params['data_center']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataCenter',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_data_center(self, id, **kwargs):  # noqa: E501
        """Delete data center  # noqa: E501

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

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

    def delete_data_center_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete data center  # noqa: E501

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

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_data_center(self, id, **kwargs):  # noqa: E501
        """Get data center  # noqa: E501

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

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

    def get_data_center_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get data center  # noqa: E501

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

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataCenter',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_data_center_live_utilization(self, id, **kwargs):  # noqa: E501
        """Get live utilization  # noqa: E501

        Returns the live utilization of a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_live_utilization(id, async_req=True)
        >>> result = thread.get()

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

    def get_data_center_live_utilization_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get live utilization  # noqa: E501

        Returns the live utilization of a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_live_utilization_with_http_info(id, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{id}/live-utilization', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetDataCenterLiveUtilizationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_data_center_revenue_by_resource(self, id, start_time, end_time, **kwargs):  # noqa: E501
        """Get revenue by resource  # noqa: E501

        Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_revenue_by_resource(id, start_time, end_time, async_req=True)
        >>> result = thread.get()

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

    def get_data_center_revenue_by_resource_with_http_info(self, id, start_time, end_time, **kwargs):  # noqa: E501
        """Get revenue by resource  # noqa: E501

        Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_revenue_by_resource_with_http_info(id, start_time, end_time, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param datetime start_time: (required)
        :param datetime end_time: (required)
        :return: GetDataCenterRevenueByResourceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'start_time', 'end_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'start_time' in params:
            query_params.append(('startTime', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('endTime', params['end_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{id}/revenue-by-resource', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetDataCenterRevenueByResourceResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_data_center_revenue_time_series(self, id, start_time, end_time, interval, **kwargs):  # noqa: E501
        """Get revenue time series  # noqa: E501

        Returns the revenue of a data center over time  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_revenue_time_series(id, start_time, end_time, interval, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param datetime start_time: (required)
        :param datetime end_time: (required)
        :param str interval: (required)
        :return: GetDataCenterRevenueTimeSeriesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, **kwargs)  # noqa: E501
        else:
            (data) = self.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, **kwargs)  # noqa: E501
            return data

    def get_data_center_revenue_time_series_with_http_info(self, id, start_time, end_time, interval, **kwargs):  # noqa: E501
        """Get revenue time series  # noqa: E501

        Returns the revenue of a data center over time  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param datetime start_time: (required)
        :param datetime end_time: (required)
        :param str interval: (required)
        :return: GetDataCenterRevenueTimeSeriesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'start_time', 'end_time', 'interval']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'start_time' in params:
            query_params.append(('startTime', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('endTime', params['end_time']))  # noqa: E501
        if 'interval' in params:
            query_params.append(('interval', params['interval']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{id}/revenue', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetDataCenterRevenueTimeSeriesResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_clusters(self, data_center_id, **kwargs):  # noqa: E501
        """List clusters  # noqa: E501

        Returns the clusters in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_clusters(data_center_id, async_req=True)
        >>> result = thread.get()

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

    def list_clusters_with_http_info(self, data_center_id, **kwargs):  # noqa: E501
        """List clusters  # noqa: E501

        Returns the clusters in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_clusters_with_http_info(data_center_id, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{dataCenterId}/clusters', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListClustersResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_data_centers(self, **kwargs):  # noqa: E501
        """List data centers  # noqa: E501

        Returns the data centers in an organization  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_data_centers(async_req=True)
        >>> result = thread.get()

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

    def list_data_centers_with_http_info(self, **kwargs):  # noqa: E501
        """List data centers  # noqa: E501

        Returns the data centers in an organization  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_data_centers_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str page_token:
        :param int page_size:
        :return: ListDataCentersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListDataCentersResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_hosts(self, data_center_id, **kwargs):  # noqa: E501
        """List hosts  # noqa: E501

        Returns the hosts in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_hosts(data_center_id, async_req=True)
        >>> result = thread.get()

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

    def list_hosts_with_http_info(self, data_center_id, **kwargs):  # noqa: E501
        """List hosts  # noqa: E501

        Returns the hosts in a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_hosts_with_http_info(data_center_id, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{dataCenterId}/hosts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListHostsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_data_center(self, data_center_id, data_center, **kwargs):  # noqa: E501
        """Update data center  # noqa: E501

        Updates a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_data_center(data_center_id, data_center, async_req=True)
        >>> result = thread.get()

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

    def update_data_center_with_http_info(self, data_center_id, data_center, **kwargs):  # noqa: E501
        """Update data center  # noqa: E501

        Updates a data center  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_data_center_with_http_info(data_center_id, data_center, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

        path_params = {}
        if 'data_center_id' in params:
            path_params['dataCenter.id'] = params['data_center_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data_center' in params:
            body_params = params['data_center']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/v1/data-centers/{dataCenter.id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataCenter',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
