# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines


def dns_resolver_list(cmd,
                      resource_group_name=None,
                      virtual_network_name=None,
                      top=None):
    from azext_dnsresolver.aaz.latest.dns_resolver import ListByVirtualNetwork, List
    List_By_Virtual_Network = ListByVirtualNetwork(cmd.loader)
    List_dns_resolver = List(cmd.loader)
    if resource_group_name and virtual_network_name is not None:
        args = {
            "resource_group": resource_group_name,
            "virtual_network_name": virtual_network_name,
            "top": top
        }
        return List_By_Virtual_Network(args)
    elif resource_group_name:
        args = {
            "resource_group": resource_group_name,
            "top": top
        }
        return List_dns_resolver(args)
    args = {
        "top": top
    }
    return List_dns_resolver(args)


def dns_resolver_forwarding_ruleset_list(cmd,
                                         resource_group_name=None,
                                         virtual_network_name=None,
                                         top=None):
    from azext_dnsresolver.aaz.latest.dns_resolver.forwarding_ruleset import ListByVirtualNetwork, List
    List_By_Virtual_Network = ListByVirtualNetwork(cmd.loader)
    List_dns_resolver = List(cmd.loader)
    if resource_group_name and virtual_network_name is not None:
        args = {
            "resource_group": resource_group_name,
            "virtual_network_name": virtual_network_name,
            "top": top
        }
        return List_By_Virtual_Network(args)
    elif resource_group_name:
        args = {
            "resource_group": resource_group_name,
            "top": top
        }
        return List_dns_resolver(args)
    args = {
        "top": top
    }
    return List_dns_resolver(args)
