# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command(
    "databox job create",
)
class Create(AAZCommand):
    """Create a new job with the specified parameters.

    :example: Create job
        az databox job create -g rg -n job-name --sku databox --contact-name 'test' --phone 14258828080 --email-list testing@microsoft.com --street-address1 "1 MICROSOFT WAY" --city Redmond --state-or-province WA --country US --postal-code 98052 --company-name Microsoft --storage-account account-id --staging-storage-account account-id --resource-group-for-managed-disk rg --transfer-type ImportToAzure --kek-type MicrosoftManaged
    """

    _aaz_info = {
        "version": "2022-12-01",
        "resources": [
            ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databox/jobs/{}", "2022-12-01"],
        ]
    }

    AZ_SUPPORT_NO_WAIT = True

    def _handler(self, command_args):
        super()._handler(command_args)
        return self.build_lro_poller(self._execute_operations, self._output)

    _args_schema = None

    @classmethod
    def _build_arguments_schema(cls, *args, **kwargs):
        if cls._args_schema is not None:
            return cls._args_schema
        cls._args_schema = super()._build_arguments_schema(*args, **kwargs)

        # define Arg Group ""

        _args_schema = cls._args_schema
        _args_schema.job_name = AAZStrArg(
            options=["-n", "--name", "--job-name"],
            help="The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only",
            required=True,
            fmt=AAZStrArgFormat(
                pattern="^[-\w\.]+$",
                max_length=24,
                min_length=3,
            ),
        )
        _args_schema.resource_group = AAZResourceGroupNameArg(
            required=True,
        )

        # define Arg Group "ContactDetails"

        _args_schema = cls._args_schema
        _args_schema.contact_name = AAZStrArg(
            options=["--contact-name"],
            arg_group="ContactDetails",
            help="Contact name of the person.",
        )
        _args_schema.email_list = AAZListArg(
            options=["--email-list"],
            arg_group="ContactDetails",
            help="List of Email-ids to be notified about job progress.",
        )
        _args_schema.mobile = AAZStrArg(
            options=["--mobile"],
            arg_group="ContactDetails",
            help="Mobile number of the contact person.",
        )
        _args_schema.phone = AAZStrArg(
            options=["--phone"],
            arg_group="ContactDetails",
            help="Phone number of the contact person.",
        )

        email_list = cls._args_schema.email_list
        email_list.Element = AAZStrArg()

        # define Arg Group "Details"

        _args_schema = cls._args_schema
        _args_schema.data_box = AAZObjectArg(
            options=["--data-box"],
            arg_group="Details",
            help="Databox Job Details.",
        )
        _args_schema.data_box_customer_disk = AAZObjectArg(
            options=["--data-box-customer-disk"],
            arg_group="Details",
            help="Customer disk job details.",
        )
        _args_schema.data_box_disk = AAZObjectArg(
            options=["--data-box-disk"],
            arg_group="Details",
            help="Databox Heavy Device Job Details",
        )
        _args_schema.data_box_heavy = AAZObjectArg(
            options=["--data-box-heavy"],
            arg_group="Details",
            help="Databox Heavy Device Job Details",
        )
        _args_schema.data_export_details = AAZListArg(
            options=["--data-export-details"],
            arg_group="Details",
            help="Details of the data to be exported from azure.",
        )
        _args_schema.data_import_details = AAZListArg(
            options=["--data-import-details"],
            arg_group="Details",
            help="Details of the data to be imported into azure.",
        )
        _args_schema.expected_data_size = AAZIntArg(
            options=["--expected-data-size"],
            arg_group="Details",
            help="The expected size of the data, which needs to be transferred in this job, in terabytes.",
        )

        data_box = cls._args_schema.data_box
        data_box.device_password = AAZStrArg(
            options=["device-password"],
            help="Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+",
        )

        data_box_customer_disk = cls._args_schema.data_box_customer_disk
        data_box_customer_disk.enable_manifest_backup = AAZBoolArg(
            options=["enable-manifest-backup"],
            help="Flag to indicate if disk manifest should be backed-up in the Storage Account.",
            default=False,
        )
        data_box_customer_disk.import_disk_details_collection = AAZDictArg(
            options=["import-disk-details-collection"],
            help="Contains the map of disk serial number to the disk details for import jobs.",
        )
        data_box_customer_disk.return_to_customer_package_details = AAZObjectArg(
            options=["return-to-customer-package-details"],
            help="Return package shipping details.",
            required=True,
        )

        import_disk_details_collection = cls._args_schema.data_box_customer_disk.import_disk_details_collection
        import_disk_details_collection.Element = AAZObjectArg()

        _element = cls._args_schema.data_box_customer_disk.import_disk_details_collection.Element
        _element.bit_locker_key = AAZStrArg(
            options=["bit-locker-key"],
            help="BitLocker key used to encrypt the disk.",
            required=True,
        )
        _element.manifest_file = AAZStrArg(
            options=["manifest-file"],
            help="The relative path of the manifest file on the disk.",
            required=True,
        )
        _element.manifest_hash = AAZStrArg(
            options=["manifest-hash"],
            help="The Base16-encoded MD5 hash of the manifest file on the disk.",
            required=True,
        )

        return_to_customer_package_details = cls._args_schema.data_box_customer_disk.return_to_customer_package_details
        return_to_customer_package_details.carrier_account_number = AAZStrArg(
            options=["carrier-account-number"],
            help="Carrier Account Number of customer for customer disk.",
        )
        return_to_customer_package_details.carrier_name = AAZStrArg(
            options=["carrier-name"],
            help="Name of the carrier.",
        )
        return_to_customer_package_details.tracking_id = AAZStrArg(
            options=["tracking-id"],
            help="Tracking Id of shipment.",
        )

        data_box_disk = cls._args_schema.data_box_disk
        data_box_disk.passkey = AAZStrArg(
            options=["passkey"],
            help="User entered passkey for DataBox Disk job.",
        )
        data_box_disk.preferred_disks = AAZDictArg(
            options=["preferred-disks"],
            help="User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int.",
        )

        preferred_disks = cls._args_schema.data_box_disk.preferred_disks
        preferred_disks.Element = AAZIntArg()

        data_box_heavy = cls._args_schema.data_box_heavy
        data_box_heavy.device_password = AAZStrArg(
            options=["device-password"],
            help="Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+",
        )

        data_export_details = cls._args_schema.data_export_details
        data_export_details.Element = AAZObjectArg()

        _element = cls._args_schema.data_export_details.Element
        _element.account_details = AAZObjectArg(
            options=["account-details"],
            help="Account details of the data to be transferred",
            required=True,
        )
        _element.log_collection_level = AAZStrArg(
            options=["log-collection-level"],
            help="Level of the logs to be collected.",
            default="Error",
            enum={"Error": "Error", "Verbose": "Verbose"},
        )
        _element.transfer_configuration = AAZObjectArg(
            options=["transfer-configuration"],
            help="Configuration for the data transfer.",
            required=True,
        )

        account_details = cls._args_schema.data_export_details.Element.account_details
        account_details.managed_disk = AAZObjectArg(
            options=["managed-disk"],
        )
        account_details.storage_account = AAZObjectArg(
            options=["storage-account"],
        )
        account_details.share_password = AAZStrArg(
            options=["share-password"],
            help="Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+",
        )

        managed_disk = cls._args_schema.data_export_details.Element.account_details.managed_disk
        managed_disk.resource_group_id = AAZStrArg(
            options=["resource-group-id"],
            help="Resource Group Id of the compute disks.",
            required=True,
        )
        managed_disk.staging_storage_account_id = AAZStrArg(
            options=["staging-storage-account-id"],
            help="Resource Id of the storage account that can be used to copy the vhd for staging.",
            required=True,
        )

        storage_account = cls._args_schema.data_export_details.Element.account_details.storage_account
        storage_account.storage_account_id = AAZStrArg(
            options=["storage-account-id"],
            help="Storage Account Resource Id.",
            required=True,
        )

        transfer_configuration = cls._args_schema.data_export_details.Element.transfer_configuration
        transfer_configuration.transfer_all_details = AAZObjectArg(
            options=["transfer-all-details"],
            help="Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll",
        )
        transfer_configuration.transfer_configuration_type = AAZStrArg(
            options=["transfer-configuration-type"],
            help="Type of the configuration for transfer.",
            required=True,
            enum={"TransferAll": "TransferAll", "TransferUsingFilter": "TransferUsingFilter"},
        )
        transfer_configuration.transfer_filter_details = AAZObjectArg(
            options=["transfer-filter-details"],
            help="Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.",
        )

        transfer_all_details = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_all_details
        transfer_all_details.include = AAZObjectArg(
            options=["include"],
            help="Details to transfer all data.",
        )

        include = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_all_details.include
        include.data_account_type = AAZStrArg(
            options=["data-account-type"],
            help="Type of the account of data",
            required=True,
            default="StorageAccount",
            enum={"ManagedDisk": "ManagedDisk", "StorageAccount": "StorageAccount"},
        )
        include.transfer_all_blobs = AAZBoolArg(
            options=["transfer-all-blobs"],
            help="To indicate if all Azure blobs have to be transferred",
        )
        include.transfer_all_files = AAZBoolArg(
            options=["transfer-all-files"],
            help="To indicate if all Azure Files have to be transferred",
        )

        transfer_filter_details = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details
        transfer_filter_details.azure_file_filter_details = AAZObjectArg(
            options=["azure-file-filter-details"],
            help="Filter details to transfer Azure files.",
        )
        transfer_filter_details.blob_filter_details = AAZObjectArg(
            options=["blob-filter-details"],
            help="Filter details to transfer blobs.",
        )
        transfer_filter_details.data_account_type = AAZStrArg(
            options=["data-account-type"],
            help="Type of the account of data.",
            default="StorageAccount",
            enum={"ManagedDisk": "ManagedDisk", "StorageAccount": "StorageAccount"},
        )
        transfer_filter_details.filter_file_details = AAZListArg(
            options=["filter-file-details"],
            help="Details of the filter files to be used for data transfer.",
        )

        azure_file_filter_details = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.azure_file_filter_details
        azure_file_filter_details.file_path_list = AAZListArg(
            options=["file-path-list"],
            help="List of full path of the files to be transferred.",
        )
        azure_file_filter_details.file_prefix_list = AAZListArg(
            options=["file-prefix-list"],
            help="Prefix list of the Azure files to be transferred.",
        )
        azure_file_filter_details.file_share_list = AAZListArg(
            options=["file-share-list"],
            help="List of file shares to be transferred.",
        )

        file_path_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.azure_file_filter_details.file_path_list
        file_path_list.Element = AAZStrArg()

        file_prefix_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.azure_file_filter_details.file_prefix_list
        file_prefix_list.Element = AAZStrArg()

        file_share_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.azure_file_filter_details.file_share_list
        file_share_list.Element = AAZStrArg()

        blob_filter_details = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.blob_filter_details
        blob_filter_details.blob_path_list = AAZListArg(
            options=["blob-path-list"],
            help="List of full path of the blobs to be transferred.",
        )
        blob_filter_details.blob_prefix_list = AAZListArg(
            options=["blob-prefix-list"],
            help="Prefix list of the Azure blobs to be transferred.",
        )
        blob_filter_details.container_list = AAZListArg(
            options=["container-list"],
            help="List of blob containers to be transferred.",
        )

        blob_path_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.blob_filter_details.blob_path_list
        blob_path_list.Element = AAZStrArg()

        blob_prefix_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.blob_filter_details.blob_prefix_list
        blob_prefix_list.Element = AAZStrArg()

        container_list = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.blob_filter_details.container_list
        container_list.Element = AAZStrArg()

        filter_file_details = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.filter_file_details
        filter_file_details.Element = AAZObjectArg()

        _element = cls._args_schema.data_export_details.Element.transfer_configuration.transfer_filter_details.filter_file_details.Element
        _element.filter_file_path = AAZStrArg(
            options=["filter-file-path"],
            help="Path of the file that contains the details of all items to transfer.",
            required=True,
        )
        _element.filter_file_type = AAZStrArg(
            options=["filter-file-type"],
            help="Type of the filter file.",
            required=True,
            enum={"AzureBlob": "AzureBlob", "AzureFile": "AzureFile"},
        )

        data_import_details = cls._args_schema.data_import_details
        data_import_details.Element = AAZObjectArg()

        _element = cls._args_schema.data_import_details.Element
        _element.account_details = AAZObjectArg(
            options=["account-details"],
            help="Account details of the data to be transferred",
            required=True,
        )
        _element.log_collection_level = AAZStrArg(
            options=["log-collection-level"],
            help="Level of the logs to be collected.",
            default="Error",
            enum={"Error": "Error", "Verbose": "Verbose"},
        )

        account_details = cls._args_schema.data_import_details.Element.account_details
        account_details.managed_disk = AAZObjectArg(
            options=["managed-disk"],
        )
        account_details.storage_account = AAZObjectArg(
            options=["storage-account"],
        )
        account_details.share_password = AAZStrArg(
            options=["share-password"],
            help="Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+",
        )

        managed_disk = cls._args_schema.data_import_details.Element.account_details.managed_disk
        managed_disk.resource_group_id = AAZStrArg(
            options=["resource-group-id"],
            help="Resource Group Id of the compute disks.",
            required=True,
        )
        managed_disk.staging_storage_account_id = AAZStrArg(
            options=["staging-storage-account-id"],
            help="Resource Id of the storage account that can be used to copy the vhd for staging.",
            required=True,
        )

        storage_account = cls._args_schema.data_import_details.Element.account_details.storage_account
        storage_account.storage_account_id = AAZStrArg(
            options=["storage-account-id"],
            help="Storage Account Resource Id.",
            required=True,
        )

        # define Arg Group "JobResource"

        _args_schema = cls._args_schema
        _args_schema.identity = AAZObjectArg(
            options=["--identity"],
            arg_group="JobResource",
            help="Msi identity of the resource",
        )
        _args_schema.location = AAZResourceLocationArg(
            arg_group="JobResource",
            help="The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.",
            required=True,
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        _args_schema.tags = AAZDictArg(
            options=["--tags"],
            arg_group="JobResource",
            help="The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).",
        )

        identity = cls._args_schema.identity
        identity.type = AAZStrArg(
            options=["type"],
            help="Identity type",
            default="None",
        )
        identity.user_assigned_identities = AAZDictArg(
            options=["user-assigned-identities"],
            help="User Assigned Identities",
        )

        user_assigned_identities = cls._args_schema.identity.user_assigned_identities
        user_assigned_identities.Element = AAZObjectArg(
            blank={},
        )

        tags = cls._args_schema.tags
        tags.Element = AAZStrArg()

        # define Arg Group "KeyEncryptionKey"

        _args_schema = cls._args_schema
        _args_schema.kek_identity = AAZObjectArg(
            options=["--kek-identity"],
            arg_group="KeyEncryptionKey",
            help="Managed identity properties used for key encryption.",
        )
        _args_schema.kek_type = AAZStrArg(
            options=["--kek-type"],
            arg_group="KeyEncryptionKey",
            help="Type of encryption key used for key encryption.",
            default="MicrosoftManaged",
            enum={"CustomerManaged": "CustomerManaged", "MicrosoftManaged": "MicrosoftManaged"},
        )
        _args_schema.kek_url = AAZStrArg(
            options=["--kek-url"],
            arg_group="KeyEncryptionKey",
            help="Key encryption key. It is required in case of Customer managed KekType.",
        )
        _args_schema.kek_vault_resource_id = AAZStrArg(
            options=["--kek-vault-resource-id"],
            arg_group="KeyEncryptionKey",
            help="Kek vault resource id. It is required in case of Customer managed KekType.",
        )

        kek_identity = cls._args_schema.kek_identity
        kek_identity.type = AAZStrArg(
            options=["type"],
            help="Managed service identity type.",
        )
        kek_identity.user_assigned = AAZObjectArg(
            options=["user-assigned"],
            help="User assigned identity properties.",
        )

        user_assigned = cls._args_schema.kek_identity.user_assigned
        user_assigned.resource_id = AAZStrArg(
            options=["resource-id"],
            help="Arm resource id for user assigned identity to be used to fetch MSI token.",
        )

        # define Arg Group "Properties"

        _args_schema = cls._args_schema
        _args_schema.transfer_type = AAZStrArg(
            options=["--transfer-type"],
            arg_group="Properties",
            help="Type of the data transfer.",
            required=True,
            enum={"ExportFromAzure": "ExportFromAzure", "ImportToAzure": "ImportToAzure"},
        )

        # define Arg Group "ShippingAddress"

        _args_schema = cls._args_schema
        _args_schema.city = AAZStrArg(
            options=["--city"],
            arg_group="ShippingAddress",
            help="Name of the city.",
        )
        _args_schema.company_name = AAZStrArg(
            options=["--company-name"],
            arg_group="ShippingAddress",
            help="Name of the company.",
        )
        _args_schema.country = AAZStrArg(
            options=["--country"],
            arg_group="ShippingAddress",
            help="Name of the Country.",
        )
        _args_schema.postal_code = AAZStrArg(
            options=["--postal-code"],
            arg_group="ShippingAddress",
            help="Postal code.",
        )
        _args_schema.state_or_province = AAZStrArg(
            options=["--state-or-province"],
            arg_group="ShippingAddress",
            help="Name of the State or Province.",
        )
        _args_schema.street_address1 = AAZStrArg(
            options=["--street-address1"],
            arg_group="ShippingAddress",
            help="Street Address line 1.",
        )
        _args_schema.street_address2 = AAZStrArg(
            options=["--street-address2"],
            arg_group="ShippingAddress",
            help="Street Address line 2.",
        )
        _args_schema.street_address3 = AAZStrArg(
            options=["--street-address3"],
            arg_group="ShippingAddress",
            help="Street Address line 3.",
        )

        # define Arg Group "Sku"

        _args_schema = cls._args_schema
        _args_schema.sku = AAZStrArg(
            options=["--sku"],
            arg_group="Sku",
            help="The sku name.",
            required=True,
            enum={"DataBox": "DataBox", "DataBoxCustomerDisk": "DataBoxCustomerDisk", "DataBoxDisk": "DataBoxDisk", "DataBoxHeavy": "DataBoxHeavy"},
        )
        return cls._args_schema

    _args_shipping_address_create = None

    @classmethod
    def _build_args_shipping_address_create(cls, _schema):
        if cls._args_shipping_address_create is not None:
            _schema.address_type = cls._args_shipping_address_create.address_type
            _schema.city = cls._args_shipping_address_create.city
            _schema.company_name = cls._args_shipping_address_create.company_name
            _schema.country = cls._args_shipping_address_create.country
            _schema.postal_code = cls._args_shipping_address_create.postal_code
            _schema.skip_address_validation = cls._args_shipping_address_create.skip_address_validation
            _schema.state_or_province = cls._args_shipping_address_create.state_or_province
            _schema.street_address1 = cls._args_shipping_address_create.street_address1
            _schema.street_address2 = cls._args_shipping_address_create.street_address2
            _schema.street_address3 = cls._args_shipping_address_create.street_address3
            _schema.tax_identification_number = cls._args_shipping_address_create.tax_identification_number
            _schema.zip_extended_code = cls._args_shipping_address_create.zip_extended_code
            return

        cls._args_shipping_address_create = AAZObjectArg()

        shipping_address_create = cls._args_shipping_address_create
        shipping_address_create.address_type = AAZStrArg(
            options=["address-type"],
            help="Type of address.",
            default="None",
            enum={"Commercial": "Commercial", "None": "None", "Residential": "Residential"},
        )
        shipping_address_create.city = AAZStrArg(
            options=["city"],
            help="Name of the City.",
        )
        shipping_address_create.company_name = AAZStrArg(
            options=["company-name"],
            help="Name of the company.",
        )
        shipping_address_create.country = AAZStrArg(
            options=["country"],
            help="Name of the Country.",
            required=True,
        )
        shipping_address_create.postal_code = AAZStrArg(
            options=["postal-code"],
            help="Postal code.",
        )
        shipping_address_create.skip_address_validation = AAZBoolArg(
            options=["skip-address-validation"],
            help="Flag to indicate if customer has chosen to skip default address validation",
        )
        shipping_address_create.state_or_province = AAZStrArg(
            options=["state-or-province"],
            help="Name of the State or Province.",
        )
        shipping_address_create.street_address1 = AAZStrArg(
            options=["street-address1"],
            help="Street Address line 1.",
            required=True,
        )
        shipping_address_create.street_address2 = AAZStrArg(
            options=["street-address2"],
            help="Street Address line 2.",
        )
        shipping_address_create.street_address3 = AAZStrArg(
            options=["street-address3"],
            help="Street Address line 3.",
        )
        shipping_address_create.tax_identification_number = AAZStrArg(
            options=["tax-identification-number"],
            help="Tax Identification Number",
        )
        shipping_address_create.zip_extended_code = AAZStrArg(
            options=["zip-extended-code"],
            help="Extended Zip Code.",
        )

        _schema.address_type = cls._args_shipping_address_create.address_type
        _schema.city = cls._args_shipping_address_create.city
        _schema.company_name = cls._args_shipping_address_create.company_name
        _schema.country = cls._args_shipping_address_create.country
        _schema.postal_code = cls._args_shipping_address_create.postal_code
        _schema.skip_address_validation = cls._args_shipping_address_create.skip_address_validation
        _schema.state_or_province = cls._args_shipping_address_create.state_or_province
        _schema.street_address1 = cls._args_shipping_address_create.street_address1
        _schema.street_address2 = cls._args_shipping_address_create.street_address2
        _schema.street_address3 = cls._args_shipping_address_create.street_address3
        _schema.tax_identification_number = cls._args_shipping_address_create.tax_identification_number
        _schema.zip_extended_code = cls._args_shipping_address_create.zip_extended_code

    _args_transport_preferences_create = None

    @classmethod
    def _build_args_transport_preferences_create(cls, _schema):
        if cls._args_transport_preferences_create is not None:
            _schema.preferred_shipment_type = cls._args_transport_preferences_create.preferred_shipment_type
            return

        cls._args_transport_preferences_create = AAZObjectArg()

        transport_preferences_create = cls._args_transport_preferences_create
        transport_preferences_create.preferred_shipment_type = AAZStrArg(
            options=["preferred-shipment-type"],
            help="Indicates Shipment Logistics type that the customer preferred.",
            required=True,
            enum={"CustomerManaged": "CustomerManaged", "MicrosoftManaged": "MicrosoftManaged"},
        )

        _schema.preferred_shipment_type = cls._args_transport_preferences_create.preferred_shipment_type

    def _execute_operations(self):
        self.pre_operations()
        yield self.JobsCreate(ctx=self.ctx)()
        self.post_operations()

    @register_callback
    def pre_operations(self):
        pass

    @register_callback
    def post_operations(self):
        pass

    def _output(self, *args, **kwargs):
        result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
        return result

    class JobsCreate(AAZHttpOperation):
        CLIENT_TYPE = "MgmtClient"

        def __call__(self, *args, **kwargs):
            request = self.make_request()
            session = self.client.send_request(request=request, stream=False, **kwargs)
            if session.http_response.status_code in [202]:
                return self.client.build_lro_polling(
                    self.ctx.args.no_wait,
                    session,
                    self.on_200,
                    self.on_error,
                    lro_options={"final-state-via": "azure-async-operation"},
                    path_format_arguments=self.url_parameters,
                )
            if session.http_response.status_code in [200]:
                return self.client.build_lro_polling(
                    self.ctx.args.no_wait,
                    session,
                    self.on_200,
                    self.on_error,
                    lro_options={"final-state-via": "azure-async-operation"},
                    path_format_arguments=self.url_parameters,
                )

            return self.on_error(session.http_response)

        @property
        def url(self):
            return self.client.format_url(
                "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
                **self.url_parameters
            )

        @property
        def method(self):
            return "PUT"

        @property
        def error_format(self):
            return "ODataV4Format"

        @property
        def url_parameters(self):
            parameters = {
                **self.serialize_url_param(
                    "jobName", self.ctx.args.job_name,
                    required=True,
                ),
                **self.serialize_url_param(
                    "resourceGroupName", self.ctx.args.resource_group,
                    required=True,
                ),
                **self.serialize_url_param(
                    "subscriptionId", self.ctx.subscription_id,
                    required=True,
                ),
            }
            return parameters

        @property
        def query_parameters(self):
            parameters = {
                **self.serialize_query_param(
                    "api-version", "2022-12-01",
                    required=True,
                ),
            }
            return parameters

        @property
        def header_parameters(self):
            parameters = {
                **self.serialize_header_param(
                    "Content-Type", "application/json",
                ),
                **self.serialize_header_param(
                    "Accept", "application/json",
                ),
            }
            return parameters

        @property
        def content(self):
            _content_value, _builder = self.new_content_builder(
                self.ctx.args,
                typ=AAZObjectType,
                typ_kwargs={"flags": {"required": True, "client_flatten": True}}
            )
            _builder.set_prop("identity", AAZObjectType, ".identity")
            _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
            _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
            _builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
            _builder.set_prop("tags", AAZDictType, ".tags")

            identity = _builder.get(".identity")
            if identity is not None:
                identity.set_prop("type", AAZStrType, ".type")
                identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities")

            user_assigned_identities = _builder.get(".identity.userAssignedIdentities")
            if user_assigned_identities is not None:
                user_assigned_identities.set_elements(AAZObjectType, ".")

            properties = _builder.get(".properties")
            if properties is not None:
                properties.set_prop("details", AAZObjectType)
                properties.set_prop("transferType", AAZStrType, ".transfer_type", typ_kwargs={"flags": {"required": True}})

            details = _builder.get(".properties.details")
            if details is not None:
                details.set_prop("contactDetails", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
                details.set_prop("dataExportDetails", AAZListType, ".data_export_details")
                details.set_prop("dataImportDetails", AAZListType, ".data_import_details")
                details.set_prop("expectedDataSizeInTeraBytes", AAZIntType, ".expected_data_size")
                details.set_const("jobDetailsType", "DataBox", AAZStrType, ".data_box", typ_kwargs={"flags": {"required": True}})
                details.set_const("jobDetailsType", "DataBoxCustomerDisk", AAZStrType, ".data_box_customer_disk", typ_kwargs={"flags": {"required": True}})
                details.set_const("jobDetailsType", "DataBoxDisk", AAZStrType, ".data_box_disk", typ_kwargs={"flags": {"required": True}})
                details.set_const("jobDetailsType", "DataBoxHeavy", AAZStrType, ".data_box_heavy", typ_kwargs={"flags": {"required": True}})
                details.set_prop("keyEncryptionKey", AAZObjectType)
                details.set_prop("shippingAddress", AAZObjectType)
                details.discriminate_by("jobDetailsType", "DataBox")
                details.discriminate_by("jobDetailsType", "DataBoxCustomerDisk")
                details.discriminate_by("jobDetailsType", "DataBoxDisk")
                details.discriminate_by("jobDetailsType", "DataBoxHeavy")

            contact_details = _builder.get(".properties.details.contactDetails")
            if contact_details is not None:
                contact_details.set_prop("contactName", AAZStrType, ".contact_name", typ_kwargs={"flags": {"required": True}})
                contact_details.set_prop("emailList", AAZListType, ".email_list", typ_kwargs={"flags": {"required": True}})
                contact_details.set_prop("mobile", AAZStrType, ".mobile")
                contact_details.set_prop("phone", AAZStrType, ".phone", typ_kwargs={"flags": {"required": True}})

            email_list = _builder.get(".properties.details.contactDetails.emailList")
            if email_list is not None:
                email_list.set_elements(AAZStrType, ".")

            data_export_details = _builder.get(".properties.details.dataExportDetails")
            if data_export_details is not None:
                data_export_details.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.details.dataExportDetails[]")
            if _elements is not None:
                _elements.set_prop("accountDetails", AAZObjectType, ".account_details", typ_kwargs={"flags": {"required": True}})
                _elements.set_prop("logCollectionLevel", AAZStrType, ".log_collection_level")
                _elements.set_prop("transferConfiguration", AAZObjectType, ".transfer_configuration", typ_kwargs={"flags": {"required": True}})

            account_details = _builder.get(".properties.details.dataExportDetails[].accountDetails")
            if account_details is not None:
                account_details.set_const("dataAccountType", "ManagedDisk", AAZStrType, ".managed_disk", typ_kwargs={"flags": {"required": True}})
                account_details.set_const("dataAccountType", "StorageAccount", AAZStrType, ".storage_account", typ_kwargs={"flags": {"required": True}})
                account_details.set_prop("sharePassword", AAZStrType, ".share_password", typ_kwargs={"flags": {"secret": True}})
                account_details.discriminate_by("dataAccountType", "ManagedDisk")
                account_details.discriminate_by("dataAccountType", "StorageAccount")

            disc_managed_disk = _builder.get(".properties.details.dataExportDetails[].accountDetails{dataAccountType:ManagedDisk}")
            if disc_managed_disk is not None:
                disc_managed_disk.set_prop("resourceGroupId", AAZStrType, ".managed_disk.resource_group_id", typ_kwargs={"flags": {"required": True}})
                disc_managed_disk.set_prop("stagingStorageAccountId", AAZStrType, ".managed_disk.staging_storage_account_id", typ_kwargs={"flags": {"required": True}})

            disc_storage_account = _builder.get(".properties.details.dataExportDetails[].accountDetails{dataAccountType:StorageAccount}")
            if disc_storage_account is not None:
                disc_storage_account.set_prop("storageAccountId", AAZStrType, ".storage_account.storage_account_id", typ_kwargs={"flags": {"required": True}})

            transfer_configuration = _builder.get(".properties.details.dataExportDetails[].transferConfiguration")
            if transfer_configuration is not None:
                transfer_configuration.set_prop("transferAllDetails", AAZObjectType, ".transfer_all_details")
                transfer_configuration.set_prop("transferConfigurationType", AAZStrType, ".transfer_configuration_type", typ_kwargs={"flags": {"required": True}})
                transfer_configuration.set_prop("transferFilterDetails", AAZObjectType, ".transfer_filter_details")

            transfer_all_details = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferAllDetails")
            if transfer_all_details is not None:
                transfer_all_details.set_prop("include", AAZObjectType, ".include")

            include = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferAllDetails.include")
            if include is not None:
                include.set_prop("dataAccountType", AAZStrType, ".data_account_type", typ_kwargs={"flags": {"required": True}})
                include.set_prop("transferAllBlobs", AAZBoolType, ".transfer_all_blobs")
                include.set_prop("transferAllFiles", AAZBoolType, ".transfer_all_files")

            transfer_filter_details = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails")
            if transfer_filter_details is not None:
                transfer_filter_details.set_prop("include", AAZObjectType)

            include = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include")
            if include is not None:
                include.set_prop("azureFileFilterDetails", AAZObjectType, ".azure_file_filter_details")
                include.set_prop("blobFilterDetails", AAZObjectType, ".blob_filter_details")
                include.set_prop("dataAccountType", AAZStrType, ".data_account_type", typ_kwargs={"flags": {"required": True}})
                include.set_prop("filterFileDetails", AAZListType, ".filter_file_details")

            azure_file_filter_details = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.azureFileFilterDetails")
            if azure_file_filter_details is not None:
                azure_file_filter_details.set_prop("filePathList", AAZListType, ".file_path_list")
                azure_file_filter_details.set_prop("filePrefixList", AAZListType, ".file_prefix_list")
                azure_file_filter_details.set_prop("fileShareList", AAZListType, ".file_share_list")

            file_path_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.azureFileFilterDetails.filePathList")
            if file_path_list is not None:
                file_path_list.set_elements(AAZStrType, ".")

            file_prefix_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.azureFileFilterDetails.filePrefixList")
            if file_prefix_list is not None:
                file_prefix_list.set_elements(AAZStrType, ".")

            file_share_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.azureFileFilterDetails.fileShareList")
            if file_share_list is not None:
                file_share_list.set_elements(AAZStrType, ".")

            blob_filter_details = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.blobFilterDetails")
            if blob_filter_details is not None:
                blob_filter_details.set_prop("blobPathList", AAZListType, ".blob_path_list")
                blob_filter_details.set_prop("blobPrefixList", AAZListType, ".blob_prefix_list")
                blob_filter_details.set_prop("containerList", AAZListType, ".container_list")

            blob_path_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.blobFilterDetails.blobPathList")
            if blob_path_list is not None:
                blob_path_list.set_elements(AAZStrType, ".")

            blob_prefix_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.blobFilterDetails.blobPrefixList")
            if blob_prefix_list is not None:
                blob_prefix_list.set_elements(AAZStrType, ".")

            container_list = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.blobFilterDetails.containerList")
            if container_list is not None:
                container_list.set_elements(AAZStrType, ".")

            filter_file_details = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.filterFileDetails")
            if filter_file_details is not None:
                filter_file_details.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.details.dataExportDetails[].transferConfiguration.transferFilterDetails.include.filterFileDetails[]")
            if _elements is not None:
                _elements.set_prop("filterFilePath", AAZStrType, ".filter_file_path", typ_kwargs={"flags": {"required": True}})
                _elements.set_prop("filterFileType", AAZStrType, ".filter_file_type", typ_kwargs={"flags": {"required": True}})

            data_import_details = _builder.get(".properties.details.dataImportDetails")
            if data_import_details is not None:
                data_import_details.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.details.dataImportDetails[]")
            if _elements is not None:
                _elements.set_prop("accountDetails", AAZObjectType, ".account_details", typ_kwargs={"flags": {"required": True}})
                _elements.set_prop("logCollectionLevel", AAZStrType, ".log_collection_level")

            account_details = _builder.get(".properties.details.dataImportDetails[].accountDetails")
            if account_details is not None:
                account_details.set_const("dataAccountType", "ManagedDisk", AAZStrType, ".managed_disk", typ_kwargs={"flags": {"required": True}})
                account_details.set_const("dataAccountType", "StorageAccount", AAZStrType, ".storage_account", typ_kwargs={"flags": {"required": True}})
                account_details.set_prop("sharePassword", AAZStrType, ".share_password", typ_kwargs={"flags": {"secret": True}})
                account_details.discriminate_by("dataAccountType", "ManagedDisk")
                account_details.discriminate_by("dataAccountType", "StorageAccount")

            disc_managed_disk = _builder.get(".properties.details.dataImportDetails[].accountDetails{dataAccountType:ManagedDisk}")
            if disc_managed_disk is not None:
                disc_managed_disk.set_prop("resourceGroupId", AAZStrType, ".managed_disk.resource_group_id", typ_kwargs={"flags": {"required": True}})
                disc_managed_disk.set_prop("stagingStorageAccountId", AAZStrType, ".managed_disk.staging_storage_account_id", typ_kwargs={"flags": {"required": True}})

            disc_storage_account = _builder.get(".properties.details.dataImportDetails[].accountDetails{dataAccountType:StorageAccount}")
            if disc_storage_account is not None:
                disc_storage_account.set_prop("storageAccountId", AAZStrType, ".storage_account.storage_account_id", typ_kwargs={"flags": {"required": True}})

            key_encryption_key = _builder.get(".properties.details.keyEncryptionKey")
            if key_encryption_key is not None:
                key_encryption_key.set_prop("identityProperties", AAZObjectType, ".kek_identity")
                key_encryption_key.set_prop("kekType", AAZStrType, ".kek_type", typ_kwargs={"flags": {"required": True}})
                key_encryption_key.set_prop("kekUrl", AAZStrType, ".kek_url")
                key_encryption_key.set_prop("kekVaultResourceID", AAZStrType, ".kek_vault_resource_id")

            identity_properties = _builder.get(".properties.details.keyEncryptionKey.identityProperties")
            if identity_properties is not None:
                identity_properties.set_prop("type", AAZStrType, ".type")
                identity_properties.set_prop("userAssigned", AAZObjectType, ".user_assigned")

            user_assigned = _builder.get(".properties.details.keyEncryptionKey.identityProperties.userAssigned")
            if user_assigned is not None:
                user_assigned.set_prop("resourceId", AAZStrType, ".resource_id")

            shipping_address = _builder.get(".properties.details.shippingAddress")
            if shipping_address is not None:
                shipping_address.set_prop("city", AAZStrType, ".city")
                shipping_address.set_prop("companyName", AAZStrType, ".company_name")
                shipping_address.set_prop("country", AAZStrType, ".country", typ_kwargs={"flags": {"required": True}})
                shipping_address.set_prop("postalCode", AAZStrType, ".postal_code")
                shipping_address.set_prop("stateOrProvince", AAZStrType, ".state_or_province")
                shipping_address.set_prop("streetAddress1", AAZStrType, ".street_address1", typ_kwargs={"flags": {"required": True}})
                shipping_address.set_prop("streetAddress2", AAZStrType, ".street_address2")
                shipping_address.set_prop("streetAddress3", AAZStrType, ".street_address3")

            disc_data_box = _builder.get(".properties.details{jobDetailsType:DataBox}")
            if disc_data_box is not None:
                disc_data_box.set_prop("devicePassword", AAZStrType, ".data_box.device_password")

            disc_data_box_customer_disk = _builder.get(".properties.details{jobDetailsType:DataBoxCustomerDisk}")
            if disc_data_box_customer_disk is not None:
                disc_data_box_customer_disk.set_prop("enableManifestBackup", AAZBoolType, ".data_box_customer_disk.enable_manifest_backup")
                disc_data_box_customer_disk.set_prop("importDiskDetailsCollection", AAZDictType, ".data_box_customer_disk.import_disk_details_collection")
                disc_data_box_customer_disk.set_prop("returnToCustomerPackageDetails", AAZObjectType, ".data_box_customer_disk.return_to_customer_package_details", typ_kwargs={"flags": {"required": True}})

            import_disk_details_collection = _builder.get(".properties.details{jobDetailsType:DataBoxCustomerDisk}.importDiskDetailsCollection")
            if import_disk_details_collection is not None:
                import_disk_details_collection.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.details{jobDetailsType:DataBoxCustomerDisk}.importDiskDetailsCollection{}")
            if _elements is not None:
                _elements.set_prop("bitLockerKey", AAZStrType, ".bit_locker_key", typ_kwargs={"flags": {"required": True, "secret": True}})
                _elements.set_prop("manifestFile", AAZStrType, ".manifest_file", typ_kwargs={"flags": {"required": True}})
                _elements.set_prop("manifestHash", AAZStrType, ".manifest_hash", typ_kwargs={"flags": {"required": True}})

            return_to_customer_package_details = _builder.get(".properties.details{jobDetailsType:DataBoxCustomerDisk}.returnToCustomerPackageDetails")
            if return_to_customer_package_details is not None:
                return_to_customer_package_details.set_prop("carrierAccountNumber", AAZStrType, ".carrier_account_number", typ_kwargs={"flags": {"secret": True}})
                return_to_customer_package_details.set_prop("carrierName", AAZStrType, ".carrier_name")
                return_to_customer_package_details.set_prop("trackingId", AAZStrType, ".tracking_id")

            disc_data_box_disk = _builder.get(".properties.details{jobDetailsType:DataBoxDisk}")
            if disc_data_box_disk is not None:
                disc_data_box_disk.set_prop("passkey", AAZStrType, ".data_box_disk.passkey")
                disc_data_box_disk.set_prop("preferredDisks", AAZDictType, ".data_box_disk.preferred_disks")

            preferred_disks = _builder.get(".properties.details{jobDetailsType:DataBoxDisk}.preferredDisks")
            if preferred_disks is not None:
                preferred_disks.set_elements(AAZIntType, ".")

            disc_data_box_heavy = _builder.get(".properties.details{jobDetailsType:DataBoxHeavy}")
            if disc_data_box_heavy is not None:
                disc_data_box_heavy.set_prop("devicePassword", AAZStrType, ".data_box_heavy.device_password")

            sku = _builder.get(".sku")
            if sku is not None:
                sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}})

            tags = _builder.get(".tags")
            if tags is not None:
                tags.set_elements(AAZStrType, ".")

            return self.serialize_content(_content_value)

        def on_200(self, session):
            data = self.deserialize_http_content(session)
            self.ctx.set_var(
                "instance",
                data,
                schema_builder=self._build_schema_on_200
            )

        _schema_on_200 = None

        @classmethod
        def _build_schema_on_200(cls):
            if cls._schema_on_200 is not None:
                return cls._schema_on_200

            cls._schema_on_200 = AAZObjectType()

            _schema_on_200 = cls._schema_on_200
            _schema_on_200.id = AAZStrType(
                flags={"read_only": True},
            )
            _schema_on_200.identity = AAZObjectType()
            _schema_on_200.location = AAZStrType(
                flags={"required": True},
            )
            _schema_on_200.name = AAZStrType(
                flags={"read_only": True},
            )
            _schema_on_200.properties = AAZObjectType(
                flags={"required": True, "client_flatten": True},
            )
            _schema_on_200.sku = AAZObjectType(
                flags={"required": True},
            )
            _schema_on_200.system_data = AAZObjectType(
                serialized_name="systemData",
            )
            _schema_on_200.tags = AAZDictType()
            _schema_on_200.type = AAZStrType(
                flags={"read_only": True},
            )

            identity = cls._schema_on_200.identity
            identity.principal_id = AAZStrType(
                serialized_name="principalId",
                flags={"read_only": True},
            )
            identity.tenant_id = AAZStrType(
                serialized_name="tenantId",
                flags={"read_only": True},
            )
            identity.type = AAZStrType()
            identity.user_assigned_identities = AAZDictType(
                serialized_name="userAssignedIdentities",
            )

            user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
            user_assigned_identities.Element = AAZObjectType()

            _element = cls._schema_on_200.identity.user_assigned_identities.Element
            _element.client_id = AAZStrType(
                serialized_name="clientId",
                flags={"read_only": True},
            )
            _element.principal_id = AAZStrType(
                serialized_name="principalId",
                flags={"read_only": True},
            )

            properties = cls._schema_on_200.properties
            properties.cancellation_reason = AAZStrType(
                serialized_name="cancellationReason",
                flags={"read_only": True},
            )
            properties.delivery_info = AAZObjectType(
                serialized_name="deliveryInfo",
            )
            properties.delivery_type = AAZStrType(
                serialized_name="deliveryType",
            )
            properties.details = AAZObjectType()
            properties.error = AAZObjectType()
            _CreateHelper._build_schema_cloud_error_read(properties.error)
            properties.is_cancellable = AAZBoolType(
                serialized_name="isCancellable",
                flags={"read_only": True},
            )
            properties.is_cancellable_without_fee = AAZBoolType(
                serialized_name="isCancellableWithoutFee",
                flags={"read_only": True},
            )
            properties.is_deletable = AAZBoolType(
                serialized_name="isDeletable",
                flags={"read_only": True},
            )
            properties.is_prepare_to_ship_enabled = AAZBoolType(
                serialized_name="isPrepareToShipEnabled",
                flags={"read_only": True},
            )
            properties.is_shipping_address_editable = AAZBoolType(
                serialized_name="isShippingAddressEditable",
                flags={"read_only": True},
            )
            properties.reverse_shipping_details_update = AAZStrType(
                serialized_name="reverseShippingDetailsUpdate",
                flags={"read_only": True},
            )
            properties.reverse_transport_preference_update = AAZStrType(
                serialized_name="reverseTransportPreferenceUpdate",
                flags={"read_only": True},
            )
            properties.start_time = AAZStrType(
                serialized_name="startTime",
                flags={"read_only": True},
            )
            properties.status = AAZStrType(
                flags={"read_only": True},
            )
            properties.transfer_type = AAZStrType(
                serialized_name="transferType",
                flags={"required": True},
            )

            delivery_info = cls._schema_on_200.properties.delivery_info
            delivery_info.scheduled_date_time = AAZStrType(
                serialized_name="scheduledDateTime",
            )

            details = cls._schema_on_200.properties.details
            details.actions = AAZListType(
                flags={"read_only": True},
            )
            details.chain_of_custody_sas_key = AAZStrType(
                serialized_name="chainOfCustodySasKey",
                flags={"read_only": True},
            )
            details.contact_details = AAZObjectType(
                serialized_name="contactDetails",
                flags={"required": True},
            )
            details.copy_log_details = AAZListType(
                serialized_name="copyLogDetails",
                flags={"read_only": True},
            )
            details.data_center_code = AAZStrType(
                serialized_name="dataCenterCode",
                flags={"read_only": True},
            )
            details.data_export_details = AAZListType(
                serialized_name="dataExportDetails",
            )
            details.data_import_details = AAZListType(
                serialized_name="dataImportDetails",
            )
            details.datacenter_address = AAZObjectType(
                serialized_name="datacenterAddress",
            )
            details.delivery_package = AAZObjectType(
                serialized_name="deliveryPackage",
            )
            _CreateHelper._build_schema_package_shipping_details_read(details.delivery_package)
            details.device_erasure_details = AAZObjectType(
                serialized_name="deviceErasureDetails",
            )
            details.expected_data_size_in_tera_bytes = AAZIntType(
                serialized_name="expectedDataSizeInTeraBytes",
            )
            details.job_details_type = AAZStrType(
                serialized_name="jobDetailsType",
                flags={"required": True},
            )
            details.job_stages = AAZListType(
                serialized_name="jobStages",
                flags={"read_only": True},
            )
            details.key_encryption_key = AAZObjectType(
                serialized_name="keyEncryptionKey",
            )
            details.last_mitigation_action_on_job = AAZObjectType(
                serialized_name="lastMitigationActionOnJob",
            )
            details.preferences = AAZObjectType()
            details.return_package = AAZObjectType(
                serialized_name="returnPackage",
            )
            _CreateHelper._build_schema_package_shipping_details_read(details.return_package)
            details.reverse_shipment_label_sas_key = AAZStrType(
                serialized_name="reverseShipmentLabelSasKey",
                flags={"read_only": True},
            )
            details.reverse_shipping_details = AAZObjectType(
                serialized_name="reverseShippingDetails",
            )
            details.shipping_address = AAZObjectType(
                serialized_name="shippingAddress",
            )
            _CreateHelper._build_schema_shipping_address_read(details.shipping_address)

            actions = cls._schema_on_200.properties.details.actions
            actions.Element = AAZStrType()

            contact_details = cls._schema_on_200.properties.details.contact_details
            contact_details.contact_name = AAZStrType(
                serialized_name="contactName",
                flags={"required": True},
            )
            contact_details.email_list = AAZListType(
                serialized_name="emailList",
                flags={"required": True},
            )
            contact_details.mobile = AAZStrType()
            contact_details.notification_preference = AAZListType(
                serialized_name="notificationPreference",
            )
            contact_details.phone = AAZStrType(
                flags={"required": True},
            )
            contact_details.phone_extension = AAZStrType(
                serialized_name="phoneExtension",
            )

            email_list = cls._schema_on_200.properties.details.contact_details.email_list
            email_list.Element = AAZStrType()

            notification_preference = cls._schema_on_200.properties.details.contact_details.notification_preference
            notification_preference.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.contact_details.notification_preference.Element
            _element.send_notification = AAZBoolType(
                serialized_name="sendNotification",
                flags={"required": True},
            )
            _element.stage_name = AAZStrType(
                serialized_name="stageName",
                flags={"required": True},
            )

            copy_log_details = cls._schema_on_200.properties.details.copy_log_details
            copy_log_details.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.copy_log_details.Element
            _element.copy_log_details_type = AAZStrType(
                serialized_name="copyLogDetailsType",
                flags={"required": True},
            )

            disc_data_box = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBox")
            disc_data_box.account_name = AAZStrType(
                serialized_name="accountName",
                flags={"read_only": True},
            )
            disc_data_box.copy_log_link = AAZStrType(
                serialized_name="copyLogLink",
                flags={"read_only": True},
            )
            disc_data_box.copy_verbose_log_link = AAZStrType(
                serialized_name="copyVerboseLogLink",
                flags={"read_only": True},
            )

            disc_data_box_customer_disk = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBoxCustomerDisk")
            disc_data_box_customer_disk.error_log_link = AAZStrType(
                serialized_name="errorLogLink",
                flags={"read_only": True},
            )
            disc_data_box_customer_disk.serial_number = AAZStrType(
                serialized_name="serialNumber",
                flags={"read_only": True},
            )
            disc_data_box_customer_disk.verbose_log_link = AAZStrType(
                serialized_name="verboseLogLink",
                flags={"read_only": True},
            )

            disc_data_box_disk = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBoxDisk")
            disc_data_box_disk.disk_serial_number = AAZStrType(
                serialized_name="diskSerialNumber",
                flags={"read_only": True},
            )
            disc_data_box_disk.error_log_link = AAZStrType(
                serialized_name="errorLogLink",
                flags={"read_only": True},
            )
            disc_data_box_disk.verbose_log_link = AAZStrType(
                serialized_name="verboseLogLink",
                flags={"read_only": True},
            )

            disc_data_box_heavy = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBoxHeavy")
            disc_data_box_heavy.account_name = AAZStrType(
                serialized_name="accountName",
                flags={"read_only": True},
            )
            disc_data_box_heavy.copy_log_link = AAZListType(
                serialized_name="copyLogLink",
                flags={"read_only": True},
            )
            disc_data_box_heavy.copy_verbose_log_link = AAZListType(
                serialized_name="copyVerboseLogLink",
                flags={"read_only": True},
            )

            copy_log_link = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBoxHeavy").copy_log_link
            copy_log_link.Element = AAZStrType()

            copy_verbose_log_link = cls._schema_on_200.properties.details.copy_log_details.Element.discriminate_by("copy_log_details_type", "DataBoxHeavy").copy_verbose_log_link
            copy_verbose_log_link.Element = AAZStrType()

            data_export_details = cls._schema_on_200.properties.details.data_export_details
            data_export_details.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.data_export_details.Element
            _element.account_details = AAZObjectType(
                serialized_name="accountDetails",
                flags={"required": True},
            )
            _CreateHelper._build_schema_data_account_details_read(_element.account_details)
            _element.log_collection_level = AAZStrType(
                serialized_name="logCollectionLevel",
            )
            _element.transfer_configuration = AAZObjectType(
                serialized_name="transferConfiguration",
                flags={"required": True},
            )

            transfer_configuration = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration
            transfer_configuration.transfer_all_details = AAZObjectType(
                serialized_name="transferAllDetails",
            )
            transfer_configuration.transfer_configuration_type = AAZStrType(
                serialized_name="transferConfigurationType",
                flags={"required": True},
            )
            transfer_configuration.transfer_filter_details = AAZObjectType(
                serialized_name="transferFilterDetails",
            )

            transfer_all_details = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_all_details
            transfer_all_details.include = AAZObjectType()

            include = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_all_details.include
            include.data_account_type = AAZStrType(
                serialized_name="dataAccountType",
                flags={"required": True},
            )
            include.transfer_all_blobs = AAZBoolType(
                serialized_name="transferAllBlobs",
            )
            include.transfer_all_files = AAZBoolType(
                serialized_name="transferAllFiles",
            )

            transfer_filter_details = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details
            transfer_filter_details.include = AAZObjectType()

            include = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include
            include.azure_file_filter_details = AAZObjectType(
                serialized_name="azureFileFilterDetails",
            )
            include.blob_filter_details = AAZObjectType(
                serialized_name="blobFilterDetails",
            )
            include.data_account_type = AAZStrType(
                serialized_name="dataAccountType",
                flags={"required": True},
            )
            include.filter_file_details = AAZListType(
                serialized_name="filterFileDetails",
            )

            azure_file_filter_details = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.azure_file_filter_details
            azure_file_filter_details.file_path_list = AAZListType(
                serialized_name="filePathList",
            )
            azure_file_filter_details.file_prefix_list = AAZListType(
                serialized_name="filePrefixList",
            )
            azure_file_filter_details.file_share_list = AAZListType(
                serialized_name="fileShareList",
            )

            file_path_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.azure_file_filter_details.file_path_list
            file_path_list.Element = AAZStrType()

            file_prefix_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.azure_file_filter_details.file_prefix_list
            file_prefix_list.Element = AAZStrType()

            file_share_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.azure_file_filter_details.file_share_list
            file_share_list.Element = AAZStrType()

            blob_filter_details = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.blob_filter_details
            blob_filter_details.blob_path_list = AAZListType(
                serialized_name="blobPathList",
            )
            blob_filter_details.blob_prefix_list = AAZListType(
                serialized_name="blobPrefixList",
            )
            blob_filter_details.container_list = AAZListType(
                serialized_name="containerList",
            )

            blob_path_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.blob_filter_details.blob_path_list
            blob_path_list.Element = AAZStrType()

            blob_prefix_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.blob_filter_details.blob_prefix_list
            blob_prefix_list.Element = AAZStrType()

            container_list = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.blob_filter_details.container_list
            container_list.Element = AAZStrType()

            filter_file_details = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.filter_file_details
            filter_file_details.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.data_export_details.Element.transfer_configuration.transfer_filter_details.include.filter_file_details.Element
            _element.filter_file_path = AAZStrType(
                serialized_name="filterFilePath",
                flags={"required": True},
            )
            _element.filter_file_type = AAZStrType(
                serialized_name="filterFileType",
                flags={"required": True},
            )

            data_import_details = cls._schema_on_200.properties.details.data_import_details
            data_import_details.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.data_import_details.Element
            _element.account_details = AAZObjectType(
                serialized_name="accountDetails",
                flags={"required": True},
            )
            _CreateHelper._build_schema_data_account_details_read(_element.account_details)
            _element.log_collection_level = AAZStrType(
                serialized_name="logCollectionLevel",
            )

            datacenter_address = cls._schema_on_200.properties.details.datacenter_address
            datacenter_address.data_center_azure_location = AAZStrType(
                serialized_name="dataCenterAzureLocation",
                flags={"read_only": True},
            )
            datacenter_address.datacenter_address_type = AAZStrType(
                serialized_name="datacenterAddressType",
                flags={"required": True},
            )
            datacenter_address.supported_carriers_for_return_shipment = AAZListType(
                serialized_name="supportedCarriersForReturnShipment",
                flags={"read_only": True},
            )

            supported_carriers_for_return_shipment = cls._schema_on_200.properties.details.datacenter_address.supported_carriers_for_return_shipment
            supported_carriers_for_return_shipment.Element = AAZStrType()

            disc_datacenter_address_instruction = cls._schema_on_200.properties.details.datacenter_address.discriminate_by("datacenter_address_type", "DatacenterAddressInstruction")
            disc_datacenter_address_instruction.communication_instruction = AAZStrType(
                serialized_name="communicationInstruction",
                flags={"read_only": True},
            )

            disc_datacenter_address_location = cls._schema_on_200.properties.details.datacenter_address.discriminate_by("datacenter_address_type", "DatacenterAddressLocation")
            disc_datacenter_address_location.additional_shipping_information = AAZStrType(
                serialized_name="additionalShippingInformation",
                flags={"read_only": True},
            )
            disc_datacenter_address_location.address_type = AAZStrType(
                serialized_name="addressType",
                flags={"read_only": True},
            )
            disc_datacenter_address_location.city = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.company = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.contact_person_name = AAZStrType(
                serialized_name="contactPersonName",
                flags={"read_only": True},
            )
            disc_datacenter_address_location.country = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.phone = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.phone_extension = AAZStrType(
                serialized_name="phoneExtension",
                flags={"read_only": True},
            )
            disc_datacenter_address_location.state = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.street1 = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.street2 = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.street3 = AAZStrType(
                flags={"read_only": True},
            )
            disc_datacenter_address_location.zip = AAZStrType(
                flags={"read_only": True},
            )

            device_erasure_details = cls._schema_on_200.properties.details.device_erasure_details
            device_erasure_details.device_erasure_status = AAZStrType(
                serialized_name="deviceErasureStatus",
                flags={"read_only": True},
            )
            device_erasure_details.erasure_or_destruction_certificate_sas_key = AAZStrType(
                serialized_name="erasureOrDestructionCertificateSasKey",
                flags={"read_only": True},
            )

            job_stages = cls._schema_on_200.properties.details.job_stages
            job_stages.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.job_stages.Element
            _element.display_name = AAZStrType(
                serialized_name="displayName",
                flags={"read_only": True},
            )
            _element.stage_name = AAZStrType(
                serialized_name="stageName",
                flags={"read_only": True},
            )
            _element.stage_status = AAZStrType(
                serialized_name="stageStatus",
                flags={"read_only": True},
            )
            _element.stage_time = AAZStrType(
                serialized_name="stageTime",
                flags={"read_only": True},
            )

            key_encryption_key = cls._schema_on_200.properties.details.key_encryption_key
            key_encryption_key.identity_properties = AAZObjectType(
                serialized_name="identityProperties",
            )
            key_encryption_key.kek_type = AAZStrType(
                serialized_name="kekType",
                flags={"required": True},
            )
            key_encryption_key.kek_url = AAZStrType(
                serialized_name="kekUrl",
            )
            key_encryption_key.kek_vault_resource_id = AAZStrType(
                serialized_name="kekVaultResourceID",
            )

            identity_properties = cls._schema_on_200.properties.details.key_encryption_key.identity_properties
            identity_properties.type = AAZStrType()
            identity_properties.user_assigned = AAZObjectType(
                serialized_name="userAssigned",
            )

            user_assigned = cls._schema_on_200.properties.details.key_encryption_key.identity_properties.user_assigned
            user_assigned.resource_id = AAZStrType(
                serialized_name="resourceId",
            )

            last_mitigation_action_on_job = cls._schema_on_200.properties.details.last_mitigation_action_on_job
            last_mitigation_action_on_job.action_date_time_in_utc = AAZStrType(
                serialized_name="actionDateTimeInUtc",
            )
            last_mitigation_action_on_job.customer_resolution = AAZStrType(
                serialized_name="customerResolution",
            )
            last_mitigation_action_on_job.is_performed_by_customer = AAZBoolType(
                serialized_name="isPerformedByCustomer",
            )

            preferences = cls._schema_on_200.properties.details.preferences
            preferences.encryption_preferences = AAZObjectType(
                serialized_name="encryptionPreferences",
            )
            preferences.preferred_data_center_region = AAZListType(
                serialized_name="preferredDataCenterRegion",
            )
            preferences.reverse_transport_preferences = AAZObjectType(
                serialized_name="reverseTransportPreferences",
            )
            _CreateHelper._build_schema_transport_preferences_read(preferences.reverse_transport_preferences)
            preferences.storage_account_access_tier_preferences = AAZListType(
                serialized_name="storageAccountAccessTierPreferences",
            )
            preferences.transport_preferences = AAZObjectType(
                serialized_name="transportPreferences",
            )
            _CreateHelper._build_schema_transport_preferences_read(preferences.transport_preferences)

            encryption_preferences = cls._schema_on_200.properties.details.preferences.encryption_preferences
            encryption_preferences.double_encryption = AAZStrType(
                serialized_name="doubleEncryption",
            )
            encryption_preferences.hardware_encryption = AAZStrType(
                serialized_name="hardwareEncryption",
            )

            preferred_data_center_region = cls._schema_on_200.properties.details.preferences.preferred_data_center_region
            preferred_data_center_region.Element = AAZStrType()

            storage_account_access_tier_preferences = cls._schema_on_200.properties.details.preferences.storage_account_access_tier_preferences
            storage_account_access_tier_preferences.Element = AAZStrType()

            reverse_shipping_details = cls._schema_on_200.properties.details.reverse_shipping_details
            reverse_shipping_details.contact_details = AAZObjectType(
                serialized_name="contactDetails",
            )
            reverse_shipping_details.is_updated = AAZBoolType(
                serialized_name="isUpdated",
                flags={"read_only": True},
            )
            reverse_shipping_details.shipping_address = AAZObjectType(
                serialized_name="shippingAddress",
            )
            _CreateHelper._build_schema_shipping_address_read(reverse_shipping_details.shipping_address)

            contact_details = cls._schema_on_200.properties.details.reverse_shipping_details.contact_details
            contact_details.contact_name = AAZStrType(
                serialized_name="contactName",
                flags={"required": True},
            )
            contact_details.mobile = AAZStrType()
            contact_details.phone = AAZStrType(
                flags={"required": True},
            )
            contact_details.phone_extension = AAZStrType(
                serialized_name="phoneExtension",
            )

            disc_data_box = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBox")
            disc_data_box.copy_progress = AAZListType(
                serialized_name="copyProgress",
                flags={"read_only": True},
            )
            disc_data_box.device_password = AAZStrType(
                serialized_name="devicePassword",
            )

            copy_progress = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBox").copy_progress
            copy_progress.Element = AAZObjectType()
            _CreateHelper._build_schema_copy_progress_read(copy_progress.Element)

            disc_data_box_customer_disk = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk")
            disc_data_box_customer_disk.copy_progress = AAZListType(
                serialized_name="copyProgress",
                flags={"read_only": True},
            )
            disc_data_box_customer_disk.deliver_to_dc_package_details = AAZObjectType(
                serialized_name="deliverToDcPackageDetails",
            )
            disc_data_box_customer_disk.enable_manifest_backup = AAZBoolType(
                serialized_name="enableManifestBackup",
            )
            disc_data_box_customer_disk.export_disk_details_collection = AAZDictType(
                serialized_name="exportDiskDetailsCollection",
                flags={"read_only": True},
            )
            disc_data_box_customer_disk.import_disk_details_collection = AAZDictType(
                serialized_name="importDiskDetailsCollection",
            )
            disc_data_box_customer_disk.return_to_customer_package_details = AAZObjectType(
                serialized_name="returnToCustomerPackageDetails",
                flags={"required": True},
            )

            copy_progress = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").copy_progress
            copy_progress.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").copy_progress.Element
            _element.account_id = AAZStrType(
                serialized_name="accountId",
                flags={"read_only": True},
            )
            _element.actions = AAZListType(
                flags={"read_only": True},
            )
            _element.bytes_processed = AAZIntType(
                serialized_name="bytesProcessed",
                flags={"read_only": True},
            )
            _element.copy_status = AAZStrType(
                serialized_name="copyStatus",
                flags={"read_only": True},
            )
            _element.data_account_type = AAZStrType(
                serialized_name="dataAccountType",
                flags={"read_only": True},
            )
            _element.directories_errored_out = AAZIntType(
                serialized_name="directoriesErroredOut",
                flags={"read_only": True},
            )
            _element.error = AAZObjectType()
            _CreateHelper._build_schema_cloud_error_read(_element.error)
            _element.files_errored_out = AAZIntType(
                serialized_name="filesErroredOut",
                flags={"read_only": True},
            )
            _element.files_processed = AAZIntType(
                serialized_name="filesProcessed",
                flags={"read_only": True},
            )
            _element.invalid_directories_processed = AAZIntType(
                serialized_name="invalidDirectoriesProcessed",
                flags={"read_only": True},
            )
            _element.invalid_file_bytes_uploaded = AAZIntType(
                serialized_name="invalidFileBytesUploaded",
                flags={"read_only": True},
            )
            _element.invalid_files_processed = AAZIntType(
                serialized_name="invalidFilesProcessed",
                flags={"read_only": True},
            )
            _element.is_enumeration_in_progress = AAZBoolType(
                serialized_name="isEnumerationInProgress",
                flags={"read_only": True},
            )
            _element.renamed_container_count = AAZIntType(
                serialized_name="renamedContainerCount",
                flags={"read_only": True},
            )
            _element.serial_number = AAZStrType(
                serialized_name="serialNumber",
                flags={"read_only": True},
            )
            _element.storage_account_name = AAZStrType(
                serialized_name="storageAccountName",
                flags={"read_only": True},
            )
            _element.total_bytes_to_process = AAZIntType(
                serialized_name="totalBytesToProcess",
                flags={"read_only": True},
            )
            _element.total_files_to_process = AAZIntType(
                serialized_name="totalFilesToProcess",
                flags={"read_only": True},
            )
            _element.transfer_type = AAZStrType(
                serialized_name="transferType",
                flags={"read_only": True},
            )

            actions = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").copy_progress.Element.actions
            actions.Element = AAZStrType()

            deliver_to_dc_package_details = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").deliver_to_dc_package_details
            deliver_to_dc_package_details.carrier_name = AAZStrType(
                serialized_name="carrierName",
            )
            deliver_to_dc_package_details.tracking_id = AAZStrType(
                serialized_name="trackingId",
            )

            export_disk_details_collection = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").export_disk_details_collection
            export_disk_details_collection.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").export_disk_details_collection.Element
            _element.backup_manifest_cloud_path = AAZStrType(
                serialized_name="backupManifestCloudPath",
                flags={"read_only": True},
            )
            _element.manifest_file = AAZStrType(
                serialized_name="manifestFile",
                flags={"read_only": True},
            )
            _element.manifest_hash = AAZStrType(
                serialized_name="manifestHash",
                flags={"read_only": True},
            )

            import_disk_details_collection = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").import_disk_details_collection
            import_disk_details_collection.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").import_disk_details_collection.Element
            _element.backup_manifest_cloud_path = AAZStrType(
                serialized_name="backupManifestCloudPath",
                flags={"read_only": True},
            )
            _element.bit_locker_key = AAZStrType(
                serialized_name="bitLockerKey",
                flags={"required": True, "secret": True},
            )
            _element.manifest_file = AAZStrType(
                serialized_name="manifestFile",
                flags={"required": True},
            )
            _element.manifest_hash = AAZStrType(
                serialized_name="manifestHash",
                flags={"required": True},
            )

            return_to_customer_package_details = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxCustomerDisk").return_to_customer_package_details
            return_to_customer_package_details.carrier_account_number = AAZStrType(
                serialized_name="carrierAccountNumber",
                flags={"secret": True},
            )
            return_to_customer_package_details.carrier_name = AAZStrType(
                serialized_name="carrierName",
            )
            return_to_customer_package_details.tracking_id = AAZStrType(
                serialized_name="trackingId",
            )

            disc_data_box_disk = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk")
            disc_data_box_disk.copy_progress = AAZListType(
                serialized_name="copyProgress",
                flags={"read_only": True},
            )
            disc_data_box_disk.disks_and_size_details = AAZDictType(
                serialized_name="disksAndSizeDetails",
                flags={"read_only": True},
            )
            disc_data_box_disk.granular_copy_log_details = AAZListType(
                serialized_name="granularCopyLogDetails",
                flags={"read_only": True},
            )
            disc_data_box_disk.granular_copy_progress = AAZListType(
                serialized_name="granularCopyProgress",
                flags={"read_only": True},
            )
            disc_data_box_disk.passkey = AAZStrType()
            disc_data_box_disk.preferred_disks = AAZDictType(
                serialized_name="preferredDisks",
            )

            copy_progress = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").copy_progress
            copy_progress.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").copy_progress.Element
            _element.actions = AAZListType(
                flags={"read_only": True},
            )
            _element.bytes_copied = AAZIntType(
                serialized_name="bytesCopied",
                flags={"read_only": True},
            )
            _element.error = AAZObjectType()
            _CreateHelper._build_schema_cloud_error_read(_element.error)
            _element.percent_complete = AAZIntType(
                serialized_name="percentComplete",
                flags={"read_only": True},
            )
            _element.serial_number = AAZStrType(
                serialized_name="serialNumber",
                flags={"read_only": True},
            )
            _element.status = AAZStrType(
                flags={"read_only": True},
            )

            actions = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").copy_progress.Element.actions
            actions.Element = AAZStrType()

            disks_and_size_details = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").disks_and_size_details
            disks_and_size_details.Element = AAZIntType()

            granular_copy_log_details = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").granular_copy_log_details
            granular_copy_log_details.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").granular_copy_log_details.Element
            _element.account_id = AAZStrType(
                serialized_name="accountId",
                flags={"read_only": True},
            )
            _element.copy_log_details_type = AAZStrType(
                serialized_name="copyLogDetailsType",
                flags={"required": True},
            )
            _element.error_log_link = AAZStrType(
                serialized_name="errorLogLink",
                flags={"read_only": True},
            )
            _element.serial_number = AAZStrType(
                serialized_name="serialNumber",
                flags={"read_only": True},
            )
            _element.verbose_log_link = AAZStrType(
                serialized_name="verboseLogLink",
                flags={"read_only": True},
            )

            granular_copy_progress = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").granular_copy_progress
            granular_copy_progress.Element = AAZObjectType()

            _element = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").granular_copy_progress.Element
            _element.account_id = AAZStrType(
                serialized_name="accountId",
                flags={"read_only": True},
            )
            _element.actions = AAZListType(
                flags={"read_only": True},
            )
            _element.bytes_processed = AAZIntType(
                serialized_name="bytesProcessed",
                flags={"read_only": True},
            )
            _element.copy_status = AAZStrType(
                serialized_name="copyStatus",
                flags={"read_only": True},
            )
            _element.data_account_type = AAZStrType(
                serialized_name="dataAccountType",
                flags={"read_only": True},
            )
            _element.directories_errored_out = AAZIntType(
                serialized_name="directoriesErroredOut",
                flags={"read_only": True},
            )
            _element.error = AAZObjectType()
            _CreateHelper._build_schema_cloud_error_read(_element.error)
            _element.files_errored_out = AAZIntType(
                serialized_name="filesErroredOut",
                flags={"read_only": True},
            )
            _element.files_processed = AAZIntType(
                serialized_name="filesProcessed",
                flags={"read_only": True},
            )
            _element.invalid_directories_processed = AAZIntType(
                serialized_name="invalidDirectoriesProcessed",
                flags={"read_only": True},
            )
            _element.invalid_file_bytes_uploaded = AAZIntType(
                serialized_name="invalidFileBytesUploaded",
                flags={"read_only": True},
            )
            _element.invalid_files_processed = AAZIntType(
                serialized_name="invalidFilesProcessed",
                flags={"read_only": True},
            )
            _element.is_enumeration_in_progress = AAZBoolType(
                serialized_name="isEnumerationInProgress",
                flags={"read_only": True},
            )
            _element.renamed_container_count = AAZIntType(
                serialized_name="renamedContainerCount",
                flags={"read_only": True},
            )
            _element.serial_number = AAZStrType(
                serialized_name="serialNumber",
                flags={"read_only": True},
            )
            _element.storage_account_name = AAZStrType(
                serialized_name="storageAccountName",
                flags={"read_only": True},
            )
            _element.total_bytes_to_process = AAZIntType(
                serialized_name="totalBytesToProcess",
                flags={"read_only": True},
            )
            _element.total_files_to_process = AAZIntType(
                serialized_name="totalFilesToProcess",
                flags={"read_only": True},
            )
            _element.transfer_type = AAZStrType(
                serialized_name="transferType",
                flags={"read_only": True},
            )

            actions = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").granular_copy_progress.Element.actions
            actions.Element = AAZStrType()

            preferred_disks = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxDisk").preferred_disks
            preferred_disks.Element = AAZIntType()

            disc_data_box_heavy = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxHeavy")
            disc_data_box_heavy.copy_progress = AAZListType(
                serialized_name="copyProgress",
                flags={"read_only": True},
            )
            disc_data_box_heavy.device_password = AAZStrType(
                serialized_name="devicePassword",
            )

            copy_progress = cls._schema_on_200.properties.details.discriminate_by("job_details_type", "DataBoxHeavy").copy_progress
            copy_progress.Element = AAZObjectType()
            _CreateHelper._build_schema_copy_progress_read(copy_progress.Element)

            sku = cls._schema_on_200.sku
            sku.display_name = AAZStrType(
                serialized_name="displayName",
            )
            sku.family = AAZStrType()
            sku.name = AAZStrType(
                flags={"required": True},
            )

            system_data = cls._schema_on_200.system_data
            system_data.created_at = AAZStrType(
                serialized_name="createdAt",
                flags={"read_only": True},
            )
            system_data.created_by = AAZStrType(
                serialized_name="createdBy",
                flags={"read_only": True},
            )
            system_data.created_by_type = AAZStrType(
                serialized_name="createdByType",
                flags={"read_only": True},
            )
            system_data.last_modified_at = AAZStrType(
                serialized_name="lastModifiedAt",
                flags={"read_only": True},
            )
            system_data.last_modified_by = AAZStrType(
                serialized_name="lastModifiedBy",
                flags={"read_only": True},
            )
            system_data.last_modified_by_type = AAZStrType(
                serialized_name="lastModifiedByType",
                flags={"read_only": True},
            )

            tags = cls._schema_on_200.tags
            tags.Element = AAZStrType()

            return cls._schema_on_200


class _CreateHelper:
    """Helper class for Create"""

    @classmethod
    def _build_schema_shipping_address_create(cls, _builder):
        if _builder is None:
            return
        _builder.set_prop("addressType", AAZStrType, ".address_type")
        _builder.set_prop("city", AAZStrType, ".city")
        _builder.set_prop("companyName", AAZStrType, ".company_name")
        _builder.set_prop("country", AAZStrType, ".country", typ_kwargs={"flags": {"required": True}})
        _builder.set_prop("postalCode", AAZStrType, ".postal_code")
        _builder.set_prop("skipAddressValidation", AAZBoolType, ".skip_address_validation")
        _builder.set_prop("stateOrProvince", AAZStrType, ".state_or_province")
        _builder.set_prop("streetAddress1", AAZStrType, ".street_address1", typ_kwargs={"flags": {"required": True}})
        _builder.set_prop("streetAddress2", AAZStrType, ".street_address2")
        _builder.set_prop("streetAddress3", AAZStrType, ".street_address3")
        _builder.set_prop("taxIdentificationNumber", AAZStrType, ".tax_identification_number")
        _builder.set_prop("zipExtendedCode", AAZStrType, ".zip_extended_code")

    @classmethod
    def _build_schema_transport_preferences_create(cls, _builder):
        if _builder is None:
            return
        _builder.set_prop("preferredShipmentType", AAZStrType, ".preferred_shipment_type", typ_kwargs={"flags": {"required": True}})

    _schema_cloud_error_read = None

    @classmethod
    def _build_schema_cloud_error_read(cls, _schema):
        if cls._schema_cloud_error_read is not None:
            _schema.additional_info = cls._schema_cloud_error_read.additional_info
            _schema.code = cls._schema_cloud_error_read.code
            _schema.details = cls._schema_cloud_error_read.details
            _schema.message = cls._schema_cloud_error_read.message
            _schema.target = cls._schema_cloud_error_read.target
            return

        cls._schema_cloud_error_read = _schema_cloud_error_read = AAZObjectType()

        cloud_error_read = _schema_cloud_error_read
        cloud_error_read.additional_info = AAZListType(
            serialized_name="additionalInfo",
            flags={"read_only": True},
        )
        cloud_error_read.code = AAZStrType()
        cloud_error_read.details = AAZListType(
            flags={"read_only": True},
        )
        cloud_error_read.message = AAZStrType()
        cloud_error_read.target = AAZStrType()

        additional_info = _schema_cloud_error_read.additional_info
        additional_info.Element = AAZObjectType()

        _element = _schema_cloud_error_read.additional_info.Element
        _element.type = AAZStrType()

        details = _schema_cloud_error_read.details
        details.Element = AAZObjectType()
        cls._build_schema_cloud_error_read(details.Element)

        _schema.additional_info = cls._schema_cloud_error_read.additional_info
        _schema.code = cls._schema_cloud_error_read.code
        _schema.details = cls._schema_cloud_error_read.details
        _schema.message = cls._schema_cloud_error_read.message
        _schema.target = cls._schema_cloud_error_read.target

    _schema_copy_progress_read = None

    @classmethod
    def _build_schema_copy_progress_read(cls, _schema):
        if cls._schema_copy_progress_read is not None:
            _schema.account_id = cls._schema_copy_progress_read.account_id
            _schema.actions = cls._schema_copy_progress_read.actions
            _schema.bytes_processed = cls._schema_copy_progress_read.bytes_processed
            _schema.data_account_type = cls._schema_copy_progress_read.data_account_type
            _schema.directories_errored_out = cls._schema_copy_progress_read.directories_errored_out
            _schema.error = cls._schema_copy_progress_read.error
            _schema.files_errored_out = cls._schema_copy_progress_read.files_errored_out
            _schema.files_processed = cls._schema_copy_progress_read.files_processed
            _schema.invalid_directories_processed = cls._schema_copy_progress_read.invalid_directories_processed
            _schema.invalid_file_bytes_uploaded = cls._schema_copy_progress_read.invalid_file_bytes_uploaded
            _schema.invalid_files_processed = cls._schema_copy_progress_read.invalid_files_processed
            _schema.is_enumeration_in_progress = cls._schema_copy_progress_read.is_enumeration_in_progress
            _schema.renamed_container_count = cls._schema_copy_progress_read.renamed_container_count
            _schema.storage_account_name = cls._schema_copy_progress_read.storage_account_name
            _schema.total_bytes_to_process = cls._schema_copy_progress_read.total_bytes_to_process
            _schema.total_files_to_process = cls._schema_copy_progress_read.total_files_to_process
            _schema.transfer_type = cls._schema_copy_progress_read.transfer_type
            return

        cls._schema_copy_progress_read = _schema_copy_progress_read = AAZObjectType()

        copy_progress_read = _schema_copy_progress_read
        copy_progress_read.account_id = AAZStrType(
            serialized_name="accountId",
            flags={"read_only": True},
        )
        copy_progress_read.actions = AAZListType(
            flags={"read_only": True},
        )
        copy_progress_read.bytes_processed = AAZIntType(
            serialized_name="bytesProcessed",
            flags={"read_only": True},
        )
        copy_progress_read.data_account_type = AAZStrType(
            serialized_name="dataAccountType",
            flags={"read_only": True},
        )
        copy_progress_read.directories_errored_out = AAZIntType(
            serialized_name="directoriesErroredOut",
            flags={"read_only": True},
        )
        copy_progress_read.error = AAZObjectType()
        cls._build_schema_cloud_error_read(copy_progress_read.error)
        copy_progress_read.files_errored_out = AAZIntType(
            serialized_name="filesErroredOut",
            flags={"read_only": True},
        )
        copy_progress_read.files_processed = AAZIntType(
            serialized_name="filesProcessed",
            flags={"read_only": True},
        )
        copy_progress_read.invalid_directories_processed = AAZIntType(
            serialized_name="invalidDirectoriesProcessed",
            flags={"read_only": True},
        )
        copy_progress_read.invalid_file_bytes_uploaded = AAZIntType(
            serialized_name="invalidFileBytesUploaded",
            flags={"read_only": True},
        )
        copy_progress_read.invalid_files_processed = AAZIntType(
            serialized_name="invalidFilesProcessed",
            flags={"read_only": True},
        )
        copy_progress_read.is_enumeration_in_progress = AAZBoolType(
            serialized_name="isEnumerationInProgress",
            flags={"read_only": True},
        )
        copy_progress_read.renamed_container_count = AAZIntType(
            serialized_name="renamedContainerCount",
            flags={"read_only": True},
        )
        copy_progress_read.storage_account_name = AAZStrType(
            serialized_name="storageAccountName",
            flags={"read_only": True},
        )
        copy_progress_read.total_bytes_to_process = AAZIntType(
            serialized_name="totalBytesToProcess",
            flags={"read_only": True},
        )
        copy_progress_read.total_files_to_process = AAZIntType(
            serialized_name="totalFilesToProcess",
            flags={"read_only": True},
        )
        copy_progress_read.transfer_type = AAZStrType(
            serialized_name="transferType",
            flags={"read_only": True},
        )

        actions = _schema_copy_progress_read.actions
        actions.Element = AAZStrType()

        _schema.account_id = cls._schema_copy_progress_read.account_id
        _schema.actions = cls._schema_copy_progress_read.actions
        _schema.bytes_processed = cls._schema_copy_progress_read.bytes_processed
        _schema.data_account_type = cls._schema_copy_progress_read.data_account_type
        _schema.directories_errored_out = cls._schema_copy_progress_read.directories_errored_out
        _schema.error = cls._schema_copy_progress_read.error
        _schema.files_errored_out = cls._schema_copy_progress_read.files_errored_out
        _schema.files_processed = cls._schema_copy_progress_read.files_processed
        _schema.invalid_directories_processed = cls._schema_copy_progress_read.invalid_directories_processed
        _schema.invalid_file_bytes_uploaded = cls._schema_copy_progress_read.invalid_file_bytes_uploaded
        _schema.invalid_files_processed = cls._schema_copy_progress_read.invalid_files_processed
        _schema.is_enumeration_in_progress = cls._schema_copy_progress_read.is_enumeration_in_progress
        _schema.renamed_container_count = cls._schema_copy_progress_read.renamed_container_count
        _schema.storage_account_name = cls._schema_copy_progress_read.storage_account_name
        _schema.total_bytes_to_process = cls._schema_copy_progress_read.total_bytes_to_process
        _schema.total_files_to_process = cls._schema_copy_progress_read.total_files_to_process
        _schema.transfer_type = cls._schema_copy_progress_read.transfer_type

    _schema_data_account_details_read = None

    @classmethod
    def _build_schema_data_account_details_read(cls, _schema):
        if cls._schema_data_account_details_read is not None:
            _schema.data_account_type = cls._schema_data_account_details_read.data_account_type
            _schema.discriminate_by(
                "data_account_type",
                "ManagedDisk",
                cls._schema_data_account_details_read.discriminate_by(
                    "data_account_type",
                    "ManagedDisk",
                )
            )
            _schema.discriminate_by(
                "data_account_type",
                "StorageAccount",
                cls._schema_data_account_details_read.discriminate_by(
                    "data_account_type",
                    "StorageAccount",
                )
            )
            return

        cls._schema_data_account_details_read = _schema_data_account_details_read = AAZObjectType()

        data_account_details_read = _schema_data_account_details_read
        data_account_details_read.data_account_type = AAZStrType(
            serialized_name="dataAccountType",
            flags={"required": True},
        )

        disc_managed_disk = _schema_data_account_details_read.discriminate_by("data_account_type", "ManagedDisk")
        disc_managed_disk.resource_group_id = AAZStrType(
            serialized_name="resourceGroupId",
            flags={"required": True},
        )
        disc_managed_disk.staging_storage_account_id = AAZStrType(
            serialized_name="stagingStorageAccountId",
            flags={"required": True},
        )

        disc_storage_account = _schema_data_account_details_read.discriminate_by("data_account_type", "StorageAccount")
        disc_storage_account.storage_account_id = AAZStrType(
            serialized_name="storageAccountId",
            flags={"required": True},
        )

        _schema.data_account_type = cls._schema_data_account_details_read.data_account_type
        _schema.discriminate_by(
                "data_account_type",
                "ManagedDisk",
                cls._schema_data_account_details_read.discriminate_by(
                    "data_account_type",
                    "ManagedDisk",
                )
            )
        _schema.discriminate_by(
                "data_account_type",
                "StorageAccount",
                cls._schema_data_account_details_read.discriminate_by(
                    "data_account_type",
                    "StorageAccount",
                )
            )

    _schema_package_shipping_details_read = None

    @classmethod
    def _build_schema_package_shipping_details_read(cls, _schema):
        if cls._schema_package_shipping_details_read is not None:
            _schema.carrier_name = cls._schema_package_shipping_details_read.carrier_name
            _schema.tracking_id = cls._schema_package_shipping_details_read.tracking_id
            _schema.tracking_url = cls._schema_package_shipping_details_read.tracking_url
            return

        cls._schema_package_shipping_details_read = _schema_package_shipping_details_read = AAZObjectType()

        package_shipping_details_read = _schema_package_shipping_details_read
        package_shipping_details_read.carrier_name = AAZStrType(
            serialized_name="carrierName",
            flags={"read_only": True},
        )
        package_shipping_details_read.tracking_id = AAZStrType(
            serialized_name="trackingId",
            flags={"read_only": True},
        )
        package_shipping_details_read.tracking_url = AAZStrType(
            serialized_name="trackingUrl",
            flags={"read_only": True},
        )

        _schema.carrier_name = cls._schema_package_shipping_details_read.carrier_name
        _schema.tracking_id = cls._schema_package_shipping_details_read.tracking_id
        _schema.tracking_url = cls._schema_package_shipping_details_read.tracking_url

    _schema_shipping_address_read = None

    @classmethod
    def _build_schema_shipping_address_read(cls, _schema):
        if cls._schema_shipping_address_read is not None:
            _schema.address_type = cls._schema_shipping_address_read.address_type
            _schema.city = cls._schema_shipping_address_read.city
            _schema.company_name = cls._schema_shipping_address_read.company_name
            _schema.country = cls._schema_shipping_address_read.country
            _schema.postal_code = cls._schema_shipping_address_read.postal_code
            _schema.skip_address_validation = cls._schema_shipping_address_read.skip_address_validation
            _schema.state_or_province = cls._schema_shipping_address_read.state_or_province
            _schema.street_address1 = cls._schema_shipping_address_read.street_address1
            _schema.street_address2 = cls._schema_shipping_address_read.street_address2
            _schema.street_address3 = cls._schema_shipping_address_read.street_address3
            _schema.tax_identification_number = cls._schema_shipping_address_read.tax_identification_number
            _schema.zip_extended_code = cls._schema_shipping_address_read.zip_extended_code
            return

        cls._schema_shipping_address_read = _schema_shipping_address_read = AAZObjectType()

        shipping_address_read = _schema_shipping_address_read
        shipping_address_read.address_type = AAZStrType(
            serialized_name="addressType",
        )
        shipping_address_read.city = AAZStrType()
        shipping_address_read.company_name = AAZStrType(
            serialized_name="companyName",
        )
        shipping_address_read.country = AAZStrType(
            flags={"required": True},
        )
        shipping_address_read.postal_code = AAZStrType(
            serialized_name="postalCode",
        )
        shipping_address_read.skip_address_validation = AAZBoolType(
            serialized_name="skipAddressValidation",
        )
        shipping_address_read.state_or_province = AAZStrType(
            serialized_name="stateOrProvince",
        )
        shipping_address_read.street_address1 = AAZStrType(
            serialized_name="streetAddress1",
            flags={"required": True},
        )
        shipping_address_read.street_address2 = AAZStrType(
            serialized_name="streetAddress2",
        )
        shipping_address_read.street_address3 = AAZStrType(
            serialized_name="streetAddress3",
        )
        shipping_address_read.tax_identification_number = AAZStrType(
            serialized_name="taxIdentificationNumber",
        )
        shipping_address_read.zip_extended_code = AAZStrType(
            serialized_name="zipExtendedCode",
        )

        _schema.address_type = cls._schema_shipping_address_read.address_type
        _schema.city = cls._schema_shipping_address_read.city
        _schema.company_name = cls._schema_shipping_address_read.company_name
        _schema.country = cls._schema_shipping_address_read.country
        _schema.postal_code = cls._schema_shipping_address_read.postal_code
        _schema.skip_address_validation = cls._schema_shipping_address_read.skip_address_validation
        _schema.state_or_province = cls._schema_shipping_address_read.state_or_province
        _schema.street_address1 = cls._schema_shipping_address_read.street_address1
        _schema.street_address2 = cls._schema_shipping_address_read.street_address2
        _schema.street_address3 = cls._schema_shipping_address_read.street_address3
        _schema.tax_identification_number = cls._schema_shipping_address_read.tax_identification_number
        _schema.zip_extended_code = cls._schema_shipping_address_read.zip_extended_code

    _schema_transport_preferences_read = None

    @classmethod
    def _build_schema_transport_preferences_read(cls, _schema):
        if cls._schema_transport_preferences_read is not None:
            _schema.is_updated = cls._schema_transport_preferences_read.is_updated
            _schema.preferred_shipment_type = cls._schema_transport_preferences_read.preferred_shipment_type
            return

        cls._schema_transport_preferences_read = _schema_transport_preferences_read = AAZObjectType()

        transport_preferences_read = _schema_transport_preferences_read
        transport_preferences_read.is_updated = AAZBoolType(
            serialized_name="isUpdated",
            flags={"read_only": True},
        )
        transport_preferences_read.preferred_shipment_type = AAZStrType(
            serialized_name="preferredShipmentType",
            flags={"required": True},
        )

        _schema.is_updated = cls._schema_transport_preferences_read.is_updated
        _schema.preferred_shipment_type = cls._schema_transport_preferences_read.preferred_shipment_type


__all__ = ["Create"]
