# --------------------------------------------------------------------------
# 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-statements
# pylint: disable=too-many-locals

from azure.cli.core.commands import CliCommandType
from azext_providerhub.generated._client_factory import cf_custom_rollout
from azext_providerhub.generated._client_factory import cf_default_rollout
from azext_providerhub.generated._client_factory import cf_providerhub
from azext_providerhub.generated._client_factory import cf_provider_registration
from azext_providerhub.generated._client_factory import cf_resource_type_registration


def load_command_table(self, _):

    providerhub_custom_rollout = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._custom_rollouts_operations#CustomRollo'
        'utsOperations.{}',
        client_factory=cf_custom_rollout)
    with self.command_group('providerhub custom-rollout', providerhub_custom_rollout,
                            client_factory=cf_custom_rollout) as g:
        g.custom_command('list', 'providerhub_custom_rollout_list')
        g.custom_show_command('show', 'providerhub_custom_rollout_show')
        g.custom_command('create', 'providerhub_custom_rollout_create')

    providerhub_default_rollout = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._default_rollouts_operations#DefaultRol'
        'loutsOperations.{}',
        client_factory=cf_default_rollout)
    with self.command_group('providerhub default-rollout', providerhub_default_rollout,
                            client_factory=cf_default_rollout) as g:
        g.custom_command('list', 'providerhub_default_rollout_list')
        g.custom_show_command('show', 'providerhub_default_rollout_show')
        g.custom_command(
            'create', 'providerhub_default_rollout_create', supports_no_wait=True)
        g.custom_command(
            'delete', 'providerhub_default_rollout_delete', confirmation=True)
        g.custom_command('stop', 'providerhub_default_rollout_stop')
        g.custom_wait_command('wait', 'providerhub_default_rollout_show')

    providerhub_ = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._model_operations#ProviderhubOperations'
        'Mixin.{}',
        client_factory=cf_providerhub)
    with self.command_group(
            'providerhub manifest', providerhub_, client_factory=cf_providerhub, is_experimental=True) as g:
        g.custom_command('checkin', 'providerhub_manifest_checkin')
        g.custom_command('generate', 'providerhub_manifest_generate')

    providerhub_provider_registration = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._provider_registrations_operations#Prov'
        'iderRegistrationsOperations.{}',
        client_factory=cf_provider_registration)
    with self.command_group('providerhub provider-registration', providerhub_provider_registration,
                            client_factory=cf_provider_registration) as g:
        g.custom_command('list', 'providerhub_provider_registration_list')
        g.custom_show_command('show', 'providerhub_provider_registration_show')
        g.custom_command(
            'create', 'providerhub_provider_registration_create', supports_no_wait=True)
        g.custom_command(
            'delete', 'providerhub_provider_registration_delete', confirmation=True)
        g.custom_command('generate-operation',
                         'providerhub_provider_registration_generate_operation')
        g.custom_wait_command('wait', 'providerhub_provider_registration_show')

    providerhub_resource_type_registration = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._resource_type_registrations_operations'
        '#ResourceTypeRegistrationsOperations.{}',
        client_factory=cf_resource_type_registration)
    with self.command_group('providerhub resource-type-registration', providerhub_resource_type_registration,
                            client_factory=cf_resource_type_registration) as g:
        g.custom_command('list', 'providerhub_resource_type_registration_list')
        g.custom_show_command(
            'show', 'providerhub_resource_type_registration_show')

    providerhub_resource_type_registration = CliCommandType(
        operations_tmpl='azext_providerhub.vendored_sdks.providerhub.operations._resource_type_registration_operations#'
        'ResourceTypeRegistrationOperations.{}',
        client_factory=cf_resource_type_registration)
    with self.command_group('providerhub resource-type-registration', providerhub_resource_type_registration,
                            client_factory=cf_resource_type_registration) as g:
        g.custom_command(
            'create', 'providerhub_resource_type_registration_create')
        g.custom_command(
            'delete', 'providerhub_resource_type_registration_delete', confirmation=True)
