# coding: utf-8

"""
    Command Center operations

    Command Center operations  # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from CommandCenter.api_client import ApiClient


class VLANApi(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 add_provisioned_vlan_or_range(self, cloud_name, add_provisioned_vlan_or_range, **kwargs):  # noqa: E501
        """add_provisioned_vlan_or_range  # noqa: E501

        Add provisioned vlan or a range to the cloud.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_provisioned_vlan_or_range(cloud_name, add_provisioned_vlan_or_range, async_req=True)
        >>> result = thread.get()

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

    def add_provisioned_vlan_or_range_with_http_info(self, cloud_name, add_provisioned_vlan_or_range, **kwargs):  # noqa: E501
        """add_provisioned_vlan_or_range  # noqa: E501

        Add provisioned vlan or a range to the cloud.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_provisioned_vlan_or_range_with_http_info(cloud_name, add_provisioned_vlan_or_range, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param AddProvisionedVlanOrRange add_provisioned_vlan_or_range: (required)
        :return: InlineResponse20011
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'add_provisioned_vlan_or_range']  # 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 add_provisioned_vlan_or_range" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `add_provisioned_vlan_or_range`")  # noqa: E501
        # verify the required parameter 'add_provisioned_vlan_or_range' is set
        if self.api_client.client_side_validation and ('add_provisioned_vlan_or_range' not in params or
                                                       params['add_provisioned_vlan_or_range'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `add_provisioned_vlan_or_range` when calling `add_provisioned_vlan_or_range`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20011',  # 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 allocate_vlan_to_cloud_user(self, cloud_name, vlan_id, allocate_vlan_to_cloud_user, **kwargs):  # noqa: E501
        """allocate_vlan_to_cloud_user  # noqa: E501

        Allocate vlan to cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.allocate_vlan_to_cloud_user(cloud_name, vlan_id, allocate_vlan_to_cloud_user, async_req=True)
        >>> result = thread.get()

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

    def allocate_vlan_to_cloud_user_with_http_info(self, cloud_name, vlan_id, allocate_vlan_to_cloud_user, **kwargs):  # noqa: E501
        """allocate_vlan_to_cloud_user  # noqa: E501

        Allocate vlan to cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.allocate_vlan_to_cloud_user_with_http_info(cloud_name, vlan_id, allocate_vlan_to_cloud_user, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param AllocateVlanToCloudUser allocate_vlan_to_cloud_user: (required)
        :return: InlineResponse20011
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'allocate_vlan_to_cloud_user']  # 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 allocate_vlan_to_cloud_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `allocate_vlan_to_cloud_user`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `allocate_vlan_to_cloud_user`")  # noqa: E501
        # verify the required parameter 'allocate_vlan_to_cloud_user' is set
        if self.api_client.client_side_validation and ('allocate_vlan_to_cloud_user' not in params or
                                                       params['allocate_vlan_to_cloud_user'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `allocate_vlan_to_cloud_user` when calling `allocate_vlan_to_cloud_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/allocate.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20011',  # 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 deallocate_vlan_to_cloud_user(self, cloud_name, vlan_id, deallocate_vlan_to_cloud_user, **kwargs):  # noqa: E501
        """deallocate_vlan_to_cloud_user  # noqa: E501

        Deallocate vlan from cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deallocate_vlan_to_cloud_user(cloud_name, vlan_id, deallocate_vlan_to_cloud_user, async_req=True)
        >>> result = thread.get()

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

    def deallocate_vlan_to_cloud_user_with_http_info(self, cloud_name, vlan_id, deallocate_vlan_to_cloud_user, **kwargs):  # noqa: E501
        """deallocate_vlan_to_cloud_user  # noqa: E501

        Deallocate vlan from cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deallocate_vlan_to_cloud_user_with_http_info(cloud_name, vlan_id, deallocate_vlan_to_cloud_user, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param DeallocateVlanToCloudUser deallocate_vlan_to_cloud_user: (required)
        :return: InlineResponse20012
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'deallocate_vlan_to_cloud_user']  # 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 deallocate_vlan_to_cloud_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `deallocate_vlan_to_cloud_user`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `deallocate_vlan_to_cloud_user`")  # noqa: E501
        # verify the required parameter 'deallocate_vlan_to_cloud_user' is set
        if self.api_client.client_side_validation and ('deallocate_vlan_to_cloud_user' not in params or
                                                       params['deallocate_vlan_to_cloud_user'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `deallocate_vlan_to_cloud_user` when calling `deallocate_vlan_to_cloud_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/deallocate.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20012',  # 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_vlans(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """delete_vlans  # noqa: E501

        Remove provisioned vlan from the cloud.  # 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_vlans(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

    def delete_vlans_with_http_info(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """delete_vlans  # noqa: E501

        Remove provisioned vlan from the cloud.  # 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_vlans_with_http_info(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['cloud_name', 'vlan_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_vlans" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `delete_vlans`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `delete_vlans`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cloud_name' in params:
            path_params['cloud_name'] = params['cloud_name']  # noqa: E501
        if 'vlan_id' in params:
            path_params['vlan_id'] = params['vlan_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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_vrid_from_vlan(self, cloud_name, vlan_id, delete_vrid_from_vlan, **kwargs):  # noqa: E501
        """delete_vrid_from_vlan  # noqa: E501

        Remove VRIDs from vlan.  # 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_vrid_from_vlan(cloud_name, vlan_id, delete_vrid_from_vlan, async_req=True)
        >>> result = thread.get()

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

    def delete_vrid_from_vlan_with_http_info(self, cloud_name, vlan_id, delete_vrid_from_vlan, **kwargs):  # noqa: E501
        """delete_vrid_from_vlan  # noqa: E501

        Remove VRIDs from vlan.  # 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_vrid_from_vlan_with_http_info(cloud_name, vlan_id, delete_vrid_from_vlan, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param DeleteVridFromVlan delete_vrid_from_vlan: (required)
        :return: InlineResponse2004
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'delete_vrid_from_vlan']  # 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_vrid_from_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `delete_vrid_from_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `delete_vrid_from_vlan`")  # noqa: E501
        # verify the required parameter 'delete_vrid_from_vlan' is set
        if self.api_client.client_side_validation and ('delete_vrid_from_vlan' not in params or
                                                       params['delete_vrid_from_vlan'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `delete_vrid_from_vlan` when calling `delete_vrid_from_vlan`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/remove_vrids.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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_vlans(self, cloud_name, **kwargs):  # noqa: E501
        """get_vlans  # noqa: E501

        Return the list of cloud provisioned vlans.  # 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_vlans(cloud_name, async_req=True)
        >>> result = thread.get()

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

    def get_vlans_with_http_info(self, cloud_name, **kwargs):  # noqa: E501
        """get_vlans  # noqa: E501

        Return the list of cloud provisioned vlans.  # 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_vlans_with_http_info(cloud_name, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20087',  # 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 populate_vrid_in_vlan(self, cloud_name, vlan_id, populate_vrid_in_vlan, **kwargs):  # noqa: E501
        """populate_vrid_in_vlan  # noqa: E501

        Add VRIDs to vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.populate_vrid_in_vlan(cloud_name, vlan_id, populate_vrid_in_vlan, async_req=True)
        >>> result = thread.get()

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

    def populate_vrid_in_vlan_with_http_info(self, cloud_name, vlan_id, populate_vrid_in_vlan, **kwargs):  # noqa: E501
        """populate_vrid_in_vlan  # noqa: E501

        Add VRIDs to vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.populate_vrid_in_vlan_with_http_info(cloud_name, vlan_id, populate_vrid_in_vlan, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param PopulateVridInVlan populate_vrid_in_vlan: (required)
        :return: InlineResponse2004
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'populate_vrid_in_vlan']  # 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 populate_vrid_in_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `populate_vrid_in_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `populate_vrid_in_vlan`")  # noqa: E501
        # verify the required parameter 'populate_vrid_in_vlan' is set
        if self.api_client.client_side_validation and ('populate_vrid_in_vlan' not in params or
                                                       params['populate_vrid_in_vlan'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `populate_vrid_in_vlan` when calling `populate_vrid_in_vlan`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/add_vrids.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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 reserve_provisioned_vlan(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """reserve_provisioned_vlan  # noqa: E501

        Reserve provisioned vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reserve_provisioned_vlan(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

    def reserve_provisioned_vlan_with_http_info(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """reserve_provisioned_vlan  # noqa: E501

        Reserve provisioned vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reserve_provisioned_vlan_with_http_info(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['cloud_name', 'vlan_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 reserve_provisioned_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `reserve_provisioned_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `reserve_provisioned_vlan`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cloud_name' in params:
            path_params['cloud_name'] = params['cloud_name']  # noqa: E501
        if 'vlan_id' in params:
            path_params['vlan_id'] = params['vlan_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/reserve.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20088',  # 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 reserve_vrid_for_vlan(self, cloud_name, vlan_id, reserve_vrid_for_vlan, **kwargs):  # noqa: E501
        """reserve_vrid_for_vlan  # noqa: E501

        Reserve VRID for vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reserve_vrid_for_vlan(cloud_name, vlan_id, reserve_vrid_for_vlan, async_req=True)
        >>> result = thread.get()

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

    def reserve_vrid_for_vlan_with_http_info(self, cloud_name, vlan_id, reserve_vrid_for_vlan, **kwargs):  # noqa: E501
        """reserve_vrid_for_vlan  # noqa: E501

        Reserve VRID for vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reserve_vrid_for_vlan_with_http_info(cloud_name, vlan_id, reserve_vrid_for_vlan, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param ReserveVridForVlan reserve_vrid_for_vlan: (required)
        :return: InlineResponse2004
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'reserve_vrid_for_vlan']  # 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 reserve_vrid_for_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `reserve_vrid_for_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `reserve_vrid_for_vlan`")  # noqa: E501
        # verify the required parameter 'reserve_vrid_for_vlan' is set
        if self.api_client.client_side_validation and ('reserve_vrid_for_vlan' not in params or
                                                       params['reserve_vrid_for_vlan'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `reserve_vrid_for_vlan` when calling `reserve_vrid_for_vlan`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/reserve_vrid.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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 set_default_vlan_for_cloud_user(self, cloud_name, vlan_id, set_default_vlan_for_cloud_user, **kwargs):  # noqa: E501
        """set_default_vlan_for_cloud_user  # noqa: E501

        Set default vlan for cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_default_vlan_for_cloud_user(cloud_name, vlan_id, set_default_vlan_for_cloud_user, async_req=True)
        >>> result = thread.get()

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

    def set_default_vlan_for_cloud_user_with_http_info(self, cloud_name, vlan_id, set_default_vlan_for_cloud_user, **kwargs):  # noqa: E501
        """set_default_vlan_for_cloud_user  # noqa: E501

        Set default vlan for cloud user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_default_vlan_for_cloud_user_with_http_info(cloud_name, vlan_id, set_default_vlan_for_cloud_user, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param SetDefaultVlanForCloudUser set_default_vlan_for_cloud_user: (required)
        :return: InlineResponse2004
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'set_default_vlan_for_cloud_user']  # 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 set_default_vlan_for_cloud_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `set_default_vlan_for_cloud_user`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `set_default_vlan_for_cloud_user`")  # noqa: E501
        # verify the required parameter 'set_default_vlan_for_cloud_user' is set
        if self.api_client.client_side_validation and ('set_default_vlan_for_cloud_user' not in params or
                                                       params['set_default_vlan_for_cloud_user'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `set_default_vlan_for_cloud_user` when calling `set_default_vlan_for_cloud_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/default.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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 unreserve_provisioned_vlan(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """unreserve_provisioned_vlan  # noqa: E501

        Unreserve provisioned vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.unreserve_provisioned_vlan(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

    def unreserve_provisioned_vlan_with_http_info(self, cloud_name, vlan_id, **kwargs):  # noqa: E501
        """unreserve_provisioned_vlan  # noqa: E501

        Unreserve provisioned vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.unreserve_provisioned_vlan_with_http_info(cloud_name, vlan_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['cloud_name', 'vlan_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 unreserve_provisioned_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `unreserve_provisioned_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `unreserve_provisioned_vlan`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cloud_name' in params:
            path_params['cloud_name'] = params['cloud_name']  # noqa: E501
        if 'vlan_id' in params:
            path_params['vlan_id'] = params['vlan_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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/unreserve.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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 unreserve_vrid_from_vlan(self, cloud_name, vlan_id, unreserve_vrid_from_vlan, **kwargs):  # noqa: E501
        """unreserve_vrid_from_vlan  # noqa: E501

        Unreserve VRID from vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.unreserve_vrid_from_vlan(cloud_name, vlan_id, unreserve_vrid_from_vlan, async_req=True)
        >>> result = thread.get()

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

    def unreserve_vrid_from_vlan_with_http_info(self, cloud_name, vlan_id, unreserve_vrid_from_vlan, **kwargs):  # noqa: E501
        """unreserve_vrid_from_vlan  # noqa: E501

        Unreserve VRID from vlan.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.unreserve_vrid_from_vlan_with_http_info(cloud_name, vlan_id, unreserve_vrid_from_vlan, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cloud_name: (required)
        :param str vlan_id: (required)
        :param UnreserveVridFromVlan unreserve_vrid_from_vlan: (required)
        :return: InlineResponse2004
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cloud_name', 'vlan_id', 'unreserve_vrid_from_vlan']  # 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 unreserve_vrid_from_vlan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cloud_name' is set
        if self.api_client.client_side_validation and ('cloud_name' not in params or
                                                       params['cloud_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cloud_name` when calling `unreserve_vrid_from_vlan`")  # noqa: E501
        # verify the required parameter 'vlan_id' is set
        if self.api_client.client_side_validation and ('vlan_id' not in params or
                                                       params['vlan_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `vlan_id` when calling `unreserve_vrid_from_vlan`")  # noqa: E501
        # verify the required parameter 'unreserve_vrid_from_vlan' is set
        if self.api_client.client_side_validation and ('unreserve_vrid_from_vlan' not in params or
                                                       params['unreserve_vrid_from_vlan'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `unreserve_vrid_from_vlan` when calling `unreserve_vrid_from_vlan`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/clouds/{cloud_name}/vlans/{vlan_id}/unreserve_vrid.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse2004',  # 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)
