def content()

in src/databox/azext_databox/aaz/latest/databox/job/_create.py [0:0]


        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)