diff --git a/lib/services/databoxManagement/lib/models/copyProgress.js b/lib/services/databoxManagement/lib/models/copyProgress.js index 4a7f340fec..384f7ce9b4 100644 --- a/lib/services/databoxManagement/lib/models/copyProgress.js +++ b/lib/services/databoxManagement/lib/models/copyProgress.js @@ -25,6 +25,10 @@ class CopyProgress { * of now. * @member {number} [totalBytesToProcess] Total amount of data to be * processed by the job. + * @member {number} [filesProcessed] Number of files processed by the job as + * of now. + * @member {number} [totalFilesToProcess] Total number of files to be + * processed by the job. */ constructor() { } @@ -74,6 +78,22 @@ class CopyProgress { type: { name: 'Number' } + }, + filesProcessed: { + required: false, + readOnly: true, + serializedName: 'filesProcessed', + type: { + name: 'Number' + } + }, + totalFilesToProcess: { + required: false, + readOnly: true, + serializedName: 'totalFilesToProcess', + type: { + name: 'Number' + } } } } diff --git a/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js index 4db3d114e8..2db70bfc85 100644 --- a/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js +++ b/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js @@ -120,6 +120,11 @@ class DataBoxDiskJobDetails extends models['JobDetails'] { serializedName: 'DestinationAccountDetailsElementType', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails' } } diff --git a/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js index a8b80f2dc7..3c1e29eb7a 100644 --- a/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js +++ b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js @@ -112,6 +112,11 @@ class DataBoxHeavyJobDetails extends models['JobDetails'] { serializedName: 'DestinationAccountDetailsElementType', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails' } } diff --git a/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js index e19501f82c..55df59c89d 100644 --- a/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js +++ b/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js @@ -112,6 +112,11 @@ class DataBoxJobDetails extends models['JobDetails'] { serializedName: 'DestinationAccountDetailsElementType', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails' } } diff --git a/lib/services/databoxManagement/lib/models/destinationAccountDetails.js b/lib/services/databoxManagement/lib/models/destinationAccountDetails.js index c1a7a7c680..a2262978b2 100644 --- a/lib/services/databoxManagement/lib/models/destinationAccountDetails.js +++ b/lib/services/databoxManagement/lib/models/destinationAccountDetails.js @@ -11,13 +11,15 @@ 'use strict'; /** - * Details for the destination account. + * Details of the destination of the data * */ class DestinationAccountDetails { /** * Create a DestinationAccountDetails. - * @member {string} accountId Destination storage account id. + * @member {string} [accountId] Arm Id of the destination where the data has + * to be moved. + * @member {string} dataDestinationType Polymorphic Discriminator */ constructor() { } @@ -34,14 +36,27 @@ class DestinationAccountDetails { serializedName: 'DestinationAccountDetails', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails', modelProperties: { accountId: { - required: true, + required: false, serializedName: 'accountId', type: { name: 'String' } + }, + dataDestinationType: { + required: true, + serializedName: 'dataDestinationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } } } } diff --git a/lib/services/databoxManagement/lib/models/destinationManagedDiskDetails.js b/lib/services/databoxManagement/lib/models/destinationManagedDiskDetails.js new file mode 100644 index 0000000000..1432af2e6c --- /dev/null +++ b/lib/services/databoxManagement/lib/models/destinationManagedDiskDetails.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Details for the destination compute disks. + * + * @extends models['DestinationAccountDetails'] + */ +class DestinationManagedDiskDetails extends models['DestinationAccountDetails'] { + /** + * Create a DestinationManagedDiskDetails. + * @member {string} resourceGroupId Destination Resource Group Id where the + * Compute disks should be created. + * @member {string} stagingStorageAccountId Arm Id of the storage account + * that can be used to copy the vhd for staging. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DestinationManagedDiskDetails + * + * @returns {object} metadata of DestinationManagedDiskDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', + className: 'DestinationManagedDiskDetails', + modelProperties: { + accountId: { + required: false, + serializedName: 'accountId', + type: { + name: 'String' + } + }, + dataDestinationType: { + required: true, + serializedName: 'dataDestinationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + resourceGroupId: { + required: true, + serializedName: 'resourceGroupId', + type: { + name: 'String' + } + }, + stagingStorageAccountId: { + required: true, + serializedName: 'stagingStorageAccountId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DestinationManagedDiskDetails; diff --git a/lib/services/databoxManagement/lib/models/destinationStorageAccountDetails.js b/lib/services/databoxManagement/lib/models/destinationStorageAccountDetails.js new file mode 100644 index 0000000000..b9a364f362 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/destinationStorageAccountDetails.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Details for the destination storage account. + * + * @extends models['DestinationAccountDetails'] + */ +class DestinationStorageAccountDetails extends models['DestinationAccountDetails'] { + /** + * Create a DestinationStorageAccountDetails. + * @member {string} storageAccountId Destination Storage Account Arm Id. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DestinationStorageAccountDetails + * + * @returns {object} metadata of DestinationStorageAccountDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageAccount', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', + className: 'DestinationStorageAccountDetails', + modelProperties: { + accountId: { + required: false, + serializedName: 'accountId', + type: { + name: 'String' + } + }, + dataDestinationType: { + required: true, + serializedName: 'dataDestinationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + storageAccountId: { + required: true, + serializedName: 'storageAccountId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DestinationStorageAccountDetails; diff --git a/lib/services/databoxManagement/lib/models/index.d.ts b/lib/services/databoxManagement/lib/models/index.d.ts index fee82c5576..bb3eb8ec56 100644 --- a/lib/services/databoxManagement/lib/models/index.d.ts +++ b/lib/services/databoxManagement/lib/models/index.d.ts @@ -24,7 +24,7 @@ export { CloudError } from 'ms-rest-azure'; * * @member {string} [shareName] Name of the share. * @member {string} [shareType] Type of the share. Possible values include: - * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' + * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' * @member {string} [userName] User name for the share. * @member {string} [password] Password for the share. * @member {array} [supportedAccessProtocols] Access protocols supported on the @@ -230,7 +230,8 @@ export interface SkuCost { * @member {array} [costs] Cost of the Sku. * @member {array} [apiVersions] Api versions that support this Sku. * @member {string} [disabledReason] Reason why the Sku is disabled. Possible - * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType' + * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType', + * 'NoSubscriptionInfo' * @member {string} [disabledReasonMessage] Message for why the Sku is * disabled. * @member {string} [requiredFeature] Required feature to access the sku. @@ -326,12 +327,18 @@ export interface CopyLogDetails { * now. * @member {number} [totalBytesToProcess] Total amount of data to be processed * by the job. + * @member {number} [filesProcessed] Number of files processed by the job as of + * now. + * @member {number} [totalFilesToProcess] Total number of files to be processed + * by the job. */ export interface CopyProgress { readonly storageAccountName?: string; readonly accountId?: string; readonly bytesSentToCloud?: number; readonly totalBytesToProcess?: number; + readonly filesProcessed?: number; + readonly totalFilesToProcess?: number; } /** @@ -639,12 +646,43 @@ export interface DataboxJobSecrets extends JobSecrets { * @class * Initializes a new instance of the DestinationAccountDetails class. * @constructor - * Details for the destination account. + * Details of the destination of the data * - * @member {string} accountId Destination storage account id. + * @member {string} [accountId] Arm Id of the destination where the data has to + * be moved. + * @member {string} dataDestinationType Polymorphic Discriminator */ export interface DestinationAccountDetails { - accountId: string; + accountId?: string; + dataDestinationType: string; +} + +/** + * @class + * Initializes a new instance of the DestinationManagedDiskDetails class. + * @constructor + * Details for the destination compute disks. + * + * @member {string} resourceGroupId Destination Resource Group Id where the + * Compute disks should be created. + * @member {string} stagingStorageAccountId Arm Id of the storage account that + * can be used to copy the vhd for staging. + */ +export interface DestinationManagedDiskDetails extends DestinationAccountDetails { + resourceGroupId: string; + stagingStorageAccountId: string; +} + +/** + * @class + * Initializes a new instance of the DestinationStorageAccountDetails class. + * @constructor + * Details for the destination storage account. + * + * @member {string} storageAccountId Destination Storage Account Arm Id. + */ +export interface DestinationStorageAccountDetails extends DestinationAccountDetails { + storageAccountId: string; } /** diff --git a/lib/services/databoxManagement/lib/models/index.js b/lib/services/databoxManagement/lib/models/index.js index 726f31c4a6..252530d72b 100644 --- a/lib/services/databoxManagement/lib/models/index.js +++ b/lib/services/databoxManagement/lib/models/index.js @@ -51,6 +51,8 @@ exports.DataBoxJobDetails = require('./dataBoxJobDetails'); exports.DataBoxSecret = require('./dataBoxSecret'); exports.DataboxJobSecrets = require('./databoxJobSecrets'); exports.DestinationAccountDetails = require('./destinationAccountDetails'); +exports.DestinationManagedDiskDetails = require('./destinationManagedDiskDetails'); +exports.DestinationStorageAccountDetails = require('./destinationStorageAccountDetails'); exports.ErrorModel = require('./errorModel'); exports.JobErrorDetails = require('./jobErrorDetails'); exports.JobStages = require('./jobStages'); @@ -81,6 +83,9 @@ exports.discriminators = { 'JobSecrets.DataBoxHeavy' : exports.DataBoxHeavyJobSecrets, 'JobDetails.DataBox' : exports.DataBoxJobDetails, 'JobSecrets.DataBox' : exports.DataboxJobSecrets, + 'DestinationAccountDetails' : exports.DestinationAccountDetails, + 'DestinationAccountDetails.ManagedDisk' : exports.DestinationManagedDiskDetails, + 'DestinationAccountDetails.StorageAccount' : exports.DestinationStorageAccountDetails, 'JobDetails' : exports.JobDetails, 'JobSecrets' : exports.JobSecrets }; diff --git a/lib/services/databoxManagement/lib/models/jobDetails.js b/lib/services/databoxManagement/lib/models/jobDetails.js index c9a50e2889..10adaa1616 100644 --- a/lib/services/databoxManagement/lib/models/jobDetails.js +++ b/lib/services/databoxManagement/lib/models/jobDetails.js @@ -157,6 +157,11 @@ class JobDetails { serializedName: 'DestinationAccountDetailsElementType', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails' } } diff --git a/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js b/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js index d4d85a55b0..c340493070 100644 --- a/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js +++ b/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js @@ -91,6 +91,11 @@ class JobResourceUpdateParameter { serializedName: 'DestinationAccountDetailsElementType', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'dataDestinationType', + clientName: 'dataDestinationType' + }, + uberParent: 'DestinationAccountDetails', className: 'DestinationAccountDetails' } } diff --git a/lib/services/databoxManagement/lib/models/shareCredentialDetails.js b/lib/services/databoxManagement/lib/models/shareCredentialDetails.js index 1987c2df08..40cd1d01d7 100644 --- a/lib/services/databoxManagement/lib/models/shareCredentialDetails.js +++ b/lib/services/databoxManagement/lib/models/shareCredentialDetails.js @@ -19,7 +19,7 @@ class ShareCredentialDetails { * Create a ShareCredentialDetails. * @member {string} [shareName] Name of the share. * @member {string} [shareType] Type of the share. Possible values include: - * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' + * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' * @member {string} [userName] User name for the share. * @member {string} [password] Password for the share. * @member {array} [supportedAccessProtocols] Access protocols supported on @@ -56,7 +56,7 @@ class ShareCredentialDetails { serializedName: 'shareType', type: { name: 'Enum', - allowedValues: [ 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' ] + allowedValues: [ 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' ] } }, userName: { diff --git a/lib/services/databoxManagement/lib/models/skuInformation.js b/lib/services/databoxManagement/lib/models/skuInformation.js index 4f3e072e54..2b0f583d55 100644 --- a/lib/services/databoxManagement/lib/models/skuInformation.js +++ b/lib/services/databoxManagement/lib/models/skuInformation.js @@ -31,7 +31,8 @@ class SkuInformation { * @member {array} [costs] Cost of the Sku. * @member {array} [apiVersions] Api versions that support this Sku. * @member {string} [disabledReason] Reason why the Sku is disabled. Possible - * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType' + * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType', + * 'NoSubscriptionInfo' * @member {string} [disabledReasonMessage] Message for why the Sku is * disabled. * @member {string} [requiredFeature] Required feature to access the sku. @@ -132,7 +133,7 @@ class SkuInformation { serializedName: 'properties.disabledReason', type: { name: 'Enum', - allowedValues: [ 'None', 'Country', 'Region', 'Feature', 'OfferType' ] + allowedValues: [ 'None', 'Country', 'Region', 'Feature', 'OfferType', 'NoSubscriptionInfo' ] } }, disabledReasonMessage: { diff --git a/lib/services/databoxManagement/package.json b/lib/services/databoxManagement/package.json index 368a0045c1..67487b67b4 100644 --- a/lib/services/databoxManagement/package.json +++ b/lib/services/databoxManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-databox", "author": "Microsoft Corporation", "description": "DataBoxManagementClient Library with typescript type definitions for node", - "version": "2.0.0-preview", + "version": "0.0.1", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5"