Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions lib/services/databoxManagement/lib/models/copyProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand Down Expand Up @@ -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'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ class DataBoxDiskJobDetails extends models['JobDetails'] {
serializedName: 'DestinationAccountDetailsElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'dataDestinationType',
clientName: 'dataDestinationType'
},
uberParent: 'DestinationAccountDetails',
className: 'DestinationAccountDetails'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class DataBoxHeavyJobDetails extends models['JobDetails'] {
serializedName: 'DestinationAccountDetailsElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'dataDestinationType',
clientName: 'dataDestinationType'
},
uberParent: 'DestinationAccountDetails',
className: 'DestinationAccountDetails'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class DataBoxJobDetails extends models['JobDetails'] {
serializedName: 'DestinationAccountDetailsElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'dataDestinationType',
clientName: 'dataDestinationType'
},
uberParent: 'DestinationAccountDetails',
className: 'DestinationAccountDetails'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand All @@ -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'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
48 changes: 43 additions & 5 deletions lib/services/databoxManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions lib/services/databoxManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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
};
5 changes: 5 additions & 0 deletions lib/services/databoxManagement/lib/models/jobDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ class JobDetails {
serializedName: 'DestinationAccountDetailsElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'dataDestinationType',
clientName: 'dataDestinationType'
},
uberParent: 'DestinationAccountDetails',
className: 'DestinationAccountDetails'
}
}
Expand Down
Loading