# --------------------------------------------------------------------------
# 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 azure.cli.core import AzCommandsLoader
import azure.cli.command_modules.marketplaceordering._help  # pylint: disable=unused-import


class MarketplaceOrderingAgreementsCommandsLoader(AzCommandsLoader):

    def __init__(self, cli_ctx=None):
        from azure.cli.core.commands import CliCommandType
        from .generated._client_factory import cf_marketplaceordering_cl
        marketplaceordering_custom = CliCommandType(
            operations_tmpl='azure.cli.command_modules.marketplaceordering.custom#{}',
            client_factory=cf_marketplaceordering_cl)
        parent = super(MarketplaceOrderingAgreementsCommandsLoader, self)
        parent.__init__(cli_ctx=cli_ctx, custom_command_type=marketplaceordering_custom)

    def load_command_table(self, args):
        from .generated.commands import load_command_table
        load_command_table(self, args)
        try:
            from .manual.commands import load_command_table as load_command_table_manual
            load_command_table_manual(self, args)
        except ImportError as e:
            if e.name.endswith('manual.commands'):
                pass
            else:
                raise e
        return self.command_table

    def load_arguments(self, command):
        from .generated._params import load_arguments
        load_arguments(self, command)
        try:
            from .manual._params import load_arguments as load_arguments_manual
            load_arguments_manual(self, command)
        except ImportError as e:
            if e.name.endswith('manual._params'):
                pass
            else:
                raise e


COMMAND_LOADER_CLS = MarketplaceOrderingAgreementsCommandsLoader
