# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest import Serializer, Deserializer


class NetworkManagementClientOperationsMixin(object):


    def check_dns_name_availability(self, location, domain_name_label, custom_headers=None, raw=False, **operation_config):
        """Checks whether a domain name in the cloudapp.azure.com zone is
        available for use.

        :param location: The location of the domain name.
        :type location: str
        :param domain_name_label: The domain name to be verified. It must
         conform to the following regular expression:
         ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
        :type domain_name_label: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: DnsNameAvailabilityResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.network.v2019_04_01.models.DnsNameAvailabilityResult or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        
        """
        api_version = self._get_api_version('check_dns_name_availability')
        if api_version == '2015-06-15':
            from .v2015_06_15.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2016-09-01':
            from .v2016_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2016-12-01':
            from .v2016_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-03-01':
            from .v2017_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-06-01':
            from .v2017_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-08-01':
            from .v2017_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-09-01':
            from .v2017_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-10-01':
            from .v2017_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2017-11-01':
            from .v2017_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-01-01':
            from .v2018_01_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-02-01':
            from .v2018_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-04-01':
            from .v2018_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-06-01':
            from .v2018_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-07-01':
            from .v2018_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-08-01':
            from .v2018_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-10-01':
            from .v2018_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-11-01':
            from .v2018_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-12-01':
            from .v2018_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2019-02-01':
            from .v2019_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2019-04-01':
            from .v2019_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        mixin_instance = OperationClass()
        mixin_instance._client = self._client
        mixin_instance.config = self.config
        mixin_instance._serialize = Serializer(self._models_dict(api_version))
        mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
        return mixin_instance.check_dns_name_availability(location, domain_name_label, custom_headers, raw, **operation_config)

    def supported_security_providers(self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config):
        """Gives the supported security providers for the virtual wan.

        :param resource_group_name: The resource group name.
        :type resource_group_name: str
        :param virtual_wan_name: The name of the VirtualWAN for which
         supported security providers are needed.
        :type virtual_wan_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: VirtualWanSecurityProviders or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.network.v2019_04_01.models.VirtualWanSecurityProviders or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorException<azure.mgmt.network.v2019_04_01.models.ErrorException>`
        
        """
        api_version = self._get_api_version('supported_security_providers')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-10-01':
            from .v2018_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-11-01':
            from .v2018_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2018-12-01':
            from .v2018_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2019-02-01':
            from .v2019_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        elif api_version == '2019-04-01':
            from .v2019_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        mixin_instance = OperationClass()
        mixin_instance._client = self._client
        mixin_instance.config = self.config
        mixin_instance._serialize = Serializer(self._models_dict(api_version))
        mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
        return mixin_instance.supported_security_providers(resource_group_name, virtual_wan_name, custom_headers, raw, **operation_config)
