diff --git a/lib/services/storagesyncManagement/lib/models/azureEntityResource.js b/lib/services/storagesyncManagement/lib/models/azureEntityResource.js new file mode 100644 index 0000000000..a87a9fe033 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/azureEntityResource.js @@ -0,0 +1,82 @@ +/* + * 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'); + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + * + * @extends models['Resource'] + */ +class AzureEntityResource extends models['Resource'] { + /** + * Create a AzureEntityResource. + * @member {string} [etag] Resource Etag. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureEntityResource + * + * @returns {object} metadata of AzureEntityResource + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureEntityResource', + type: { + name: 'Composite', + className: 'AzureEntityResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureEntityResource; diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js index 8143070314..e072f99069 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Cloud Endpoint object. * - * @extends models['BaseResource'] + * @extends models['Resource'] */ -class CloudEndpoint extends models['BaseResource'] { +class CloudEndpoint extends models['Resource'] { /** * Create a CloudEndpoint. * @member {string} [storageAccountKey] Storage Account access key. @@ -50,6 +50,30 @@ class CloudEndpoint extends models['BaseResource'] { name: 'Composite', className: 'CloudEndpoint', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, storageAccountKey: { required: false, serializedName: 'properties.storageAccountKey', diff --git a/lib/services/storagesyncManagement/lib/models/index.d.ts b/lib/services/storagesyncManagement/lib/models/index.d.ts index 8ee127992a..4fa06f73d5 100644 --- a/lib/services/storagesyncManagement/lib/models/index.d.ts +++ b/lib/services/storagesyncManagement/lib/models/index.d.ts @@ -53,13 +53,30 @@ export interface StorageSyncError { /** * @class - * Initializes a new instance of the Resource class. + * Initializes a new instance of the SubscriptionState class. * @constructor - * The Azure Resource Manager resource. + * Subscription State object. * - * @member {string} [id] The id of the resource. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource + * @member {string} [state] State of Azure Subscription. Possible values + * include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' + * @member {boolean} [istransitioning] Is Transitioning + * @member {object} [properties] Subscription state properties. + */ +export interface SubscriptionState { + state?: string; + readonly istransitioning?: boolean; + properties?: any; +} + +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * @member {string} [id] Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * @member {string} [name] The name of the resource + * @member {string} [type] The type of the resource. Ex- + * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. */ export interface Resource extends BaseResource { readonly id?: string; @@ -69,19 +86,16 @@ export interface Resource extends BaseResource { /** * @class - * Initializes a new instance of the SubscriptionState class. + * Initializes a new instance of the TrackedResource class. * @constructor - * Subscription State object. + * The resource model definition for a ARM tracked top level resource * - * @member {string} [state] State of Azure Subscription. Possible values - * include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' - * @member {boolean} [istransitioning] Is Transitioning - * @member {object} [properties] Subscription state properties. + * @member {object} [tags] Resource tags. + * @member {string} location The geo-location where the resource lives */ -export interface SubscriptionState { - state?: string; - readonly istransitioning?: boolean; - properties?: any; +export interface TrackedResource extends Resource { + tags?: { [propertyName: string]: string }; + location: string; } /** @@ -93,7 +107,7 @@ export interface SubscriptionState { * @member {number} [storageSyncServiceStatus] Storage Sync service status. * @member {string} [storageSyncServiceUid] Storage Sync service Uid */ -export interface StorageSyncService extends BaseResource { +export interface StorageSyncService extends TrackedResource { readonly storageSyncServiceStatus?: number; readonly storageSyncServiceUid?: string; } @@ -107,7 +121,7 @@ export interface StorageSyncService extends BaseResource { * @member {string} [uniqueId] Unique Id * @member {string} [syncGroupStatus] Sync group status */ -export interface SyncGroup extends BaseResource { +export interface SyncGroup extends Resource { uniqueId?: string; readonly syncGroupStatus?: string; } @@ -130,7 +144,7 @@ export interface SyncGroup extends BaseResource { * @member {string} [lastWorkflowId] CloudEndpoint lastWorkflowId * @member {string} [lastOperationName] Resource Last Operation Name */ -export interface CloudEndpoint extends BaseResource { +export interface CloudEndpoint extends Resource { storageAccountKey?: string; storageAccount?: string; storageAccountResourceId?: string; @@ -181,7 +195,7 @@ export interface ServerEndpointUpdateParameters { * @member {string} [lastOperationName] Resource Last Operation Name * @member {object} [syncStatus] Sync Health Status */ -export interface ServerEndpoint extends BaseResource { +export interface ServerEndpoint extends Resource { serverLocalPath?: string; cloudTiering?: string; volumeFreeSpacePercent?: number; @@ -275,7 +289,7 @@ export interface ResourcesMoveInfo { * @member {string} [steps] workflow steps * @member {string} [lastOperationId] workflow last operation identifier. */ -export interface Workflow extends BaseResource { +export interface Workflow extends Resource { lastStepName?: string; status?: string; operation?: string; @@ -501,16 +515,26 @@ export interface StorageSyncServiceUpdateParameters { /** * @class - * Initializes a new instance of the TrackedResource class. + * Initializes a new instance of the ProxyResource class. * @constructor - * The resource model definition for a ARM tracked top level resource + * The resource model definition for a ARM proxy resource. It will have + * everything other than required location and tags * - * @member {object} [tags] Resource tags. - * @member {string} location The geo-location where the resource lives */ -export interface TrackedResource extends Resource { - tags?: { [propertyName: string]: string }; - location: string; +export interface ProxyResource extends Resource { +} + +/** + * @class + * Initializes a new instance of the AzureEntityResource class. + * @constructor + * The resource model definition for a Azure Resource Manager resource with an + * etag. + * + * @member {string} [etag] Resource Etag. + */ +export interface AzureEntityResource extends Resource { + readonly etag?: string; } diff --git a/lib/services/storagesyncManagement/lib/models/index.js b/lib/services/storagesyncManagement/lib/models/index.js index e0c70badaa..120c64445a 100644 --- a/lib/services/storagesyncManagement/lib/models/index.js +++ b/lib/services/storagesyncManagement/lib/models/index.js @@ -20,8 +20,9 @@ exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; exports.StorageSyncErrorDetails = require('./storageSyncErrorDetails'); exports.StorageSyncError = require('./storageSyncError'); -exports.Resource = require('./resource'); exports.SubscriptionState = require('./subscriptionState'); +exports.Resource = require('./resource'); +exports.TrackedResource = require('./trackedResource'); exports.StorageSyncService = require('./storageSyncService'); exports.SyncGroup = require('./syncGroup'); exports.CloudEndpoint = require('./cloudEndpoint'); @@ -42,7 +43,8 @@ exports.BackupRequest = require('./backupRequest'); exports.PostBackupResponse = require('./postBackupResponse'); exports.WorkflowArray = require('./workflowArray'); exports.StorageSyncServiceUpdateParameters = require('./storageSyncServiceUpdateParameters'); -exports.TrackedResource = require('./trackedResource'); +exports.ProxyResource = require('./proxyResource'); +exports.AzureEntityResource = require('./azureEntityResource'); exports.OperationEntityListResult = require('./operationEntityListResult'); exports.StorageSyncServiceArray = require('./storageSyncServiceArray'); exports.SyncGroupArray = require('./syncGroupArray'); diff --git a/lib/services/storagesyncManagement/lib/models/operationEntity.js b/lib/services/storagesyncManagement/lib/models/operationEntity.js index e7a1b503f7..8d29602603 100644 --- a/lib/services/storagesyncManagement/lib/models/operationEntity.js +++ b/lib/services/storagesyncManagement/lib/models/operationEntity.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * The operation supported by storage sync. * diff --git a/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js b/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js index 32be654193..82450187a5 100644 --- a/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js +++ b/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Post Restore Request * diff --git a/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js b/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js index 47c2c0e206..3afda3c8b9 100644 --- a/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js +++ b/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Pre Restore request object. * diff --git a/lib/services/storagesyncManagement/lib/models/proxyResource.js b/lib/services/storagesyncManagement/lib/models/proxyResource.js new file mode 100644 index 0000000000..43e93ec60e --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/proxyResource.js @@ -0,0 +1,73 @@ +/* + * 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'); + +/** + * The resource model definition for a ARM proxy resource. It will have + * everything other than required location and tags + * + * @extends models['Resource'] + */ +class ProxyResource extends models['Resource'] { + /** + * Create a ProxyResource. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ProxyResource + * + * @returns {object} metadata of ProxyResource + * + */ + mapper() { + return { + required: false, + serializedName: 'ProxyResource', + type: { + name: 'Composite', + className: 'ProxyResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProxyResource; diff --git a/lib/services/storagesyncManagement/lib/models/resource.js b/lib/services/storagesyncManagement/lib/models/resource.js index 41b5d5e0a9..b9797bc86d 100644 --- a/lib/services/storagesyncManagement/lib/models/resource.js +++ b/lib/services/storagesyncManagement/lib/models/resource.js @@ -13,16 +13,17 @@ const models = require('./index'); /** - * The Azure Resource Manager resource. - * + * Class representing a Resource. * @extends models['BaseResource'] */ class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] The id of the resource. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource + * @member {string} [id] Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * @member {string} [name] The name of the resource + * @member {string} [type] The type of the resource. Ex- + * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js index 98554e6aa1..488195a83d 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Server Endpoint object. * - * @extends models['BaseResource'] + * @extends models['Resource'] */ -class ServerEndpoint extends models['BaseResource'] { +class ServerEndpoint extends models['Resource'] { /** * Create a ServerEndpoint. * @member {string} [serverLocalPath] Server Local path. @@ -50,6 +50,30 @@ class ServerEndpoint extends models['BaseResource'] { name: 'Composite', className: 'ServerEndpoint', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, serverLocalPath: { required: false, serializedName: 'properties.serverLocalPath', diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncError.js b/lib/services/storagesyncManagement/lib/models/storageSyncError.js index b185128307..509d940f23 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncError.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncError.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Error type * diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncService.js b/lib/services/storagesyncManagement/lib/models/storageSyncService.js index f6b979f943..3ec28e3fab 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncService.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncService.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Storage Sync Service object. * - * @extends models['BaseResource'] + * @extends models['TrackedResource'] */ -class StorageSyncService extends models['BaseResource'] { +class StorageSyncService extends models['TrackedResource'] { /** * Create a StorageSyncService. * @member {number} [storageSyncServiceStatus] Storage Sync service status. @@ -41,6 +41,51 @@ class StorageSyncService extends models['BaseResource'] { name: 'Composite', className: 'StorageSyncService', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, storageSyncServiceStatus: { required: false, readOnly: true, diff --git a/lib/services/storagesyncManagement/lib/models/syncGroup.js b/lib/services/storagesyncManagement/lib/models/syncGroup.js index 37720481d2..5e54d54cc6 100644 --- a/lib/services/storagesyncManagement/lib/models/syncGroup.js +++ b/lib/services/storagesyncManagement/lib/models/syncGroup.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Sync Group object. * - * @extends models['BaseResource'] + * @extends models['Resource'] */ -class SyncGroup extends models['BaseResource'] { +class SyncGroup extends models['Resource'] { /** * Create a SyncGroup. * @member {string} [uniqueId] Unique Id @@ -41,6 +41,30 @@ class SyncGroup extends models['BaseResource'] { name: 'Composite', className: 'SyncGroup', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, uniqueId: { required: false, serializedName: 'properties.uniqueId', diff --git a/lib/services/storagesyncManagement/lib/models/workflow.js b/lib/services/storagesyncManagement/lib/models/workflow.js index 5e92ffff83..750baff9bd 100644 --- a/lib/services/storagesyncManagement/lib/models/workflow.js +++ b/lib/services/storagesyncManagement/lib/models/workflow.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Workflow resource. * - * @extends models['BaseResource'] + * @extends models['Resource'] */ -class Workflow extends models['BaseResource'] { +class Workflow extends models['Resource'] { /** * Create a Workflow. * @member {string} [lastStepName] last step name @@ -46,6 +46,30 @@ class Workflow extends models['BaseResource'] { name: 'Composite', className: 'Workflow', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, lastStepName: { required: false, serializedName: 'properties.lastStepName', diff --git a/lib/services/storagesyncManagement/lib/models/workflowArray.js b/lib/services/storagesyncManagement/lib/models/workflowArray.js index c2c3eb737f..698149ba59 100644 --- a/lib/services/storagesyncManagement/lib/models/workflowArray.js +++ b/lib/services/storagesyncManagement/lib/models/workflowArray.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Array of Workflow * diff --git a/lib/services/storagesyncManagement/lib/operations/index.d.ts b/lib/services/storagesyncManagement/lib/operations/index.d.ts index bb991ff5dd..46fc980dd1 100644 --- a/lib/services/storagesyncManagement/lib/operations/index.d.ts +++ b/lib/services/storagesyncManagement/lib/operations/index.d.ts @@ -217,6 +217,11 @@ export interface StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} parameters.location The geo-location where the resource + * lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -241,6 +246,11 @@ export interface StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} parameters.location The geo-location where the resource + * lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js b/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js index 6f51c99b9f..8fdaed8c3c 100644 --- a/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js +++ b/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js @@ -203,6 +203,11 @@ function _checkNameAvailability(locationName, parameters, options, callback) { * * @param {object} parameters Storage Sync Service resource name. * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} parameters.location The geo-location where the resource + * lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1348,6 +1353,11 @@ class StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} parameters.location The geo-location where the resource + * lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1384,6 +1394,11 @@ class StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} parameters.location The geo-location where the resource + * lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/storagesyncManagement/package.json b/lib/services/storagesyncManagement/package.json index 44a2f6e6aa..170b8f4ec2 100644 --- a/lib/services/storagesyncManagement/package.json +++ b/lib/services/storagesyncManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-storagesync", "author": "Microsoft Corporation", "description": "StorageSyncManagementClient Library with typescript type definitions for node", - "version": "2.0.0", + "version": "1.0.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/storageSyncManagementClient.js", "types": "./lib/storageSyncManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/storagesyncManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git"