text:
from azure.cli.command_modules.storage._client_factory import (cf_sa, cf_blob_container_mgmt, blob_data_service_factory,
                                                               page_blob_service_factory, file_data_service_factory,
                                                               multi_service_properties_factory,
                                                               cf_mgmt_policy, cf_sa_for_keys,
                                                               cf_mgmt_blob_services, cf_mgmt_file_shares,
                                                               cf_private_link, cf_private_endpoint,
                                                               cf_mgmt_encryption_scope, cf_mgmt_file_services,
                                                               cf_adls_file_system, cf_adls_directory,
                                                               cf_adls_file, cf_adls_service,
                                                               cf_blob_client, cf_blob_lease_client,
                                                               cf_or_policy, cf_container_client,
                                                               cf_queue_service, cf_table_service, cf_table_client,
                                                               cf_sa_blob_inventory, cf_blob_service, cf_queue_client,
                                                               cf_share_client, cf_share_service,
                                                               cf_share_file_client, cf_share_directory_client,
                                                               cf_container_lease_client)

from azure.cli.core.commands import CliCommandType
from azure.cli.core.commands.arm import show_exception_handler
from azure.cli.core.profiles import ResourceType

def load_command_table(self, _):  # pylint: disable=too-many-locals, too-many-statements
    storage_account_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#StorageAccountsOperations.{}',
        client_factory=cf_sa,
        resource_type=ResourceType.MGMT_STORAGE
    )

    blob_service_mgmt_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#BlobServicesOperations.{}',
        client_factory=cf_mgmt_blob_services,
        resource_type=ResourceType.MGMT_STORAGE
    )

    file_service_mgmt_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#FileServicesOperations.{}',
        client_factory=cf_mgmt_file_services,
        resource_type=ResourceType.MGMT_STORAGE
    )

    file_shares_mgmt_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#FileSharesOperations.{}',
        client_factory=cf_mgmt_file_shares,
        resource_type=ResourceType.MGMT_STORAGE
    )

    storage_account_sdk_keys = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#StorageAccountsOperations.{}',
        client_factory=cf_sa_for_keys,
        resource_type=ResourceType.MGMT_STORAGE
    )

    private_link_resource_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#PrivateLinkResourcesOperations.{}',
        client_factory=cf_private_link,
        resource_type=ResourceType.MGMT_STORAGE
    )

    private_endpoint_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#PrivateEndpointConnectionsOperations.{}',
        client_factory=cf_private_endpoint,
        resource_type=ResourceType.MGMT_STORAGE
    )

    private_endpoint_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_private_endpoint,
        resource_type=ResourceType.MGMT_STORAGE)

    storage_account_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_sa)

    block_blob_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storage.blob.blockblobservice#BlockBlobService.{}',
        client_factory=blob_data_service_factory,
        resource_type=ResourceType.DATA_STORAGE)

    def get_custom_sdk(custom_module, client_factory, resource_type=ResourceType.DATA_STORAGE):
        """Returns a CliCommandType instance with specified operation template based on the given custom module name.
        This is useful when the command is not defined in the default 'custom' module but instead in a module under
        'operations' package."""
        return CliCommandType(
            operations_tmpl='azure.cli.command_modules.storage.operations.{}#'.format(
                custom_module) + '{}',
            client_factory=client_factory,
            resource_type=resource_type
        )

    with self.command_group('storage', command_type=block_blob_sdk,
                            custom_command_type=get_custom_sdk('azcopy', blob_data_service_factory)) as g:
        g.storage_custom_command('remove', 'storage_remove')

    with self.command_group('storage', custom_command_type=get_custom_sdk('azcopy', None)) as g:
        from ._validators import validate_azcopy_credential
        g.storage_custom_command('copy', 'storage_copy', validator=validate_azcopy_credential)

    with self.command_group('storage account', storage_account_sdk, resource_type=ResourceType.MGMT_STORAGE,
                            custom_command_type=storage_account_custom_type) as g:
        g.custom_command('check-name', 'check_name_availability')
        g.custom_command('create', 'create_storage_account')
        g.command('delete', 'delete', confirmation=True)
        g.show_command('show', 'get_properties')
        g.custom_command('list', 'list_storage_accounts')
        g.custom_command(
            'show-usage', 'show_storage_account_usage', min_api='2018-02-01')
        g.custom_command(
            'show-usage', 'show_storage_account_usage_no_location', max_api='2017-10-01')
        g.custom_command('show-connection-string',
                         'show_storage_account_connection_string')
        g.generic_update_command('update', getter_name='get_properties', setter_name='update',
                                 custom_func_name='update_storage_account', min_api='2016-12-01')
        failover_confirmation = """
        The secondary cluster will become the primary cluster after failover. Please understand the following impact to your storage account before you initiate the failover:
            1. Please check the Last Sync Time using `az storage account show` with `--expand geoReplicationStats` and check the "geoReplicationStats" property. This is the data you may lose if you initiate the failover.
            2. After the failover, your storage account type will be converted to locally redundant storage (LRS). You can convert your account to use geo-redundant storage (GRS).
            3. Once you re-enable GRS/GZRS for your storage account, Microsoft will replicate data to your new secondary region. Replication time is dependent on the amount of data to replicate. Please note that there are bandwidth charges for the bootstrap. Please refer to doc: https://azure.microsoft.com/pricing/details/bandwidth/
        """
        g.command('failover', 'begin_failover', supports_no_wait=True, is_preview=True, min_api='2018-07-01',
                  confirmation=failover_confirmation)
        g.command('hns-migration start', 'begin_hierarchical_namespace_migration',
                  supports_no_wait=True, min_api='2021-06-01')
        g.command('hns-migration stop', 'begin_abort_hierarchical_namespace_migration',
                  supports_no_wait=True, min_api='2021-06-01')

    with self.command_group('storage account', storage_account_sdk_keys, resource_type=ResourceType.MGMT_STORAGE,
                            custom_command_type=storage_account_custom_type) as g:
        from ._validators import validate_key_name
        g.custom_command('keys renew', 'regenerate_key', validator=validate_key_name,
                         transform=lambda x: getattr(x, 'keys', x))
        g.command('keys list', 'list_keys',
                  transform=lambda x: getattr(x, 'keys', x))
        g.command('revoke-delegation-keys', 'revoke_user_delegation_keys', min_api='2019-04-01')

    account_blob_service_custom_sdk = get_custom_sdk('account', client_factory=cf_blob_service,
                                                     resource_type=ResourceType.DATA_STORAGE_BLOB)
    with self.command_group('storage account', resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=account_blob_service_custom_sdk) as g:
        g.storage_custom_command('generate-sas', 'generate_sas')

    blob_inventory_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#BlobInventoryPoliciesOperations.{}',
        client_factory=cf_sa_blob_inventory,
        resource_type=ResourceType.MGMT_STORAGE
    )

    blob_inventory_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_sa_blob_inventory,
        resource_type=ResourceType.MGMT_STORAGE
    )

    with self.command_group('storage account blob-inventory-policy', blob_inventory_sdk,
                            custom_command_type=blob_inventory_custom_type, is_preview=True,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2020-08-01-preview') as g:
        g.custom_command('create', 'create_blob_inventory_policy')
        g.generic_update_command('update', getter_name='get_blob_inventory_policy',
                                 getter_type=blob_inventory_custom_type,
                                 setter_name='update_blob_inventory_policy',
                                 setter_type=blob_inventory_custom_type)
        g.custom_command('delete', 'delete_blob_inventory_policy', confirmation=True)
        g.custom_show_command('show', 'get_blob_inventory_policy')

    encryption_scope_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#EncryptionScopesOperations.{}',
        client_factory=cf_mgmt_encryption_scope,
        resource_type=ResourceType.MGMT_STORAGE
    )

    encryption_scope_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_mgmt_encryption_scope,
        resource_type=ResourceType.MGMT_STORAGE
    )

    with self.command_group('storage account encryption-scope', encryption_scope_sdk,
                            custom_command_type=encryption_scope_custom_type,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-06-01') as g:

        g.custom_command('create', 'create_encryption_scope')
        g.show_command('show', 'get')
        g.command('list', 'list')
        g.custom_command('update', 'update_encryption_scope')

    management_policy_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#ManagementPoliciesOperations.{}',
        client_factory=cf_mgmt_policy,
        resource_type=ResourceType.MGMT_STORAGE
    )

    management_policy_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_mgmt_policy)

    storage_blob_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.blob#{}',
        client_factory=cf_sa,
        resource_type=ResourceType.MGMT_STORAGE)

    with self.command_group('storage account management-policy', management_policy_sdk,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2018-11-01',
                            custom_command_type=management_policy_custom_type) as g:
        g.custom_show_command('show', 'get_management_policy')
        g.custom_command('create', 'create_management_policies')
        g.generic_update_command('update', getter_name='get_management_policy',
                                 getter_type=management_policy_custom_type,
                                 setter_name='update_management_policies',
                                 setter_type=management_policy_custom_type)
        g.custom_command('delete', 'delete_management_policy')

    with self.command_group('storage account network-rule', storage_account_sdk,
                            custom_command_type=storage_account_custom_type,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2017-06-01') as g:
        g.custom_command('add', 'add_network_rule')
        g.custom_command('list', 'list_network_rules')
        g.custom_command('remove', 'remove_network_rule')

    or_policy_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#ObjectReplicationPoliciesOperations.{}',
        client_factory=cf_or_policy,
        resource_type=ResourceType.MGMT_STORAGE)

    or_policy_custom_type = CliCommandType(
        operations_tmpl='azure.cli.command_modules.storage.operations.account#{}',
        client_factory=cf_or_policy)

    with self.command_group('storage account or-policy', or_policy_sdk, is_preview=True,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-06-01',
                            custom_command_type=or_policy_custom_type) as g:
        g.show_command('show', 'get')
        g.command('list', 'list')
        g.custom_command('create', 'create_or_policy')
        g.generic_update_command('update', setter_name='update_or_policy', setter_type=or_policy_custom_type)
        g.command('delete', 'delete')

    with self.command_group('storage account or-policy rule', or_policy_sdk, is_preview=True,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-06-01',
                            custom_command_type=or_policy_custom_type) as g:
        g.custom_show_command('show', 'get_or_rule')
        g.custom_command('list', 'list_or_rules')
        g.custom_command('add', 'add_or_rule')
        g.custom_command('update', 'update_or_rule')
        g.custom_command('remove', 'remove_or_rule')

    with self.command_group('storage account private-endpoint-connection', private_endpoint_sdk,
                            custom_command_type=private_endpoint_custom_type, is_preview=True,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-06-01') as g:
        from ._validators import validate_private_endpoint_connection_id
        g.command('delete', 'delete', confirmation=True, validator=validate_private_endpoint_connection_id)
        g.show_command('show', 'get', validator=validate_private_endpoint_connection_id)
        g.custom_command('approve', 'approve_private_endpoint_connection',
                         validator=validate_private_endpoint_connection_id)
        g.custom_command('reject', 'reject_private_endpoint_connection',
                         validator=validate_private_endpoint_connection_id)

    with self.command_group('storage account private-link-resource', private_link_resource_sdk,
                            resource_type=ResourceType.MGMT_STORAGE) as g:
        from azure.cli.core.commands.transform import gen_dict_to_list_transform
        g.command('list', 'list_by_storage_account', is_preview=True, min_api='2019-06-01',
                  transform=gen_dict_to_list_transform(key="value"))

    with self.command_group('storage account blob-service-properties', blob_service_mgmt_sdk,
                            custom_command_type=storage_account_custom_type,
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2018-07-01') as g:
        from ._transformers import transform_restore_policy_output
        g.show_command('show', 'get_service_properties', transform=transform_restore_policy_output)
        g.generic_update_command('update',
                                 getter_name='get_service_properties',
                                 setter_name='set_service_properties',
                                 custom_func_name='update_blob_service_properties',
                                 transform=transform_restore_policy_output)

    with self.command_group('storage account file-service-properties', file_service_mgmt_sdk,
                            custom_command_type=get_custom_sdk('account', client_factory=cf_mgmt_file_services,
                                                               resource_type=ResourceType.MGMT_STORAGE),
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-06-01') as g:
        g.show_command('show', 'get_service_properties')
        g.generic_update_command('update',
                                 getter_name='get_service_properties',
                                 setter_name='set_service_properties',
                                 custom_func_name='update_file_service_properties')

    with self.command_group('storage logging', get_custom_sdk('logging', multi_service_properties_factory)) as g:
        from ._transformers import transform_logging_list_output
        g.storage_command('update', 'set_logging')
        g.storage_command('show', 'get_logging',
                          table_transformer=transform_logging_list_output,
                          exception_handler=show_exception_handler)
        g.storage_command('off', 'disable_logging', is_preview=True)

    with self.command_group('storage metrics', get_custom_sdk('metrics', multi_service_properties_factory)) as g:
        from ._transformers import transform_metrics_list_output
        g.storage_command('update', 'set_metrics')
        g.storage_command('show', 'get_metrics',
                          table_transformer=transform_metrics_list_output,
                          exception_handler=show_exception_handler)

    blob_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.blob._blob_client#BlobClient.{}',
        client_factory=cf_blob_client,
        resource_type=ResourceType.DATA_STORAGE_BLOB
    )

    with self.command_group('storage blob', blob_client_sdk, resource_type=ResourceType.DATA_STORAGE_BLOB,
                            min_api='2019-02-02',
                            custom_command_type=get_custom_sdk('blob', client_factory=cf_blob_client,
                                                               resource_type=ResourceType.DATA_STORAGE_BLOB)) as g:
        from ._transformers import (transform_blob_list_output, transform_blob_json_output,
                                    transform_blob_upload_output, transform_url_without_encode,
                                    create_boolean_result_output_transformer)
        from ._format import transform_blob_output, transform_boolean_for_table
        from ._exception_handler import file_related_exception_handler
        from ._validators import (process_blob_upload_batch_parameters, process_blob_download_batch_parameters,
                                  process_blob_delete_batch_parameters)
        g.storage_custom_command_oauth('copy start', 'copy_blob')
        g.storage_command_oauth('copy cancel', 'abort_copy')
        g.storage_custom_command_oauth('show', 'show_blob_v2', transform=transform_blob_json_output,
                                       table_transformer=transform_blob_output,
                                       exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('set-tier', 'set_blob_tier_v2')
        g.storage_custom_command_oauth('list', 'list_blobs', client_factory=cf_container_client,
                                       transform=transform_blob_list_output,
                                       table_transformer=transform_blob_output)
        g.storage_custom_command_oauth('query', 'query_blob',
                                       is_preview=True, min_api='2019-12-12')
        g.storage_custom_command_oauth('rewrite', 'rewrite_blob', is_preview=True, min_api='2020-04-08')
        g.storage_command_oauth('set-legal-hold', 'set_legal_hold', min_api='2020-10-02')
        g.storage_custom_command_oauth('immutability-policy set', 'set_immutability_policy', min_api='2020-10-02')
        g.storage_command_oauth('immutability-policy delete', 'delete_immutability_policy', min_api='2020-10-02')
        g.storage_custom_command_oauth('upload', 'upload_blob', transform=transform_blob_upload_output,
                                       exception_handler=file_related_exception_handler)
        g.storage_custom_command_oauth('upload-batch', 'storage_blob_upload_batch', client_factory=cf_blob_service,
                                       validator=process_blob_upload_batch_parameters,
                                       exception_handler=file_related_exception_handler)
        g.storage_custom_command_oauth('download', 'download_blob',
                                       transform=transform_blob_json_output,
                                       table_transformer=transform_blob_output,
                                       exception_handler=file_related_exception_handler)
        g.storage_custom_command_oauth('download-batch', 'storage_blob_download_batch', client_factory=cf_blob_service,
                                       validator=process_blob_download_batch_parameters,
                                       exception_handler=file_related_exception_handler)
        g.storage_custom_command_oauth('url', 'create_blob_url', client_factory=cf_blob_service,
                                       transform=transform_url_without_encode)
        g.storage_command_oauth('metadata show', 'get_blob_properties', exception_handler=show_exception_handler,
                                transform=lambda x: x.metadata)
        g.storage_command_oauth('metadata update', 'set_blob_metadata')
        g.storage_command_oauth('snapshot', 'create_snapshot')
        g.storage_command_oauth('update', 'set_http_headers')
        g.storage_custom_command_oauth('exists', 'exists', client_factory=cf_blob_service,
                                       transform=create_boolean_result_output_transformer('exists'))
        g.storage_command_oauth('delete', 'delete_blob')
        g.storage_command_oauth('undelete', 'undelete_blob',
                                transform=create_boolean_result_output_transformer('undeleted'),
                                table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('delete-batch', 'storage_blob_delete_batch', client_factory=cf_blob_service,
                                       validator=process_blob_delete_batch_parameters)

    blob_service_custom_sdk = get_custom_sdk('blob', client_factory=cf_blob_service,
                                             resource_type=ResourceType.DATA_STORAGE_BLOB)
    with self.command_group('storage blob', resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=blob_service_custom_sdk) as g:
        g.storage_custom_command_oauth('generate-sas', 'generate_sas_blob_uri')

    blob_service_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.blob._blob_service_client#' 'BlobServiceClient.{}',
        client_factory=cf_blob_service,
        resource_type=ResourceType.DATA_STORAGE_BLOB
    )

    with self.command_group('storage blob', blob_service_sdk, resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=blob_service_custom_sdk) as g:
        from ._transformers import transform_blob_json_output_track2
        g.storage_custom_command_oauth('copy start-batch', 'storage_blob_copy_batch')
        g.storage_command_oauth('service-properties show', 'get_service_properties',
                                transform=transform_blob_json_output_track2, exception_handler=show_exception_handler)
        g.storage_command_oauth('service-properties update', generic_update=True, getter_name='get_service_properties',
                                setter_type=get_custom_sdk('blob', cf_blob_service),
                                setter_name='set_service_properties_track2',
                                custom_func_name='transform_blob_generic_output',
                                client_factory=lambda cli_ctx, kwargs: cf_blob_service(cli_ctx, kwargs.copy()),
                                transform=transform_blob_json_output_track2)
        g.storage_command_oauth('service-properties delete-policy show',
                                'get_service_properties', transform=lambda x: x['delete_retention_policy'],
                                exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('service-properties delete-policy update', 'set_delete_policy')

    blob_lease_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.blob._lease#BlobLeaseClient.{}',
        client_factory=cf_blob_lease_client,
        resource_type=ResourceType.DATA_STORAGE_BLOB
    )

    with self.command_group('storage blob lease', blob_lease_client_sdk, resource_type=ResourceType.DATA_STORAGE_BLOB,
                            min_api='2019-02-02',
                            custom_command_type=get_custom_sdk('blob', client_factory=cf_blob_lease_client,
                                                               resource_type=ResourceType.DATA_STORAGE_BLOB)) as g:
        g.storage_custom_command_oauth('acquire', 'acquire_blob_lease')
        g.storage_command_oauth('break', 'break_lease')
        g.storage_command_oauth('change', 'change')
        g.storage_custom_command_oauth('renew', 'renew_blob_lease')
        g.storage_command_oauth('release', 'release')

    with self.command_group('storage blob', storage_account_sdk, resource_type=ResourceType.MGMT_STORAGE,
                            custom_command_type=storage_blob_custom_type) as g:
        g.custom_command('restore', 'restore_blob_ranges', min_api='2019-06-01', supports_no_wait=True)

    with self.command_group('storage blob incremental-copy',
                            operations_tmpl='azure.multiapi.storage.blob.pageblobservice#PageBlobService.{}',
                            client_factory=page_blob_service_factory,
                            resource_type=ResourceType.DATA_STORAGE,
                            min_api='2016-05-31') as g:
        g.storage_command_oauth('start', 'incremental_copy_blob')

    with self.command_group('storage blob incremental-copy',
                            operations_tmpl='azure.multiapi.storage.blob.blockblobservice#BlockBlobService.{}',
                            client_factory=page_blob_service_factory,
                            resource_type=ResourceType.DATA_STORAGE,
                            min_api='2016-05-31') as g:
        g.storage_command_oauth('cancel', 'abort_copy_blob')

    with self.command_group('storage blob', command_type=block_blob_sdk,
                            custom_command_type=get_custom_sdk('azcopy', blob_data_service_factory)) as g:
        g.storage_custom_command('sync', 'storage_blob_sync', is_preview=True)

    container_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.blob._container_client#'
                        'ContainerClient.{}',
        client_factory=cf_container_client,
        resource_type=ResourceType.DATA_STORAGE_BLOB
    )
    with self.command_group('storage container', command_type=container_client_sdk,
                            resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=get_custom_sdk('blob', client_factory=cf_container_client,
                                                               resource_type=ResourceType.DATA_STORAGE_BLOB)) as g:
        from ._transformers import transform_container_json_output, transform_container_permission_output
        from azure.cli.command_modules.storage._format import transform_container_show
        g.storage_command_oauth('show', 'get_container_properties',
                                transform=transform_container_json_output,
                                table_transformer=transform_container_show,
                                exception_handler=show_exception_handler)
        g.storage_command_oauth('exists', 'exists',
                                transform=create_boolean_result_output_transformer('exists'),
                                table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('set-permission', 'set_container_permission')
        g.storage_command_oauth('show-permission', 'get_container_access_policy',
                                transform=transform_container_permission_output)
        g.storage_command_oauth('metadata update', 'set_container_metadata')
        g.storage_command_oauth('metadata show', 'get_container_properties',
                                exception_handler=show_exception_handler,
                                transform=lambda x: getattr(x, 'metadata', x))

    container_lease_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.blob._lease#BlobLeaseClient.{}',
        client_factory=cf_container_lease_client,
        resource_type=ResourceType.DATA_STORAGE_BLOB
    )

    with self.command_group('storage container lease', container_lease_client_sdk,
                            resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=get_custom_sdk('blob', client_factory=cf_container_lease_client,
                                                               resource_type=ResourceType.DATA_STORAGE_BLOB)) as g:
        g.storage_custom_command_oauth('acquire', 'acquire_blob_lease')
        g.storage_custom_command_oauth('renew', 'renew_blob_lease')
        g.storage_command_oauth('break', 'break_lease')
        g.storage_command_oauth('change', 'change')
        g.storage_command_oauth('release', 'release')

    with self.command_group('storage container', command_type=blob_service_sdk,
                            custom_command_type=blob_service_custom_sdk,
                            resource_type=ResourceType.DATA_STORAGE_BLOB) as g:
        from ._transformers import transform_container_list_output
        from azure.cli.command_modules.storage._format import transform_container_list
        from ._validators import process_container_delete_parameters
        g.storage_custom_command_oauth('create', 'create_container',
                                       transform=create_boolean_result_output_transformer('created'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('delete', 'delete_container',
                                       validator=process_container_delete_parameters,
                                       transform=create_boolean_result_output_transformer('deleted'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('list', 'list_containers', min_api='2019-02-02',
                                       transform=transform_container_list_output,
                                       table_transformer=transform_container_list)
        g.storage_custom_command_oauth('generate-sas', 'generate_container_shared_access_signature')
        g.storage_command_oauth('restore', 'undelete_container', min_api='2020-02-10')

    with self.command_group('storage container policy', resource_type=ResourceType.DATA_STORAGE_BLOB,
                            custom_command_type=get_custom_sdk('access_policy', client_factory=cf_container_client,
                                                               resource_type=ResourceType.DATA_STORAGE_BLOB)) as g:
        from ._transformers import transform_acl_list_output, transform_acl_edit, transform_acl_datetime
        g.storage_custom_command_oauth('create', 'create_acl_policy', transform=transform_acl_edit)
        g.storage_custom_command_oauth('delete', 'delete_acl_policy', transform=transform_acl_edit)
        g.storage_custom_command_oauth(
            'update', 'set_acl_policy', transform=transform_acl_edit)
        g.storage_custom_command_oauth(
            'show', 'get_acl_policy', transform=transform_acl_datetime, exception_handler=show_exception_handler)
        g.storage_custom_command_oauth(
            'list', 'list_acl_policies', table_transformer=transform_acl_list_output)

    blob_container_mgmt_sdk = CliCommandType(
        operations_tmpl='azure.mgmt.storage.operations#BlobContainersOperations.{}',
        client_factory=cf_blob_container_mgmt,
        resource_type=ResourceType.MGMT_STORAGE
    )

    with self.command_group('storage container immutability-policy', command_type=blob_container_mgmt_sdk,
                            custom_command_type=get_custom_sdk('blob', cf_blob_container_mgmt,
                                                               resource_type=ResourceType.MGMT_STORAGE),
                            min_api='2018-02-01') as g:
        from azure.cli.command_modules.storage._transformers import transform_immutability_policy

        from ._validators import validate_allow_protected_append_writes_all

        g.show_command('show', 'get_immutability_policy',
                       transform=transform_immutability_policy)
        g.custom_command('create', 'create_or_update_immutability_policy',
                         validator=validate_allow_protected_append_writes_all)
        g.command('delete', 'delete_immutability_policy',
                  transform=lambda x: None)
        g.command('lock', 'lock_immutability_policy')
        g.custom_command('extend', 'extend_immutability_policy')

    with self.command_group('storage container legal-hold', command_type=blob_container_mgmt_sdk,
                            custom_command_type=get_custom_sdk('blob', cf_blob_container_mgmt,
                                                               resource_type=ResourceType.MGMT_STORAGE),
                            min_api='2018-02-01') as g:
        g.custom_command('set', 'set_legal_hold')
        g.custom_command('clear', 'clear_legal_hold')
        g.show_command(
            'show', 'get', transform=lambda x: getattr(x, 'legal_hold', x))

    with self.command_group('storage container-rm', command_type=blob_container_mgmt_sdk,
                            custom_command_type=get_custom_sdk('blob', cf_blob_container_mgmt,
                                                               resource_type=ResourceType.MGMT_STORAGE),
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2018-02-01') as g:
        g.custom_command('create', 'create_container_rm')
        g.command('delete', 'delete', confirmation=True)
        g.generic_update_command('update', setter_name='update', max_api='2019-04-01')
        g.generic_update_command('update', setter_name='update', setter_arg_name='blob_container',
                                 custom_func_name='update_container_rm', min_api='2019-06-01')
        g.custom_command('list', 'list_container_rm')
        g.custom_command('exists', 'container_rm_exists', transform=create_boolean_result_output_transformer('exists'),
                         table_transformer=transform_boolean_for_table)
        g.show_command('show', 'get')
        g.command('migrate-vlw', 'begin_object_level_worm', supports_no_wait=True, is_preview=True)

    file_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storage.file.fileservice#FileService.{}',
        client_factory=file_data_service_factory,
        resource_type=ResourceType.DATA_STORAGE)

    share_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.fileshare._share_client#ShareClient.{}',
        client_factory=cf_share_client,
        resource_type=ResourceType.DATA_STORAGE_FILESHARE)

    share_service_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.fileshare._share_service_client#ShareServiceClient.{}',
        client_factory=cf_share_service,
        resource_type=ResourceType.DATA_STORAGE_FILESHARE)

    directory_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.fileshare._directory_client#ShareDirectoryClient.{}',
        client_factory=cf_share_directory_client,
        resource_type=ResourceType.DATA_STORAGE_FILESHARE)

    file_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.fileshare._file_client#ShareFileClient.{}',
        client_factory=cf_share_file_client,
        resource_type=ResourceType.DATA_STORAGE_FILESHARE)

    with self.command_group('storage share-rm', command_type=file_shares_mgmt_sdk,
                            custom_command_type=get_custom_sdk('file',
                                                               cf_mgmt_file_shares,
                                                               resource_type=ResourceType.MGMT_STORAGE),
                            resource_type=ResourceType.MGMT_STORAGE, min_api='2019-04-01') as g:
        from ._transformers import transform_share_rm_output, transform_share_rm_list_output
        g.custom_command('create', 'create_share_rm')
        g.command('delete', 'delete', confirmation=True)
        g.custom_command('exists', '_file_share_exists', transform=create_boolean_result_output_transformer('exists'))
        g.custom_command('list', 'list_share_rm', transform=transform_share_rm_list_output)
        g.show_command('show', 'get', transform=transform_share_rm_output)
        g.generic_update_command('update', setter_name='update', setter_arg_name='file_share',
                                 custom_func_name='update_share_rm')
        g.custom_command('stats', 'get_stats', transform=lambda x: getattr(x, 'share_usage_bytes'))
        g.custom_command('restore', 'restore_share_rm')
        g.custom_command('snapshot', 'snapshot_share_rm', min_api='2020-08-01-preview', is_preview=True,
                         transform=transform_share_rm_output)

    with self.command_group('storage share', command_type=share_client_sdk,
                            custom_command_type=get_custom_sdk('fileshare', cf_share_client,
                                                               ResourceType.DATA_STORAGE_FILESHARE),
                            resource_type=ResourceType.DATA_STORAGE_FILESHARE, min_api='2019-02-02') as g:
        from ._format import transform_boolean_for_table
        from ._transformers import (transform_file_share_json_output, transform_share_list_handle)
        g.storage_custom_command('create', 'create_share',
                                 transform=create_boolean_result_output_transformer('created'),
                                 table_transformer=transform_boolean_for_table)
        g.storage_custom_command('delete', 'delete_share',
                                 transform=create_boolean_result_output_transformer('deleted'),
                                 table_transformer=transform_boolean_for_table)
        g.storage_custom_command('generate-sas', 'generate_share_sas')
        g.storage_custom_command('stats', 'get_share_stats')
        g.storage_custom_command('snapshot', 'create_snapshot')
        g.storage_command('show', 'get_share_properties', exception_handler=show_exception_handler,
                          transform=transform_file_share_json_output)
        g.storage_custom_command('exists', 'share_exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_command('update', 'set_share_quota')
        g.storage_command('metadata show', 'get_share_properties', exception_handler=show_exception_handler,
                          transform=lambda x: getattr(x, 'metadata', x))
        g.storage_custom_command('metadata update', 'set_share_metadata',
                                 transform=create_boolean_result_output_transformer('updated'))
        g.storage_custom_command('list-handle', 'list_handle', transform=transform_share_list_handle)
        g.storage_custom_command('close-handle', 'close_handle')

    with self.command_group('storage share', command_type=share_service_sdk,
                            custom_command_type=get_custom_sdk('fileshare', cf_share_service,
                                                               ResourceType.DATA_STORAGE_FILESHARE),
                            resource_type=ResourceType.DATA_STORAGE_FILESHARE, min_api='2019-02-02') as g:
        from ._transformers import transform_storage_list_output
        from ._format import transform_share_list
        from ._transformers import transform_url_without_encode
        g.storage_custom_command('list', 'list_shares', transform=transform_storage_list_output,
                                 table_transformer=transform_share_list)
        g.storage_custom_command('url', 'create_share_url', transform=transform_url_without_encode)

    with self.command_group('storage share policy',
                            custom_command_type=get_custom_sdk('access_policy', cf_share_client,
                                                               ResourceType.DATA_STORAGE_FILESHARE),
                            resource_type=ResourceType.DATA_STORAGE_FILESHARE, min_api='2019-02-02') as g:
        from ._transformers import transform_acl_list_output, transform_acl_edit, transform_acl_datetime
        g.storage_custom_command('create', 'create_acl_policy', transform=transform_acl_edit)
        g.storage_custom_command('delete', 'delete_acl_policy', transform=transform_acl_edit)
        g.storage_custom_command(
            'show', 'get_acl_policy', exception_handler=show_exception_handler, transform=transform_acl_datetime)
        g.storage_custom_command(
            'list', 'list_acl_policies', table_transformer=transform_acl_list_output)
        g.storage_custom_command('update', 'set_acl_policy', transform=transform_acl_edit)

    with self.command_group('storage directory', command_type=directory_client_sdk,
                            custom_command_type=get_custom_sdk('directory', cf_share_directory_client)) as g:
        from ._transformers import transform_share_directory_json_output
        from ._format import transform_file_directory_result, transform_file_output
        g.storage_custom_command('create', 'create_directory',
                                 transform=create_boolean_result_output_transformer('created'),
                                 table_transformer=transform_boolean_for_table)
        g.storage_custom_command('delete', 'delete_directory',
                                 transform=create_boolean_result_output_transformer('deleted'),
                                 table_transformer=transform_boolean_for_table)
        g.storage_custom_command('show', 'get_directory_properties',
                                 transform=transform_share_directory_json_output,
                                 table_transformer=transform_file_output,
                                 exception_handler=show_exception_handler)
        g.storage_command('exists', 'exists',
                          transform=create_boolean_result_output_transformer('exists'))
        g.storage_command('metadata show', 'get_directory_properties',
                          exception_handler=show_exception_handler,
                          transform=lambda x: getattr(x, 'metadata', x))
        g.storage_command('metadata update', 'set_directory_metadata')
        g.storage_custom_command('list', 'list_share_directories',
                                 transform=transform_file_directory_result,
                                 table_transformer=transform_file_output)

    with self.command_group('storage file', command_type=file_sdk,
                            custom_command_type=get_custom_sdk('file', file_data_service_factory)) as g:
        from ._format import transform_boolean_for_table, transform_file_output
        from ._exception_handler import file_related_exception_handler
        g.storage_command('download', 'get_file_to_path', exception_handler=file_related_exception_handler)
        g.storage_custom_command(
            'download-batch', 'storage_file_download_batch')
        g.storage_custom_command('delete-batch', 'storage_file_delete_batch')

    with self.command_group('storage file', command_type=file_client_sdk,
                            custom_command_type=get_custom_sdk('file', cf_share_file_client)) as g:
        from ._transformers import transform_file_show_result
        from ._format import transform_metadata_show
        g.storage_custom_command('list', 'list_share_files', client_factory=cf_share_client,
                                 transform=transform_file_directory_result,
                                 table_transformer=transform_file_output)
        g.storage_command('delete', 'delete_file', transform=create_boolean_result_output_transformer('deleted'),
                          table_transformer=transform_boolean_for_table)
        g.storage_command('resize', 'resize_file')
        g.storage_custom_command('url', 'create_file_url', transform=transform_url_without_encode,
                                 client_factory=cf_share_client)
        g.storage_custom_command('generate-sas', 'generate_sas_file', client_factory=cf_share_client)
        g.storage_command('show', 'get_file_properties', transform=transform_file_show_result,
                          table_transformer=transform_file_output,
                          exception_handler=show_exception_handler)
        g.storage_custom_command('update', 'file_updates', resource_type=ResourceType.DATA_STORAGE_FILESHARE)
        g.storage_custom_command('exists', 'file_exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_command('metadata show', 'get_file_properties', exception_handler=show_exception_handler,
                          transform=transform_metadata_show)
        g.storage_command('metadata update', 'set_file_metadata')
        g.storage_custom_command('copy start', 'storage_file_copy', resource_type=ResourceType.DATA_STORAGE_FILESHARE)
        g.storage_command('copy cancel', 'abort_copy')
        g.storage_custom_command('copy start-batch', 'storage_file_copy_batch', client_factory=cf_share_client)

        g.storage_custom_command('upload', 'storage_file_upload', exception_handler=file_related_exception_handler,
                                 resource_type=ResourceType.DATA_STORAGE_FILESHARE)
        g.storage_custom_command('upload-batch', 'storage_file_upload_batch',
                                 custom_command_type=get_custom_sdk('file', client_factory=cf_share_client))

    with self.command_group('storage cors', get_custom_sdk('cors', multi_service_properties_factory)) as g:
        from ._transformers import transform_cors_list_output

        g.storage_command('add', 'add_cors')
        g.storage_command('clear', 'clear_cors')
        g.storage_command('list', 'list_cors',
                          transform=transform_cors_list_output)

    queue_client_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.queue._queue_client#QueueClient.{}',
        client_factory=cf_queue_client, resource_type=ResourceType.DATA_STORAGE_QUEUE)

    with self.command_group('storage queue', command_type=queue_client_sdk, is_preview=True,
                            custom_command_type=get_custom_sdk('queue', cf_queue_client,
                                                               ResourceType.DATA_STORAGE_QUEUE),
                            resource_type=ResourceType.DATA_STORAGE_QUEUE, min_api='2018-03-28') as g:
        from ._format import transform_boolean_for_table
        from ._transformers import create_boolean_result_output_transformer

        g.storage_custom_command_oauth('create', 'create_queue',
                                       transform=create_boolean_result_output_transformer('created'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('delete', 'delete_queue',
                                       transform=create_boolean_result_output_transformer('deleted'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command(
            'generate-sas', 'generate_queue_sas')
        g.storage_custom_command_oauth('exists', 'queue_exists',
                                       transform=create_boolean_result_output_transformer('exists'))

        g.storage_command_oauth(
            'metadata show', 'get_queue_properties',
            exception_handler=show_exception_handler, transform=lambda x: getattr(x, 'metadata', x))
        g.storage_command_oauth('metadata update', 'set_queue_metadata',
                                transform=create_boolean_result_output_transformer('updated'))

    with self.command_group('storage queue policy', command_type=queue_client_sdk, is_preview=True,
                            custom_command_type=get_custom_sdk('access_policy', cf_queue_client,
                                                               ResourceType.DATA_STORAGE_QUEUE),
                            resource_type=ResourceType.DATA_STORAGE_QUEUE, min_api='2018-03-28') as g:
        from ._transformers import (transform_acl_list_output, transform_queue_policy_output,
                                    transform_queue_policy_json_output)
        g.storage_custom_command_oauth('create', 'create_acl_policy')
        g.storage_custom_command_oauth('delete', 'delete_acl_policy')
        g.storage_custom_command_oauth('show', 'get_acl_policy',
                                       transform=transform_queue_policy_output,
                                       exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('list', 'list_acl_policies',
                                       transform=transform_queue_policy_json_output,
                                       table_transformer=transform_acl_list_output)
        g.storage_custom_command_oauth('update', 'set_acl_policy')

    with self.command_group('storage message', command_type=queue_client_sdk, is_preview=True,
                            custom_command_type=get_custom_sdk('queue', cf_queue_client,
                                                               ResourceType.DATA_STORAGE_QUEUE),
                            resource_type=ResourceType.DATA_STORAGE_QUEUE, min_api='2018-03-28') as g:
        from ._transformers import (transform_message_list_output, transform_message_output)
        from ._format import transform_message_show

        g.storage_command_oauth('put', 'send_message', transform=transform_message_output)
        g.storage_custom_command_oauth('get', 'receive_messages', transform=transform_message_list_output,
                                       table_transformer=transform_message_show)
        g.storage_command_oauth('peek', 'peek_messages', transform=transform_message_list_output,
                                table_transformer=transform_message_show)
        g.storage_command_oauth('delete', 'delete_message',
                                transform=create_boolean_result_output_transformer('deleted'),
                                table_transformer=transform_boolean_for_table)
        g.storage_command_oauth('clear', 'clear_messages')
        g.storage_command_oauth('update', 'update_message', transform=transform_message_output)

    queue_service_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.queue._queue_service_client#QueueServiceClient.{}',
        client_factory=cf_queue_service, resource_type=ResourceType.DATA_STORAGE_QUEUE)

    with self.command_group('storage queue', command_type=queue_service_sdk, is_preview=True,
                            custom_command_type=get_custom_sdk('queue', cf_queue_service,
                                                               ResourceType.DATA_STORAGE_QUEUE),
                            resource_type=ResourceType.DATA_STORAGE_QUEUE, min_api='2018-03-28') as g:
        from ._transformers import transform_queue_stats_output
        g.storage_command_oauth('stats', 'get_service_stats', transform=transform_queue_stats_output)
        g.storage_custom_command_oauth('list', 'list_queues', transform=transform_storage_list_output)

    table_service_sdk = CliCommandType(operations_tmpl='azure.data.tables._table_service_client#TableServiceClient.{}',
                                       client_factory=cf_table_service,
                                       resource_type=ResourceType.DATA_STORAGE_TABLE)

    table_client_sdk = CliCommandType(operations_tmpl='azure.data.tables._table_client#TableClient.{}',
                                      client_factory=cf_table_client,
                                      resource_type=ResourceType.DATA_STORAGE_TABLE)

    with self.command_group('storage table', table_service_sdk, resource_type=ResourceType.DATA_STORAGE_TABLE,
                            custom_command_type=get_custom_sdk('table', cf_table_service)) as g:
        from ._transformers import transform_table_stats_output
        g.storage_custom_command_oauth('create', 'create_table',
                                       transform=create_boolean_result_output_transformer('created'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('delete', 'delete_table',
                                       transform=create_boolean_result_output_transformer('deleted'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_custom_command_oauth('exists', 'exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_custom_command('generate-sas', 'generate_sas')
        g.storage_custom_command_oauth('list', 'list_tables')
        g.storage_command_oauth('stats', 'get_service_stats', transform=transform_table_stats_output)

    with self.command_group('storage table policy', table_client_sdk, resource_type=ResourceType.DATA_STORAGE_TABLE,
                            custom_command_type=get_custom_sdk('access_policy', cf_table_client)) as g:
        g.storage_custom_command('create', 'create_acl_policy')
        g.storage_custom_command('delete', 'delete_acl_policy')
        g.storage_custom_command('show', 'get_acl_policy',
                                 exception_handler=show_exception_handler)
        g.storage_custom_command('list', 'list_acl_policies',
                                 table_transformer=transform_acl_list_output)
        g.storage_custom_command('update', 'set_acl_policy')

    with self.command_group('storage entity', table_client_sdk, resource_type=ResourceType.DATA_STORAGE_TABLE,
                            custom_command_type=get_custom_sdk('table', cf_table_client)) as g:
        from ._format import transform_entity_show
        from ._transformers import (transform_entity_query_output,
                                    transform_entities_result,
                                    transform_entity_result)
        g.storage_custom_command_oauth('insert', 'insert_entity')
        g.storage_custom_command_oauth('replace', 'replace_entity')
        g.storage_custom_command_oauth('merge', 'merge_entity')
        g.storage_custom_command_oauth('delete', 'delete_entity',
                                       transform=create_boolean_result_output_transformer('deleted'),
                                       table_transformer=transform_boolean_for_table)
        g.storage_command_oauth('show', 'get_entity',
                                table_transformer=transform_entity_show,
                                transform=transform_entity_result,
                                exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('query', 'query_entity',
                                       table_transformer=transform_entity_query_output,
                                       transform=transform_entities_result)

    adls_service_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.filedatalake._data_lake_service_client#DataLakeServiceClient.{}',
        client_factory=cf_adls_service,
        resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE
    )

    adls_fs_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.filedatalake._file_system_client#FileSystemClient.{}',
        client_factory=cf_adls_file_system,
        resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE
    )
    adls_directory_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.filedatalake._data_lake_directory_client#DataLakeDirectoryClient.{}',
        client_factory=cf_adls_directory,
        resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE
    )
    custom_adls_directory_sdk = get_custom_sdk(custom_module='fs_directory',
                                               client_factory=cf_adls_directory,
                                               resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE)
    adls_file_sdk = CliCommandType(
        operations_tmpl='azure.multiapi.storagev2.filedatalake._data_lake_file_client#DataLakeFileClient.{}',
        client_factory=cf_adls_file,
        resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE
    )

    with self.command_group('storage fs', adls_fs_sdk, resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE,
                            custom_command_type=get_custom_sdk('filesystem', cf_adls_file_system),
                            min_api='2018-11-09') as g:
        from ._transformers import transform_fs_list_public_access_output, transform_fs_public_access_output, \
            transform_metadata
        g.storage_command_oauth('create', 'create_file_system')
        g.storage_command_oauth('list', 'list_file_systems', command_type=adls_service_sdk,
                                transform=transform_fs_list_public_access_output)
        g.storage_command_oauth('show', 'get_file_system_properties', exception_handler=show_exception_handler,
                                transform=transform_fs_public_access_output)
        g.storage_command_oauth('delete', 'delete_file_system', confirmation=True)
        g.storage_custom_command_oauth('exists', 'exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_command_oauth('metadata update', 'set_file_system_metadata')
        g.storage_command_oauth('metadata show', 'get_file_system_properties', exception_handler=show_exception_handler,
                                transform=transform_metadata)
        g.storage_custom_command_oauth('generate-sas', 'generate_sas_fs_uri', is_preview=True,
                                       custom_command_type=get_custom_sdk('filesystem', client_factory=cf_adls_service))
        g.storage_custom_command_oauth('list-deleted-path', 'list_deleted_path', min_api='2020-06-12')
        g.storage_command_oauth('undelete-path', '_undelete_path', min_api='2020-06-12')

    with self.command_group('storage fs service-properties', command_type=adls_service_sdk,
                            custom_command_type=get_custom_sdk('filesystem', cf_adls_service),
                            resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE, min_api='2020-06-12') as g:
        g.storage_command_oauth('show', 'get_service_properties', exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('update', 'set_service_properties')

    with self.command_group('storage fs directory', adls_directory_sdk,
                            custom_command_type=get_custom_sdk('fs_directory', cf_adls_directory),
                            resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE, min_api='2018-11-09') as g:
        from ._transformers import transform_storage_list_output, transform_metadata
        g.storage_command_oauth('create', 'create_directory')
        g.storage_custom_command_oauth('exists', 'exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_custom_command_oauth('show', 'get_directory_properties', exception_handler=show_exception_handler)
        g.storage_command_oauth('delete', 'delete_directory', confirmation=True)
        g.storage_command_oauth('move', 'rename_directory')
        g.storage_custom_command_oauth('list', 'list_fs_directories', client_factory=cf_adls_file_system,
                                       transform=transform_storage_list_output)
        g.storage_command_oauth('metadata update', 'set_metadata')
        g.storage_command_oauth('metadata show', 'get_directory_properties', exception_handler=show_exception_handler,
                                transform=transform_metadata)
        g.storage_custom_command_oauth('generate-sas', 'generate_sas_directory_uri',
                                       custom_command_type=get_custom_sdk('fs_directory',
                                                                          client_factory=cf_adls_service),
                                       min_api='2020-02-10')

    with self.command_group('storage fs directory', custom_command_type=get_custom_sdk('azcopy', None))as g:
        g.storage_custom_command('upload', 'storage_fs_directory_copy', is_preview=True)
        g.storage_custom_command('download', 'storage_fs_directory_copy', is_preview=True)

    with self.command_group('storage fs file', adls_file_sdk, resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE,
                            custom_command_type=get_custom_sdk('fs_file', cf_adls_file), min_api='2018-11-09') as g:
        from ._transformers import transform_storage_list_output, create_boolean_result_output_transformer
        g.storage_command_oauth('create', 'create_file')
        g.storage_custom_command_oauth('upload', 'upload_file')
        g.storage_custom_command_oauth('exists', 'exists', transform=create_boolean_result_output_transformer('exists'))
        g.storage_custom_command_oauth('append', 'append_file')
        g.storage_custom_command_oauth('download', 'download_file')
        g.storage_custom_command_oauth('show', 'get_file_properties', exception_handler=show_exception_handler)
        g.storage_custom_command_oauth('list', 'list_fs_files',
                                       custom_command_type=get_custom_sdk('fs_file', cf_adls_file_system),
                                       transform=transform_storage_list_output)
        g.storage_command_oauth('move', 'rename_file')
        g.storage_command_oauth('delete', 'delete_file', confirmation=True)
        g.storage_command_oauth('metadata update', 'set_metadata')
        g.storage_command_oauth('metadata show', 'get_file_properties', exception_handler=show_exception_handler,
                                transform=transform_metadata)
        g.storage_command_oauth('set-expiry', "set_file_expiry")

    with self.command_group('storage fs access', adls_directory_sdk, custom_command_type=custom_adls_directory_sdk,
                            resource_type=ResourceType.DATA_STORAGE_FILEDATALAKE, min_api='2018-11-09') as g:
        from ._transformers import transform_fs_access_output
        g.storage_command_oauth('set', 'set_access_control')
        g.storage_command_oauth('show', 'get_access_control', transform=transform_fs_access_output)
        g.storage_custom_command_oauth('set-recursive', 'set_access_control_recursive', min_api='2020-02-10')
        g.storage_custom_command_oauth('update-recursive', 'update_access_control_recursive', min_api='2020-02-10')
        g.storage_custom_command_oauth('remove-recursive', 'remove_access_control_recursive', min_api='2020-02-10')


text:
from sphinx.ext import autodoc
from inspect import formatargspec
from powerline.lint.inspect import getconfigargspec
from powerline.lib.threaded import ThreadedSegment

try:
	from __builtin__ import unicode
except ImportError:
	unicode = lambda s, enc: s  # NOQA

def formatvalue(val):
	if type(val) is str:
		return '="' + unicode(val, 'utf-8').replace('"', '\\"').replace('\\', '\\\\') + '"'
	else:
		return '=' + repr(val)

class ThreadedDocumenter(autodoc.FunctionDocumenter):
	'''Specialized documenter subclass for ThreadedSegment subclasses.'''
	@classmethod
	def can_document_member(cls, member, membername, isattr, parent):
		return (isinstance(member, ThreadedSegment) or
			super(ThreadedDocumenter, cls).can_document_member(member, membername, isattr, parent))

	def format_args(self):
		argspec = getconfigargspec(self.object)
		return formatargspec(*argspec, formatvalue=formatvalue).replace('\\', '\\\\')

def setup(app):
	autodoc.setup(app)
	app.add_autodocumenter(ThreadedDocumenter)

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Teucrium aureum subsp. turdetanum Devesa & E.Valdés-Bermejo

### Remarks
null


text:
package org.apache.ignite.internal.processors.cache;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import javax.cache.Cache;
import javax.cache.configuration.Factory;
import javax.cache.configuration.FactoryBuilder;
import org.apache.ignite.cache.store.CacheStore;
import org.apache.ignite.cache.store.CacheStoreAdapter;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.lang.IgniteBiInClosure;

/**
 * {@link TestCacheStoreStrategy} implemented as a wrapper around {@link #map}
 */
public class MapCacheStoreStrategy implements TestCacheStoreStrategy {
    /** Removes counter. */
    private static final AtomicInteger removes = new AtomicInteger();

    /** Writes counter. */
    private static final AtomicInteger writes = new AtomicInteger();

    /** Reads counter. */
    private static final AtomicInteger reads = new AtomicInteger();

    /** Store map. */
    private static final Map<Object, Object> map = new ConcurrentHashMap<>();

    /** {@inheritDoc} */
    @Override public int getReads() {
        return reads.get();
    }

    /** {@inheritDoc} */
    @Override public int getWrites() {
        return writes.get();
    }

    /** {@inheritDoc} */
    @Override public int getRemoves() {
        return removes.get();
    }

    /** {@inheritDoc} */
    @Override public int getStoreSize() {
        return map.size();
    }

    /** {@inheritDoc} */
    @Override public void resetStore() {
        map.clear();

        reads.set(0);
        writes.set(0);
        removes.set(0);
    }

    /** {@inheritDoc} */
    @Override public void putToStore(Object key, Object val) {
        map.put(key, val);
    }

    /** {@inheritDoc} */
    @Override public void putAllToStore(Map<?, ?> data) {
        map.putAll(data);
    }

    /** {@inheritDoc} */
    @Override public Object getFromStore(Object key) {
        return map.get(key);
    }

    /** {@inheritDoc} */
    @Override public void removeFromStore(Object key) {
        map.remove(key);
    }

    /** {@inheritDoc} */
    @Override public boolean isInStore(Object key) {
        return map.containsKey(key);
    }

    /** {@inheritDoc} */
    @Override public void updateCacheConfiguration(CacheConfiguration<Object, Object> cfg) {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public Factory<? extends CacheStore<Object, Object>> getStoreFactory() {
        return FactoryBuilder.factoryOf(MapCacheStore.class);
    }

    /** Serializable {@link #map} backed cache store factory */
    public static class MapStoreFactory implements Factory<CacheStore<Object, Object>> {
        /** {@inheritDoc} */
        @Override public CacheStore<Object, Object> create() {
            return new MapCacheStore();
        }
    }

    /** {@link CacheStore} backed by {@link #map} */
    public static class MapCacheStore extends CacheStoreAdapter<Object, Object> {
        /** {@inheritDoc} */
        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
            for (Map.Entry<Object, Object> e : map.entrySet())
                clo.apply(e.getKey(), e.getValue());
        }

        /** {@inheritDoc} */
        @Override public Object load(Object key) {
            reads.incrementAndGet();
            return map.get(key);
        }

        /** {@inheritDoc} */
        @Override public void write(Cache.Entry<?, ?> e) {
            writes.incrementAndGet();
            map.put(e.getKey(), e.getValue());
        }

        /** {@inheritDoc} */
        @Override public void delete(Object key) {
            removes.incrementAndGet();
            map.remove(key);
        }
    }
}


text:
require 'spec_helper'
require 'fpm/cookery/source'

describe "Source" do
  describe "#provider?" do
    context "with a provider set" do
      it "returns true" do
        source = FPM::Cookery::Source.new('http://example.com/', :with => :git)

        source.provider?.must_equal true
      end
    end

    context "without a provider set" do
      it "returns false" do
        source = FPM::Cookery::Source.new('http://example.com/')

        source.provider?.must_equal false
      end
    end
  end

  describe "#local?" do
    context "with a file:// url" do
      it "returns true" do
        source = FPM::Cookery::Source.new('file:///tmp')

        source.local?.must_equal true
      end
    end

    context "with no file:// url" do
      it "returns false" do
        source = FPM::Cookery::Source.new('https://www.example.com/')

        source.local?.must_equal false
      end
    end
  end

  describe "#path" do
    it "returns the url path" do
      source = FPM::Cookery::Source.new('file:///opt/src/foo')

      source.path.must_equal '/opt/src/foo'
    end
  end

  context "with a private GitHub URL" do
    it "can handle it" do
      source = FPM::Cookery::Source.new('git@github.com:foo/bar.git')

      source.url.must_equal 'git@github.com:foo/bar.git'
      source.path.must_equal 'foo/bar.git'
    end
  end
end


text:
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.0] — 2020-09-03

### Release

New Circlemenu v1.0.0 is out and we added a lot of cool update:

There are many more changes to our documentation, internals, generators and general project setup. You can find a full changelog below.

### Main

- Reorganize the root structure
- Remove jQuery
- Refactor all code from jQuery to VanillaJS
- Add Jest test suite

### Documentation updates

- Update all md files to explain new functionality
- Spelling and grammar fixes

### Internals updates

- Many dependency updates and some libraries added, including:
  - jest
  - eslint
  - babel
  - webpack
  - ngrok
  and many oters.
- Migrate default Node version to `10.0.0`
- Fix support for `stylelint`
- Remove unused libraries
- Add Webpack code config
- Miscellaneous fixes
- Reorganize the package.json scripts


text:
.module-main { width: 1000px; }
.submodule-content {
	width: 1000px;
	margin:0 auto;
}

ul.images {
	display:none;
}

.panel {
	float:left;
}

ul.exposureThumbs {
	background:#666;
	border:12px solid #666;
	border-right:none;
	padding:0;
	margin:0;
	list-style-type:none;
}

ul.exposureThumbs li {
	margin:0 0 12px 0;
	padding:0;
	text-align:center;
	display:none;
}

ul.exposureThumbs li img {
	cursor:pointer;
    border: 1px solid white;
}

ul.exposureThumbs li.last {
	margin:0;
}

.exposureTarget {
	width:1000px;
	background-color:#666;
	background-image:url(/static/res/loader.gif);
	background-repeat:no-repeat;
	background-position:center center;
	float:left;
	padding:0;
	margin:0;
	border:12px solid #666;
	position:relative;
	overflow:hidden;
}

.exposureWrapper {
	position:absolute;
	top:0;
	left:0;
}

.exposureWrapper img {
    width: 860px;
	cursor:pointer;
	position:absolute;
	top:0;
	left:0;
}

.exposureLoaded {
	background-image:none;
}

.exposureData {
	position:absolute;
 	left:0;
 	right:0;
 	bottom:-2000px;
	height:60px;
	padding:7px;
	background-image:url(/static/res/veil.png);
	color:#fff;
	font-size:13px;
	display:none;
    line-height: 1.2em;
}

/* In this demo we are using thumbs with fixed size */
ul.exposureThumbs li {
	height:79px;
}

.exposureSlideshowControls a,
.exposureControls span,
.exposureControls a {
	font-size:11px;
	padding:8px;
	background-color:#AAA;
	display:block;
	float:left;
}

.exposureSlideshowControls a {
	float:right;
}

.exposureSlideshowControls a,
.exposureControls a {
	color: black;
	text-decoration:none;
	outline:none;
}

.exposureSlideshowControls a:active,
.exposureSlideshowControls a:hover,
.exposureControls a:active,
.exposureControls a:hover {
	background-color:#444;
	color:#ddd;
}

.exposurePaging .active {
	color:#fff;
	background-color:#333;
}

.clear {
	clear:both;
}

p.info {
	margin:40px auto;
	text-align:center;
	width:600px;
}

p.info a {
	color:#006fc0;
}

p.info a:hover, p.info a:active {
	color:#0084e7;
}


text:
Installation
============

## Prerequisites

This bundle requires Symfony 2.1+.

You have to use a user/password based security mechanism.

Your user entity has to be managed by Doctrine ORM.

## Installation

### Step 1: Download using Composer

Add this bundle via Composer:

```bash
php composer.phar require scheb/two-factor-bundle
```

When being asked for the version use dev-master or any different version you want.

Alternatively you can also add the bundle directly to composer.json:

```js
{
    "require": {
        "scheb/two-factor-bundle": "dev-master"
    }
}
```

and then tell Composer to install the bundle:

```bash
php composer.phar update scheb/two-factor-bundle
```

### Step 2: Enable the bundle

Enable this bundle in your app/AppKernel.php:

```php
<?php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
    );
}
```


text:
<!DOCTYPE html>

  <title>Bootstrap Theme Company Page</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">

      </button>
      AZZAINIYYAH

PROFIL

SERVICES

PORTFOLIO

UNIT PENDIDIKAN

BLOG

CONTACT

Pondok Pesantren

  Azzainiyyah

                Bukakan Pintu Langit, Getarkan Bumi.

Profil Azzainiyyah

Pesantren ini didirikan oleh KH. Zezen Zainal Abidin Zayadi Bazul Asyhab (Alm) pada 04 Febuari 1978 yang kemudian Pesantren Azzainiyyah kini dilanjutkan oleh puteranya yaitu KH. Aang Abdullah Zein.

Pada tahun – tahun pertama awal berdirinya, para santri Kyai Zezen (Alm) adalah anak – anak kecil yang sering di juluki pasukan semut, tetapi seiring waktu berkat ketekunannya mengajar, lambat laun santri bertambah banyak. Sekarang Azzainiyyah sudah memiliki santri dan santriwati salafi lebih dari 150 orang yang mondok, belum lagi siswa sekolah  formal yang mencapai 800 orang dengan deretan bangunan yang cukup besar dan banyak diatas lahan dengan luas tak kurang dari tujuh hektar. Tidak hanya itu, di Pondok Pesantren Azzainiyyah ini rutin mengadakan pengajian bulanan yang biasanya di ikuti oleh lebih dari lima ribu mustami yang merupakan Jamaah Toriqoh tetap dari berbagai daerah.

Our Values

MISSION: Our mission lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

VISION: Our vision Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

SERVICES

What we offer

POWER

Lorem ipsum dolor sit amet..

LOVE

Lorem ipsum dolor sit amet..

JOB DONE

Lorem ipsum dolor sit amet..

GREEN

Lorem ipsum dolor sit amet..

CERTIFIED

Lorem ipsum dolor sit amet..

HARD WORK

Lorem ipsum dolor sit amet..

Portfolio

What we have created

Paris

Yes, we built Paris

New York

We built New York

San Francisco

Yes, San Fran is ours

What our customers say

"This company is the best. I am so happy with the result!"
Michael Roe, Vice President, Comment Box

"One word... WOW!!"
John Doe, Salesman, Rep Inc

"Could I... BE any more happy with this company?"
Chandler Bing, Actor, FriendsAlot

      Previous

      Next

Pendidikan

Selain Pendidikan Salafiyah di Ponpes AZZAINIYYAH juga mempunyai unit pendidikan dari mulai RA - SMA/SMK

RA

50 Lorem

25 Ipsum

10 Dolor

5 Sit

Endless Amet

MDTA

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

MI

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

MTs

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

SMP

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

MA

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

SMA

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

SMK

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

STIT

100 Lorem

50 Ipsum

25 Dolor

10 Sit

Endless Amet

CONTACT

Contact us and we'll get back to you within 24 hours.

 Chicago, US

 +00 1515151515

 myemail@something.com

          <input class="form-control" id="name" name="name" placeholder="Name" type="text" required>

          <input class="form-control" id="email" name="email" placeholder="Email" type="email" required>

      <textarea class="form-control" id="comments" name="comments" placeholder="Comment" rows="5"></textarea>

          <button class="btn btn-default pull-right" type="submit">Send</button>

Bootstrap Theme Made By www.w3schools.com


text:
// std includes
#include <iostream>

// c includes
#include <cstring>

// kronos includes
#include "chandler.h"
#include "../macros.h"
#include "../networking/buffer.h"

namespace kronos
{

ConnectionHandler::ConnectionHandler()
{
    LOG("CHandler: Created a new ConnectionHandler object.");
}

int ConnectionHandler::processLogin(Socket &socket)
{
    unsigned char connection_t;

    // Get the type of the connection
    if (socket.rData(&connection_t, 1) != 1)
    {
        ERR("CHandler: Invalid or corrupted connection request.");
        return 1;
    }

    // Init a variable used to store the result
    int result = 0;

    // Handle each connection type separately
    switch (connection_t)
    {
    case TYPE_HANDSHAKE:
        result = processHandshake(socket);
        break;
    case TYPE_UPDATE:
        result = 1;
        ERR("CHandler: Update connection request type not supported.");
        break;
    case TYPE_STANDARD:
    case TYPE_RECONNECTION:
        result = processHeader(socket);
        break;
    case TYPE_JAGGRAB:
        result = 1;
        ERR("CHandler: Jaggrab connection request type not supported.");
        break;
    }

    return result;
}

int ConnectionHandler::processHandshake(Socket &socket)
{
    LOG("CHandler: Processing handshake connection request.");

    // Allocate i/o buffers for us
    Buffer buffer_i(1);
    Buffer buffer_o(17);

    // Get the input name hash
    if (socket.rData(buffer_i.getData(), 1) < 1)
    {
        ERR("CHandler: Error while processing handshake, didn't receive the username hash.");
        return 1;
    }

    unsigned char m_usernamehash = buffer_i.read_byte();
    unsigned long m_serverseed = static_cast<unsigned long>(rand());

    // Send a successful response
    buffer_o.write_byte(STATUS_EXCHANGE_DATA); // Response status.
    buffer_o.write_long(0); // Client seed.
    buffer_o.write_long(m_serverseed); // Server seed, to be used later.

    if (socket.sData(buffer_o.getDataStart(), buffer_o.getData() - buffer_o.getDataStart()) < 17)
    {
        ERR("CHandler: Error, failed to send a correct handshake response.");
        return 1;
    }

    // Continue to process the header next
    return processHeader(socket);
}

int ConnectionHandler::processHeader(Socket &socket)
{
    LOG("CHandler: Processing header connection request.");

    // Allocate the i buffer for us
    Buffer buffer_i(2);

    // Get the request
    if (socket.rData(buffer_i.getData(), 2) < 2)
    {
        ERR("CHandler: Error while processing header, received wrong or corrupted data.");
        return 1;
    }

    // Get the type of the connection
    int type = buffer_i.read_byte();

    if (type != TYPE_STANDARD && type != TYPE_RECONNECTION)
    {
        return processRejection(socket, STATUS_LOGIN_SERVER_REJECTED_SESSION);
    }

    m_reconnecting = type = TYPE_RECONNECTION;
    m_loginlength = buffer_i.read_byte();

    // Continue to process the payload next
    return processPayload(socket);
}

int ConnectionHandler::processPayload(Socket &socket)
{
    LOG("CHandler: Processing payload connection request.");

    // Allocate the i buffer for us
    Buffer buffer_i(m_loginlength);

    // Get the request
    if (socket.rData(buffer_i.getData(), m_loginlength) < m_loginlength)
    {
        ERR("CHandler: Error while processing payload, received wrong or corrupted data.");
        return 1;
    }

    // Start reading the data
    LoginRequest loginrequest;
    loginrequest.client_version = 255 - buffer_i.read_byte();
    loginrequest.client_release = buffer_i.read_short();
    loginrequest.client_detail = buffer_i.read_byte();

    // Reject the session if client detail isn't 0 or 1
    if (loginrequest.client_detail != 0 && loginrequest.client_detail != 1)
    {
        return processRejection(socket, STATUS_LOGIN_SERVER_REJECTED_SESSION);
    }

    // CRCs, we don't care about them for now...
    for (size_t i = 0; i < 9; i++)
    {
        buffer_i.read_int();
    }

    // Message length, provided from client as well
    unsigned int length = buffer_i.read_byte();
    if (length != m_loginlength - 41)
    {
        return processRejection(socket, STATUS_LOGIN_SERVER_REJECTED_SESSION);
    }

    // Read id
    unsigned int id = buffer_i.read_byte();

    if (id != 10)
    {
        return processRejection(socket, STATUS_LOGIN_SERVER_REJECTED_SESSION);
    }

    // Client / Server seeds
    unsigned long clientSeed = buffer_i.read_long();
    unsigned long serverSeed = buffer_i.read_long();

    /*
    if (serverSeed != m_serverseed)
    {
        ERR("CHandler: The seed provided by the client doesn't match with server's, rejected session.");
        return processRejection(socket);
    }
    */

    // Continue reading user data
    unsigned int uid = buffer_i.read_int();
    char *username = buffer_i.read_string();
    char *password = buffer_i.read_string();

    // Reject if username or password lengths aren't inside required bounds
    if (strlen(password) < 6 || strlen(password) > 20 || strlen(username) < 1 || strlen(username) > 12)
    {
        return processRejection(socket, STATUS_LOGIN_SERVER_REJECTED_SESSION);
    }

    // Continue reading / assigning user data
    loginrequest.username = username;
    loginrequest.password = password;

    // Process the so far successful request
    return processSuccess(socket, loginrequest);
}

int ConnectionHandler::processRejection(Socket &socket, login_t status)
{
    // Allocate the o buffer for us
    Buffer buffer_o(1);

    // Send a rejected response
    buffer_o.write_byte(status);

    if (socket.sData(buffer_o.getDataStart(), buffer_o.getData() - buffer_o.getDataStart()) < 1)
    {
        ERR("CHandler: Error, failed to send a login server rejected session response.");
        return 1;
    }

    return status;
}

int ConnectionHandler::processSuccess(Socket &socket, LoginRequest loginrequest)
{
    // Initialize a login response
    LoginResponse loginresponse(STATUS_OK, 2, 0);

    // Allocate the o buffer for us
    Buffer buffer_o(3);

    // Send a success response
    buffer_o.write_byte(loginresponse.status);
    buffer_o.write_byte(loginresponse.rights);
    buffer_o.write_byte(loginresponse.flagged);

    if (socket.sData(buffer_o.getDataStart(), buffer_o.getData() - buffer_o.getDataStart()) < 3)
    {
        ERR("CHandler: Error, failed to send a login server success session response.");
        return 1;
    }

    // Successful login, print info
    LOG("req: " << loginrequest.username << " | " << loginrequest.password << " | " << loginrequest.client_detail << " | " << loginrequest.client_version << " | " << loginrequest.client_release
        << " | " << loginrequest.client_reconnecting);
    LOG("res: " << loginresponse.status << " | " << loginresponse.rights << " | " << loginresponse.flagged);

    return loginresponse.status;
}

}


text:
<?php

require_once('../../includes/initialize.php');

$routes = BusRoute::find_all();
$stops = BusStop::find_all();
$buses = Bus::find_all();
$bus_personnel = BusPersonnel::find_all();
$object_type = new ObjectType();

$q = $_GET['q'];

$selected_object_type = $object_type->find_by_id($q);

if ($selected_object_type->object_type_name == 'bus_route') {

	echo 'Bus Route';
	echo '
';
	echo '<select name="bus_route_id">';

	foreach ($routes as $route){
		echo '<option value="' . $route->id . '">';
		echo $route->route_number;
		echo '</option>';
	}

	echo '</select>';
	echo '
';

} else if ($selected_object_type->object_type_name == 'stop') {

	echo 'Bus Stop';
	echo '
';
	echo '<select name="stop_id">';

	foreach ($stops as $stop){
		echo '<option value="' . $stop->id . '">';
		echo $stop->name;
		echo '</option>';
	}

	echo '</select>';
	echo '
';

} else if ($selected_object_type->object_type_name == 'bus') {

	echo 'Bus';
	echo '
';
	echo '<select name="bus_id">';

	foreach ($buses as $bus){
		echo '<option value="' . $bus->id . '">';
		echo $bus->reg_number;
		echo '</option>';
	}

	echo '</select>';
	echo '
';

} else if ($selected_object_type->object_type_name == 'bus_personnel') {

	echo 'Bus Personnel';
	echo '
';
	echo '<select name="bus_personnel_id">';

	foreach ($bus_personnel as $bp){
		echo '<option value="' . $bp->id . '">';
		echo $bp->full_name();
		echo '</option>';
	}

	echo '</select>';
	echo '
';

}

?>


text:
{% load static %}
{% load form_helpers %}
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Log In – Peering Manager</title>

    <link rel="stylesheet" href="{% static 'bootstrap-4.5.3-dist/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'select2-4.0.13/css/select2.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/select2-bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/login.css' %}?{{ settings.VERSION }}">
    <link rel="icon" type="image/svg" href="{% static 'img/peering-manager.svg' %}">

          {% if settings.BANNER_LOGIN %}

            {{ settings.BANNER_LOGIN|safe }}

          {% endif %}
          {% for message in messages %}

            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              ×
            </button>
            {{ message }}

          {% endfor %}
          {% if form.non_field_errors %}

Errors

              {{ form.non_field_errors }}

          {% endif %}
          <form class="form-login" action="{% url 'login' %}" method="post">

Please log in

            {% csrf_token %}
            {% if 'next' in request.GET %}
            <input type="hidden" name="next" value="{{ request.GET.next }}" />
            {% endif %}
            {% render_field form.username %}
            {% render_field form.password %}
            <button type="submit" class="btn btn-lg btn-block btn-primary">Log In</button>

               API ·
               Docs ·
               GitHub

          </form>


text:
<?php

namespace ClashOfClans\Api;

use ClashOfClans\Api\Clan\Clan;
use ClashOfClans\Api\Location\Location;

abstract class AbstractResource
{

    protected $data = [];

    protected $casts = [
        'location' => Location::class
    ];

    protected function __construct()
    {

    }

    /**
     * @param array $properties
     * @return static
     */
    public static function makeFromArray(array $properties)
    {
        $instance = new static;

        $instance->parseProperties($properties);

        return $instance;
    }

    protected function parseProperties(array $properties)
    {
        foreach ($properties as $key => $value) {
            $this->parse($key, $value);
        }
    }

    protected function parse($key, $value)
    {
        if ($this->isCastable($key)) {
            return $this->cast($key, $value);
        }

        return $this->setRawProperty($key, $value);
    }

    /**
     * @param $key
     * @return bool
     */
    protected function isCastable($key)
    {
        return array_key_exists($key, $this->casts) || is_int($key);
    }

    /**
     * @param $key
     * @param $value
     * @return Clan
     */
    protected function cast($key, $value)
    {
        $class = is_int($key) ? $this->casts['all'] : $this->casts[$key];

        return $this->setRawProperty($key, $class::makeFromArray($value));
    }

    /**
     * @param $key
     * @param $value
     * @return Clan
     */
    protected function setRawProperty($key, $value)
    {
        $this->data[$key] = $value;

        return $this;
    }

    protected function get($key = null)
    {
        if ($key === null) {
            return $this->data;
        }

        return isset($this->data[$key]) ? $this->data[$key] : null;
    }

    public function __call($name, $arguments)
    {
        if ($data = $this->get($name)) {
            return $data;
        }
    }
}


text:
'use strict';

function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

import * as React from 'react';

var StaticRenderer =
/*#__PURE__*/
function (_React$Component) {
  _inheritsLoose(StaticRenderer, _React$Component);

  function StaticRenderer() {
    return _React$Component.apply(this, arguments) || this;
  }

  var _proto = StaticRenderer.prototype;

  _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
    return nextProps.shouldUpdate;
  };

  _proto.render = function render() {
    return this.props.render();
  };

  return StaticRenderer;
}(React.Component);

export default StaticRenderer;


text:
// Copyright (C) 2008 Wim Meeussen <meeussen at willowgarage com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//

#ifndef __NON_LINEAR_SYSTEM_CONDITIONAL_GAUSSIAN_ODO__
#define __NON_LINEAR_SYSTEM_CONDITIONAL_GAUSSIAN_ODO__

#include <pdf/analyticconditionalgaussian_additivenoise.h>

namespace BFL
{
  /// Non Linear Conditional Gaussian
  /**
     - \f$ \mu = Matrix[1] . ConditionalArguments[0] +
     Matrix[2]. ConditionalArguments[1]  + ... + Noise.\mu \f$
     - Covariance is independent of the ConditionalArguments, and is
     the covariance of the Noise pdf
  */
  class NonLinearAnalyticConditionalGaussianOdo : public AnalyticConditionalGaussianAdditiveNoise
  {
    public:
      /// Constructor
      /** @pre:  Every Matrix should have the same amount of rows!
	  This is currently not checked.  The same goes for the number
	  of columns, which should be equal to the number of rows of
	  the corresponding conditional argument!
	  @param additiveNoise Pdf representing the additive Gaussian uncertainty
      */
      NonLinearAnalyticConditionalGaussianOdo( const Gaussian& additiveNoise);

      /// Destructor
      virtual ~NonLinearAnalyticConditionalGaussianOdo();

      // redefine virtual functions
      virtual MatrixWrapper::ColumnVector    ExpectedValueGet() const;
      virtual MatrixWrapper::Matrix          dfGet(unsigned int i)       const;

    private:
      mutable MatrixWrapper::Matrix df;
    };

} // End namespace BFL

#endif //


text:
package net.lipecki.watson.receipt;

import lombok.Builder;
import lombok.Data;

import java.util.List;

@Data
@Builder
public class ReceiptSummaryDto {

    private String uuid;
    private String cost;
    private String date;
    private String categoryName;
    private List<String> categoryPath;
    private String accountName;
    private String shopName;
    private List<ReceiptSummaryItem> items;

    @Data
    @Builder
    public static class ReceiptSummaryItem {

        private String uuid;
        private String productName;
        private String categoryName;
        private List<String> categoryPath;
        private String amount;
        private String unit;
        private String cost;

    }

}


text:
package cc5g

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// AddGroupDnsAuthorizationRule invokes the cc5g.AddGroupDnsAuthorizationRule API synchronously
func (client *Client) AddGroupDnsAuthorizationRule(request *AddGroupDnsAuthorizationRuleRequest) (response *AddGroupDnsAuthorizationRuleResponse, err error) {
	response = CreateAddGroupDnsAuthorizationRuleResponse()
	err = client.DoAction(request, response)
	return
}

// AddGroupDnsAuthorizationRuleWithChan invokes the cc5g.AddGroupDnsAuthorizationRule API asynchronously
func (client *Client) AddGroupDnsAuthorizationRuleWithChan(request *AddGroupDnsAuthorizationRuleRequest) (<-chan *AddGroupDnsAuthorizationRuleResponse, <-chan error) {
	responseChan := make(chan *AddGroupDnsAuthorizationRuleResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.AddGroupDnsAuthorizationRule(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// AddGroupDnsAuthorizationRuleWithCallback invokes the cc5g.AddGroupDnsAuthorizationRule API asynchronously
func (client *Client) AddGroupDnsAuthorizationRuleWithCallback(request *AddGroupDnsAuthorizationRuleRequest, callback func(response *AddGroupDnsAuthorizationRuleResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *AddGroupDnsAuthorizationRuleResponse
		var err error
		defer close(result)
		response, err = client.AddGroupDnsAuthorizationRule(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// AddGroupDnsAuthorizationRuleRequest is the request struct for api AddGroupDnsAuthorizationRule
type AddGroupDnsAuthorizationRuleRequest struct {
	*requests.RpcRequest
	WirelessCloudConnectorGroupId string           `position:"Query" name:"WirelessCloudConnectorGroupId"`
	ClientToken                   string           `position:"Query" name:"ClientToken"`
	Description                   string           `position:"Query" name:"Description"`
	DryRun                        requests.Boolean `position:"Query" name:"DryRun"`
	SourceDNSIp                   string           `position:"Query" name:"SourceDNSIp"`
	DestinationIp                 string           `position:"Query" name:"DestinationIp"`
	Name                          string           `position:"Query" name:"Name"`
}

// AddGroupDnsAuthorizationRuleResponse is the response struct for api AddGroupDnsAuthorizationRule
type AddGroupDnsAuthorizationRuleResponse struct {
	*responses.BaseResponse
	RequestId           string `json:"RequestId" xml:"RequestId"`
	AuthorizationRuleId string `json:"AuthorizationRuleId" xml:"AuthorizationRuleId"`
}

// CreateAddGroupDnsAuthorizationRuleRequest creates a request to invoke AddGroupDnsAuthorizationRule API
func CreateAddGroupDnsAuthorizationRuleRequest() (request *AddGroupDnsAuthorizationRuleRequest) {
	request = &AddGroupDnsAuthorizationRuleRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("CC5G", "2022-03-14", "AddGroupDnsAuthorizationRule", "fivegcc", "openAPI")
	request.Method = requests.POST
	return
}

// CreateAddGroupDnsAuthorizationRuleResponse creates a response to parse from AddGroupDnsAuthorizationRule response
func CreateAddGroupDnsAuthorizationRuleResponse() (response *AddGroupDnsAuthorizationRuleResponse) {
	response = &AddGroupDnsAuthorizationRuleResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
// This is a manifest file that'll be compiled into application.js.
//
// Any JavaScript file within this directory can be referenced here using a relative path.
//
// You're free to add application-wide JavaScript to this file, but it's generally better
// to create separate JavaScript files as needed.
//
//= require jquery-2.1.3.js
//= require bootstrap
//= require_tree .
//= require_self

if (typeof jQuery !== 'undefined') {
    (function($) {
        $('#spinner').ajaxStart(function() {
            $(this).fadeIn();
        }).ajaxStop(function() {
            $(this).fadeOut();
        });
    })(jQuery);
}


text:
author: Segment Routing Team
published: true
breadnav: true
date: '2017-02-10 15:47 -0700'
title: Making networks SDN-ready with Segment Routing
excerpt: 'Heavy Reading white-paper on making networks sdn-ready with Segment Routing.'
header:
  teaser: http://img.lightreading.com/heavyreading/heavyreading_logo.gif
---

{% capture "pdf-link" %}/images/lightreading_report.pdf{% endcapture %}