From 42a03a3231d4ea0b17d0381987d9148b9dc678fc Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 15 May 2018 21:39:37 +0000 Subject: [PATCH 01/10] Generated from b48862551b5e97eb40acb3da63e55522a9db566c Added the swagger file for the new service Gallery. --- .../lib/computeManagementClient.d.ts | 3 + .../lib/computeManagementClient.js | 3 + .../lib/models/disallowed.js | 59 + .../computeManagement2/lib/models/gallery.js | 121 ++ .../galleryArtifactPublishingProfileBase.js | 73 + .../lib/models/galleryArtifactSource.js | 56 + .../lib/models/galleryDataDiskImage.js | 73 + .../lib/models/galleryDiskImage.js | 63 + .../lib/models/galleryIdentifier.js | 52 + .../lib/models/galleryImage.js | 220 +++ .../lib/models/galleryImageIdentifier.js | 68 + .../lib/models/galleryImageList.js | 72 + .../lib/models/galleryImageVersion.js | 99 + .../lib/models/galleryImageVersionList.js | 72 + .../galleryImageVersionPublishingProfile.js | 99 + .../galleryImageVersionStorageProfile.js | 71 + .../lib/models/galleryList.js | 71 + .../lib/models/galleryOSDiskImage.js | 63 + .../lib/models/imagePurchasePlan.js | 69 + .../computeManagement2/lib/models/index.d.ts | 434 ++++- .../computeManagement2/lib/models/index.js | 24 +- .../lib/models/managedArtifact.js | 52 + .../models/recommendedMachineConfiguration.js | 68 + .../lib/models/regionalReplicationStatus.js | 79 + .../lib/models/replicationStatus.js | 74 + .../lib/models/resourceRange.js | 60 + .../lib/operations/galleryImageOperations.js | 1680 +++++++++++++++++ .../galleryImageVersionOperations.js | 1511 +++++++++++++++ .../lib/operations/galleryOperations.js | 1550 +++++++++++++++ .../lib/operations/index.d.ts | 1611 ++++++++++++++++ .../lib/operations/index.js | 3 + 31 files changed, 8532 insertions(+), 21 deletions(-) create mode 100644 lib/services/computeManagement2/lib/models/disallowed.js create mode 100644 lib/services/computeManagement2/lib/models/gallery.js create mode 100644 lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js create mode 100644 lib/services/computeManagement2/lib/models/galleryArtifactSource.js create mode 100644 lib/services/computeManagement2/lib/models/galleryDataDiskImage.js create mode 100644 lib/services/computeManagement2/lib/models/galleryDiskImage.js create mode 100644 lib/services/computeManagement2/lib/models/galleryIdentifier.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImage.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageIdentifier.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageList.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageVersion.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageVersionList.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js create mode 100644 lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js create mode 100644 lib/services/computeManagement2/lib/models/galleryList.js create mode 100644 lib/services/computeManagement2/lib/models/galleryOSDiskImage.js create mode 100644 lib/services/computeManagement2/lib/models/imagePurchasePlan.js create mode 100644 lib/services/computeManagement2/lib/models/managedArtifact.js create mode 100644 lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js create mode 100644 lib/services/computeManagement2/lib/models/regionalReplicationStatus.js create mode 100644 lib/services/computeManagement2/lib/models/replicationStatus.js create mode 100644 lib/services/computeManagement2/lib/models/resourceRange.js create mode 100644 lib/services/computeManagement2/lib/operations/galleryImageOperations.js create mode 100644 lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js create mode 100644 lib/services/computeManagement2/lib/operations/galleryOperations.js diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index 4894e75f99..791c62c9a2 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -54,6 +54,9 @@ export default class ComputeManagementClient extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups + galleryOperations: operations.GalleryOperations; + galleryImageOperations: operations.GalleryImageOperations; + galleryImageVersionOperations: operations.GalleryImageVersionOperations; operations: operations.Operations; availabilitySets: operations.AvailabilitySets; virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index 15a0e2a7d3..d1958c6ffc 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -71,6 +71,9 @@ class ComputeManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } + this.galleryOperations = new operations.GalleryOperations(this); + this.galleryImageOperations = new operations.GalleryImageOperations(this); + this.galleryImageVersionOperations = new operations.GalleryImageVersionOperations(this); this.operations = new operations.Operations(this); this.availabilitySets = new operations.AvailabilitySets(this); this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); diff --git a/lib/services/computeManagement2/lib/models/disallowed.js b/lib/services/computeManagement2/lib/models/disallowed.js new file mode 100644 index 0000000000..9376c28ab0 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/disallowed.js @@ -0,0 +1,59 @@ +/* + * 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'; + +/** + * Describes the disallowed disk types. + * + */ +class Disallowed { + /** + * Create a Disallowed. + * @member {array} [diskTypes] A list of disk types. + */ + constructor() { + } + + /** + * Defines the metadata of Disallowed + * + * @returns {object} metadata of Disallowed + * + */ + mapper() { + return { + required: false, + serializedName: 'Disallowed', + type: { + name: 'Composite', + className: 'Disallowed', + modelProperties: { + diskTypes: { + required: false, + serializedName: 'diskTypes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = Disallowed; diff --git a/lib/services/computeManagement2/lib/models/gallery.js b/lib/services/computeManagement2/lib/models/gallery.js new file mode 100644 index 0000000000..a0624ba612 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/gallery.js @@ -0,0 +1,121 @@ +/* + * 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'); + +/** + * Specifies information about the gallery that you want to create or update. + * + * @extends models['Resource'] + */ +class Gallery extends models['Resource'] { + /** + * Create a Gallery. + * @member {string} [description] The description of this gallery resource. + * @member {object} [identifier] + * @member {string} [identifier.uniqueName] The unique name of the gallery + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Gallery + * + * @returns {object} metadata of Gallery + * + */ + mapper() { + return { + required: false, + serializedName: 'Gallery', + type: { + name: 'Composite', + className: 'Gallery', + 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' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + identifier: { + required: false, + serializedName: 'properties.identifier', + type: { + name: 'Composite', + className: 'GalleryIdentifier' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Gallery; diff --git a/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js b/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js new file mode 100644 index 0000000000..c1b20e9698 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.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'); + +/** + * Describes the basic gallery artifact publishing profile. + * + */ +class GalleryArtifactPublishingProfileBase { + /** + * Create a GalleryArtifactPublishingProfileBase. + * @member {array} [regions] The regions where the artifact is going to be + * published. + * @member {object} [source] + * @member {object} [source.managedImage] + * @member {string} [source.managedImage.id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryArtifactPublishingProfileBase + * + * @returns {object} metadata of GalleryArtifactPublishingProfileBase + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryArtifactPublishingProfileBase', + type: { + name: 'Composite', + className: 'GalleryArtifactPublishingProfileBase', + modelProperties: { + regions: { + required: false, + serializedName: 'regions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: false, + serializedName: 'source', + type: { + name: 'Composite', + className: 'GalleryArtifactSource' + } + } + } + } + }; + } +} + +module.exports = GalleryArtifactPublishingProfileBase; diff --git a/lib/services/computeManagement2/lib/models/galleryArtifactSource.js b/lib/services/computeManagement2/lib/models/galleryArtifactSource.js new file mode 100644 index 0000000000..3a7a7e3c1a --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryArtifactSource.js @@ -0,0 +1,56 @@ +/* + * 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 source of the gallery artifact. + * + */ +class GalleryArtifactSource { + /** + * Create a GalleryArtifactSource. + * @member {object} [managedImage] + * @member {string} [managedImage.id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryArtifactSource + * + * @returns {object} metadata of GalleryArtifactSource + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryArtifactSource', + type: { + name: 'Composite', + className: 'GalleryArtifactSource', + modelProperties: { + managedImage: { + required: false, + serializedName: 'managedImage', + type: { + name: 'Composite', + className: 'ManagedArtifact' + } + } + } + } + }; + } +} + +module.exports = GalleryArtifactSource; diff --git a/lib/services/computeManagement2/lib/models/galleryDataDiskImage.js b/lib/services/computeManagement2/lib/models/galleryDataDiskImage.js new file mode 100644 index 0000000000..64f6b11538 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryDataDiskImage.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'); + +/** + * This is the data disk image. + * + * @extends models['GalleryDiskImage'] + */ +class GalleryDataDiskImage extends models['GalleryDiskImage'] { + /** + * Create a GalleryDataDiskImage. + * @member {number} [lun] Specifies the logical unit number of the data disk. + * This value is used to identify data disks within the VM and therefore must + * be unique for each data disk attached to a VM. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryDataDiskImage + * + * @returns {object} metadata of GalleryDataDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryDataDiskImage', + type: { + name: 'Composite', + className: 'GalleryDataDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + }, + lun: { + required: false, + serializedName: 'lun', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = GalleryDataDiskImage; diff --git a/lib/services/computeManagement2/lib/models/galleryDiskImage.js b/lib/services/computeManagement2/lib/models/galleryDiskImage.js new file mode 100644 index 0000000000..cec9fba41c --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryDiskImage.js @@ -0,0 +1,63 @@ +/* + * 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'; + +/** + * This is the disk image base class. + * + */ +class GalleryDiskImage { + /** + * Create a GalleryDiskImage. + * @member {number} [sizedInGB] It indicates the size of the VHD to create. + * @member {string} [hostCaching] The host caching of the disk. Valid values + * are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + */ + constructor() { + } + + /** + * Defines the metadata of GalleryDiskImage + * + * @returns {object} metadata of GalleryDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryDiskImage', + type: { + name: 'Composite', + className: 'GalleryDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + } + } + } + }; + } +} + +module.exports = GalleryDiskImage; diff --git a/lib/services/computeManagement2/lib/models/galleryIdentifier.js b/lib/services/computeManagement2/lib/models/galleryIdentifier.js new file mode 100644 index 0000000000..e46d6d12e0 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryIdentifier.js @@ -0,0 +1,52 @@ +/* + * 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'; + +/** + * Class representing a GalleryIdentifier. + */ +class GalleryIdentifier { + /** + * Create a GalleryIdentifier. + * @member {string} [uniqueName] The unique name of the gallery + */ + constructor() { + } + + /** + * Defines the metadata of GalleryIdentifier + * + * @returns {object} metadata of GalleryIdentifier + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryIdentifier', + type: { + name: 'Composite', + className: 'GalleryIdentifier', + modelProperties: { + uniqueName: { + required: false, + readOnly: true, + serializedName: 'uniqueName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryIdentifier; diff --git a/lib/services/computeManagement2/lib/models/galleryImage.js b/lib/services/computeManagement2/lib/models/galleryImage.js new file mode 100644 index 0000000000..8fb8acb0d9 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImage.js @@ -0,0 +1,220 @@ +/* + * 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'); + +/** + * Specifies information about the gallery image that you want to create or + * update. + * + * @extends models['Resource'] + */ +class GalleryImage extends models['Resource'] { + /** + * Create a GalleryImage. + * @member {string} [description] The description of this gallery image + * resource. + * @member {string} [eula] The Eula agreement for the gallery image. + * @member {string} [privacyStatementUri] The privacy statement uri. + * @member {string} [releaseNoteUri] The release note uri. + * @member {string} [osType] This property allows you to specify the type of + * the OS that is included in the disk if creating a VM from user-image or a + * specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * @member {string} [osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * @member {date} [endOfLifeDate] The end of life of this gallery image. + * @member {object} [identifier] + * @member {string} [identifier.publisher] The gallery image publisher name. + * @member {string} [identifier.offer] The gallery image offer name. + * @member {string} [identifier.sku] The gallery image sku name. + * @member {object} [recommended] + * @member {object} [recommended.vCPUs] + * @member {number} [recommended.vCPUs.min] The minimum number of the + * resource. + * @member {number} [recommended.vCPUs.max] The maximum number of the + * resource. + * @member {object} [recommended.memory] + * @member {number} [recommended.memory.min] The minimum number of the + * resource. + * @member {number} [recommended.memory.max] The maximum number of the + * resource. + * @member {object} [disallowed] + * @member {array} [disallowed.diskTypes] A list of disk types. + * @member {object} [purchasePlan] + * @member {string} [purchasePlan.name] The plan ID. + * @member {string} [purchasePlan.publisher] The publisher ID. + * @member {string} [purchasePlan.product] The product ID. + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImage + * + * @returns {object} metadata of GalleryImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImage', + type: { + name: 'Composite', + className: 'GalleryImage', + 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' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + eula: { + required: false, + serializedName: 'properties.eula', + type: { + name: 'String' + } + }, + privacyStatementUri: { + required: false, + serializedName: 'properties.privacyStatementUri', + type: { + name: 'String' + } + }, + releaseNoteUri: { + required: false, + serializedName: 'properties.releaseNoteUri', + type: { + name: 'String' + } + }, + osType: { + required: false, + serializedName: 'properties.osType', + type: { + name: 'Enum', + allowedValues: [ 'Windows', 'Linux' ] + } + }, + osState: { + required: false, + serializedName: 'properties.osState', + type: { + name: 'Enum', + allowedValues: [ 'Generalized', 'Specialized' ] + } + }, + endOfLifeDate: { + required: false, + serializedName: 'properties.endOfLifeDate', + type: { + name: 'Date' + } + }, + identifier: { + required: false, + serializedName: 'properties.identifier', + type: { + name: 'Composite', + className: 'GalleryImageIdentifier' + } + }, + recommended: { + required: false, + serializedName: 'properties.recommended', + type: { + name: 'Composite', + className: 'RecommendedMachineConfiguration' + } + }, + disallowed: { + required: false, + serializedName: 'properties.disallowed', + type: { + name: 'Composite', + className: 'Disallowed' + } + }, + purchasePlan: { + required: false, + serializedName: 'properties.purchasePlan', + type: { + name: 'Composite', + className: 'ImagePurchasePlan' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImage; diff --git a/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js b/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js new file mode 100644 index 0000000000..6828d2276d --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js @@ -0,0 +1,68 @@ +/* + * 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'; + +/** + * This is the gallery image identifier. + * + */ +class GalleryImageIdentifier { + /** + * Create a GalleryImageIdentifier. + * @member {string} [publisher] The gallery image publisher name. + * @member {string} [offer] The gallery image offer name. + * @member {string} [sku] The gallery image sku name. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageIdentifier + * + * @returns {object} metadata of GalleryImageIdentifier + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageIdentifier', + type: { + name: 'Composite', + className: 'GalleryImageIdentifier', + modelProperties: { + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + offer: { + required: false, + serializedName: 'offer', + type: { + name: 'String' + } + }, + sku: { + required: false, + serializedName: 'sku', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageIdentifier; diff --git a/lib/services/computeManagement2/lib/models/galleryImageList.js b/lib/services/computeManagement2/lib/models/galleryImageList.js new file mode 100644 index 0000000000..9497404b90 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageList.js @@ -0,0 +1,72 @@ +/* + * 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 List Gallery Images operation response. + * + */ +class GalleryImageList { + /** + * Create a GalleryImageList. + * @member {array} value A list of gallery images. + * @member {string} [nextLink] The uri to fetch the next page of gallery + * images. Call ListNext() with this to fetch the next page of gallery + * images. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageList + * + * @returns {object} metadata of GalleryImageList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageList', + type: { + name: 'Composite', + className: 'GalleryImageList', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryImageElementType', + type: { + name: 'Composite', + className: 'GalleryImage' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageList; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersion.js b/lib/services/computeManagement2/lib/models/galleryImageVersion.js new file mode 100644 index 0000000000..bd4ebd5c42 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersion.js @@ -0,0 +1,99 @@ +/* + * 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'); + +/** + * Specifies information about the gallery image version that you want to + * create or update. + * + */ +class GalleryImageVersion { + /** + * Create a GalleryImageVersion. + * @member {object} [publishingProfile] + * @member {boolean} [publishingProfile.excludeFromLatest] The flag means + * that if it is set to true, people deploying VMs with 'latest' as version + * will not use this version. + * @member {date} [publishingProfile.publishedDate] The time when the gallery + * image version is published. + * @member {date} [publishingProfile.endOfLifeDate] The end of life date of + * the gallery image version. + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + * @member {object} [storageProfile] + * @member {object} [storageProfile.osDiskImage] + * @member {array} [storageProfile.dataDiskImages] A list of data disk + * images. + * @member {object} [replicationStatus] + * @member {string} [replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [replicationStatus.summary] This is a summary of + * replication status for each region. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageVersion + * + * @returns {object} metadata of GalleryImageVersion + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersion', + type: { + name: 'Composite', + className: 'GalleryImageVersion', + modelProperties: { + publishingProfile: { + required: false, + serializedName: 'properties.publishingProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionPublishingProfile' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + storageProfile: { + required: false, + serializedName: 'properties.storageProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionStorageProfile' + } + }, + replicationStatus: { + required: false, + serializedName: 'properties.replicationStatus', + type: { + name: 'Composite', + className: 'ReplicationStatus' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersion; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionList.js b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js new file mode 100644 index 0000000000..9bc452fd73 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js @@ -0,0 +1,72 @@ +/* + * 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 List Gallery Image version operation response. + * + */ +class GalleryImageVersionList { + /** + * Create a GalleryImageVersionList. + * @member {array} value A list of gallery image versions. + * @member {string} [nextLink] The uri to fetch the next page of gallery + * image versions. Call ListNext() with this to fetch the next page of + * gallery image versions. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageVersionList + * + * @returns {object} metadata of GalleryImageVersionList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionList', + type: { + name: 'Composite', + className: 'GalleryImageVersionList', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryImageVersionElementType', + type: { + name: 'Composite', + className: 'GalleryImageVersion' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionList; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js b/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js new file mode 100644 index 0000000000..8e4803afdc --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js @@ -0,0 +1,99 @@ +/* + * 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 publishing profile of a gallery image version. + * + * @extends models['GalleryArtifactPublishingProfileBase'] + */ +class GalleryImageVersionPublishingProfile extends models['GalleryArtifactPublishingProfileBase'] { + /** + * Create a GalleryImageVersionPublishingProfile. + * @member {boolean} [excludeFromLatest] The flag means that if it is set to + * true, people deploying VMs with 'latest' as version will not use this + * version. + * @member {date} [publishedDate] The time when the gallery image version is + * published. + * @member {date} [endOfLifeDate] The end of life date of the gallery image + * version. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageVersionPublishingProfile + * + * @returns {object} metadata of GalleryImageVersionPublishingProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionPublishingProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionPublishingProfile', + modelProperties: { + regions: { + required: false, + serializedName: 'regions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: false, + serializedName: 'source', + type: { + name: 'Composite', + className: 'GalleryArtifactSource' + } + }, + excludeFromLatest: { + required: false, + serializedName: 'excludeFromLatest', + type: { + name: 'Boolean' + } + }, + publishedDate: { + required: false, + readOnly: true, + serializedName: 'publishedDate', + type: { + name: 'Date' + } + }, + endOfLifeDate: { + required: false, + serializedName: 'endOfLifeDate', + type: { + name: 'Date' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionPublishingProfile; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js b/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js new file mode 100644 index 0000000000..b7b2b486f7 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js @@ -0,0 +1,71 @@ +/* + * 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'); + +/** + * This is the storage profile of a gallery image version. + * + */ +class GalleryImageVersionStorageProfile { + /** + * Create a GalleryImageVersionStorageProfile. + * @member {object} [osDiskImage] + * @member {array} [dataDiskImages] A list of data disk images. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageVersionStorageProfile + * + * @returns {object} metadata of GalleryImageVersionStorageProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionStorageProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionStorageProfile', + modelProperties: { + osDiskImage: { + required: false, + serializedName: 'osDiskImage', + type: { + name: 'Composite', + className: 'GalleryOSDiskImage' + } + }, + dataDiskImages: { + required: false, + serializedName: 'dataDiskImages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryDataDiskImageElementType', + type: { + name: 'Composite', + className: 'GalleryDataDiskImage' + } + } + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionStorageProfile; diff --git a/lib/services/computeManagement2/lib/models/galleryList.js b/lib/services/computeManagement2/lib/models/galleryList.js new file mode 100644 index 0000000000..2411bace17 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryList.js @@ -0,0 +1,71 @@ +/* + * 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 List Galleries operation response. + * + */ +class GalleryList { + /** + * Create a GalleryList. + * @member {array} value A list of galleries. + * @member {string} [nextLink] The uri to fetch the next page of galleries. + * Call ListNext() with this to fetch the next page of galleries. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryList + * + * @returns {object} metadata of GalleryList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryList', + type: { + name: 'Composite', + className: 'GalleryList', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryElementType', + type: { + name: 'Composite', + className: 'Gallery' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryList; diff --git a/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js b/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js new file mode 100644 index 0000000000..a5a0915cc6 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js @@ -0,0 +1,63 @@ +/* + * 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'); + +/** + * This is the OS disk image. + * + * @extends models['GalleryDiskImage'] + */ +class GalleryOSDiskImage extends models['GalleryDiskImage'] { + /** + * Create a GalleryOSDiskImage. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryOSDiskImage + * + * @returns {object} metadata of GalleryOSDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryOSDiskImage', + type: { + name: 'Composite', + className: 'GalleryOSDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + } + } + } + }; + } +} + +module.exports = GalleryOSDiskImage; diff --git a/lib/services/computeManagement2/lib/models/imagePurchasePlan.js b/lib/services/computeManagement2/lib/models/imagePurchasePlan.js new file mode 100644 index 0000000000..4725879e5a --- /dev/null +++ b/lib/services/computeManagement2/lib/models/imagePurchasePlan.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * Describes the gallery image purchase plan. This is used by marketplace + * images. + * + */ +class ImagePurchasePlan { + /** + * Create a ImagePurchasePlan. + * @member {string} [name] The plan ID. + * @member {string} [publisher] The publisher ID. + * @member {string} [product] The product ID. + */ + constructor() { + } + + /** + * Defines the metadata of ImagePurchasePlan + * + * @returns {object} metadata of ImagePurchasePlan + * + */ + mapper() { + return { + required: false, + serializedName: 'ImagePurchasePlan', + type: { + name: 'Composite', + className: 'ImagePurchasePlan', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + product: { + required: false, + serializedName: 'product', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ImagePurchasePlan; diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index 948ab3d639..05473a22a1 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -16,6 +16,420 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; +/** + * @class + * Initializes a new instance of the GalleryIdentifier class. + * @constructor + * @member {string} [uniqueName] The unique name of the gallery + */ +export interface GalleryIdentifier { + readonly uniqueName?: string; +} + +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * The Resource model definition. + * + * @member {string} [id] Resource Id + * @member {string} [name] Resource name + * @member {string} [type] Resource type + * @member {string} location Resource location + * @member {object} [tags] Resource tags + */ +export interface Resource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; + location: string; + tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the Gallery class. + * @constructor + * Specifies information about the gallery that you want to create or update. + * + * @member {string} [description] The description of this gallery resource. + * @member {object} [identifier] + * @member {string} [identifier.uniqueName] The unique name of the gallery + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + */ +export interface Gallery extends Resource { + description?: string; + identifier?: GalleryIdentifier; + readonly provisioningState?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageIdentifier class. + * @constructor + * This is the gallery image identifier. + * + * @member {string} [publisher] The gallery image publisher name. + * @member {string} [offer] The gallery image offer name. + * @member {string} [sku] The gallery image sku name. + */ +export interface GalleryImageIdentifier { + publisher?: string; + offer?: string; + sku?: string; +} + +/** + * @class + * Initializes a new instance of the ResourceRange class. + * @constructor + * Describes the resource range. + * + * @member {number} [min] The minimum number of the resource. + * @member {number} [max] The maximum number of the resource. + */ +export interface ResourceRange { + min?: number; + max?: number; +} + +/** + * @class + * Initializes a new instance of the RecommendedMachineConfiguration class. + * @constructor + * Describes the recommended machine configuration. + * + * @member {object} [vCPUs] + * @member {number} [vCPUs.min] The minimum number of the resource. + * @member {number} [vCPUs.max] The maximum number of the resource. + * @member {object} [memory] + * @member {number} [memory.min] The minimum number of the resource. + * @member {number} [memory.max] The maximum number of the resource. + */ +export interface RecommendedMachineConfiguration { + vCPUs?: ResourceRange; + memory?: ResourceRange; +} + +/** + * @class + * Initializes a new instance of the Disallowed class. + * @constructor + * Describes the disallowed disk types. + * + * @member {array} [diskTypes] A list of disk types. + */ +export interface Disallowed { + diskTypes?: string[]; +} + +/** + * @class + * Initializes a new instance of the ImagePurchasePlan class. + * @constructor + * Describes the gallery image purchase plan. This is used by marketplace + * images. + * + * @member {string} [name] The plan ID. + * @member {string} [publisher] The publisher ID. + * @member {string} [product] The product ID. + */ +export interface ImagePurchasePlan { + name?: string; + publisher?: string; + product?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImage class. + * @constructor + * Specifies information about the gallery image that you want to create or + * update. + * + * @member {string} [description] The description of this gallery image + * resource. + * @member {string} [eula] The Eula agreement for the gallery image. + * @member {string} [privacyStatementUri] The privacy statement uri. + * @member {string} [releaseNoteUri] The release note uri. + * @member {string} [osType] This property allows you to specify the type of + * the OS that is included in the disk if creating a VM from user-image or a + * specialized VHD.

Possible values are:

**Windows**

+ * **Linux**. Possible values include: 'Windows', 'Linux' + * @member {string} [osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * @member {date} [endOfLifeDate] The end of life of this gallery image. + * @member {object} [identifier] + * @member {string} [identifier.publisher] The gallery image publisher name. + * @member {string} [identifier.offer] The gallery image offer name. + * @member {string} [identifier.sku] The gallery image sku name. + * @member {object} [recommended] + * @member {object} [recommended.vCPUs] + * @member {number} [recommended.vCPUs.min] The minimum number of the resource. + * @member {number} [recommended.vCPUs.max] The maximum number of the resource. + * @member {object} [recommended.memory] + * @member {number} [recommended.memory.min] The minimum number of the + * resource. + * @member {number} [recommended.memory.max] The maximum number of the + * resource. + * @member {object} [disallowed] + * @member {array} [disallowed.diskTypes] A list of disk types. + * @member {object} [purchasePlan] + * @member {string} [purchasePlan.name] The plan ID. + * @member {string} [purchasePlan.publisher] The publisher ID. + * @member {string} [purchasePlan.product] The product ID. + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + */ +export interface GalleryImage extends Resource { + description?: string; + eula?: string; + privacyStatementUri?: string; + releaseNoteUri?: string; + osType?: string; + osState?: string; + endOfLifeDate?: Date; + identifier?: GalleryImageIdentifier; + recommended?: RecommendedMachineConfiguration; + disallowed?: Disallowed; + purchasePlan?: ImagePurchasePlan; + readonly provisioningState?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryArtifactPublishingProfileBase class. + * @constructor + * Describes the basic gallery artifact publishing profile. + * + * @member {array} [regions] The regions where the artifact is going to be + * published. + * @member {object} [source] + * @member {object} [source.managedImage] + * @member {string} [source.managedImage.id] The managed artifact id. + */ +export interface GalleryArtifactPublishingProfileBase { + regions?: string[]; + source?: GalleryArtifactSource; +} + +/** + * @class + * Initializes a new instance of the GalleryImageVersionPublishingProfile class. + * @constructor + * The publishing profile of a gallery image version. + * + * @member {boolean} [excludeFromLatest] The flag means that if it is set to + * true, people deploying VMs with 'latest' as version will not use this + * version. + * @member {date} [publishedDate] The time when the gallery image version is + * published. + * @member {date} [endOfLifeDate] The end of life date of the gallery image + * version. + */ +export interface GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase { + excludeFromLatest?: boolean; + readonly publishedDate?: Date; + endOfLifeDate?: Date; +} + +/** + * @class + * Initializes a new instance of the GalleryDiskImage class. + * @constructor + * This is the disk image base class. + * + * @member {number} [sizedInGB] It indicates the size of the VHD to create. + * @member {string} [hostCaching] The host caching of the disk. Valid values + * are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + */ +export interface GalleryDiskImage { + sizedInGB?: number; + hostCaching?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryOSDiskImage class. + * @constructor + * This is the OS disk image. + * + */ +export interface GalleryOSDiskImage extends GalleryDiskImage { +} + +/** + * @class + * Initializes a new instance of the GalleryDataDiskImage class. + * @constructor + * This is the data disk image. + * + * @member {number} [lun] Specifies the logical unit number of the data disk. + * This value is used to identify data disks within the VM and therefore must + * be unique for each data disk attached to a VM. + */ +export interface GalleryDataDiskImage extends GalleryDiskImage { + lun?: number; +} + +/** + * @class + * Initializes a new instance of the GalleryImageVersionStorageProfile class. + * @constructor + * This is the storage profile of a gallery image version. + * + * @member {object} [osDiskImage] + * @member {array} [dataDiskImages] A list of data disk images. + */ +export interface GalleryImageVersionStorageProfile { + osDiskImage?: GalleryOSDiskImage; + dataDiskImages?: GalleryDataDiskImage[]; +} + +/** + * @class + * Initializes a new instance of the RegionalReplicationStatus class. + * @constructor + * This is the regional replication status. + * + * @member {string} [region] The region where the gallery image version is + * published to. + * @member {string} [state] This is the regional replication state. Possible + * values include: 'Unknown', 'Replicating', 'Completed', 'Failed' + * @member {string} [details] The details of the replication status. + * @member {number} [progress] It indicates progress of the replication job. + */ +export interface RegionalReplicationStatus { + region?: string; + state?: string; + details?: string; + progress?: number; +} + +/** + * @class + * Initializes a new instance of the ReplicationStatus class. + * @constructor + * This is the replication status of the gallery image version. + * + * @member {string} [aggregatedState] This is the aggregated replication status + * based on the regional replication status. Possible values include: + * 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [summary] This is a summary of replication status for each + * region. + */ +export interface ReplicationStatus { + aggregatedState?: string; + summary?: RegionalReplicationStatus[]; +} + +/** + * @class + * Initializes a new instance of the GalleryImageVersion class. + * @constructor + * Specifies information about the gallery image version that you want to + * create or update. + * + * @member {object} [publishingProfile] + * @member {boolean} [publishingProfile.excludeFromLatest] The flag means that + * if it is set to true, people deploying VMs with 'latest' as version will not + * use this version. + * @member {date} [publishingProfile.publishedDate] The time when the gallery + * image version is published. + * @member {date} [publishingProfile.endOfLifeDate] The end of life date of the + * gallery image version. + * @member {string} [provisioningState] The provisioning state, which only + * appears in the response. + * @member {object} [storageProfile] + * @member {object} [storageProfile.osDiskImage] + * @member {array} [storageProfile.dataDiskImages] A list of data disk images. + * @member {object} [replicationStatus] + * @member {string} [replicationStatus.aggregatedState] This is the aggregated + * replication status based on the regional replication status. Possible values + * include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [replicationStatus.summary] This is a summary of replication + * status for each region. + */ +export interface GalleryImageVersion { + publishingProfile?: GalleryImageVersionPublishingProfile; + readonly provisioningState?: string; + storageProfile?: GalleryImageVersionStorageProfile; + replicationStatus?: ReplicationStatus; +} + +/** + * @class + * Initializes a new instance of the ManagedArtifact class. + * @constructor + * The managed artifact. + * + * @member {string} [id] The managed artifact id. + */ +export interface ManagedArtifact { + id?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryArtifactSource class. + * @constructor + * The source of the gallery artifact. + * + * @member {object} [managedImage] + * @member {string} [managedImage.id] The managed artifact id. + */ +export interface GalleryArtifactSource { + managedImage?: ManagedArtifact; +} + +/** + * @class + * Initializes a new instance of the GalleryList class. + * @constructor + * The List Galleries operation response. + * + * @member {array} value A list of galleries. + * @member {string} [nextLink] The uri to fetch the next page of galleries. + * Call ListNext() with this to fetch the next page of galleries. + */ +export interface GalleryList { + value: Gallery[]; + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageList class. + * @constructor + * The List Gallery Images operation response. + * + * @member {array} value A list of gallery images. + * @member {string} [nextLink] The uri to fetch the next page of gallery + * images. Call ListNext() with this to fetch the next page of gallery images. + */ +export interface GalleryImageList { + value: GalleryImage[]; + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageVersionList class. + * @constructor + * The List Gallery Image version operation response. + * + * @member {array} value A list of gallery image versions. + * @member {string} [nextLink] The uri to fetch the next page of gallery image + * versions. Call ListNext() with this to fetch the next page of gallery image + * versions. + */ +export interface GalleryImageVersionList { + value: GalleryImageVersion[]; + nextLink?: string; +} + /** * @class * Initializes a new instance of the ComputeOperationValue class. @@ -90,26 +504,6 @@ export interface Sku { capacity?: number; } -/** - * @class - * Initializes a new instance of the Resource class. - * @constructor - * The Resource model definition. - * - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type - * @member {string} location Resource location - * @member {object} [tags] Resource tags - */ -export interface Resource extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; - location: string; - tags?: { [propertyName: string]: string }; -} - /** * @class * Initializes a new instance of the AvailabilitySet class. diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index bf67f6aaed..3c2edf81b6 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -18,11 +18,33 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.GalleryIdentifier = require('./galleryIdentifier'); +exports.Resource = require('./resource'); +exports.Gallery = require('./gallery'); +exports.GalleryImageIdentifier = require('./galleryImageIdentifier'); +exports.ResourceRange = require('./resourceRange'); +exports.RecommendedMachineConfiguration = require('./recommendedMachineConfiguration'); +exports.Disallowed = require('./disallowed'); +exports.ImagePurchasePlan = require('./imagePurchasePlan'); +exports.GalleryImage = require('./galleryImage'); +exports.GalleryArtifactPublishingProfileBase = require('./galleryArtifactPublishingProfileBase'); +exports.GalleryImageVersionPublishingProfile = require('./galleryImageVersionPublishingProfile'); +exports.GalleryDiskImage = require('./galleryDiskImage'); +exports.GalleryOSDiskImage = require('./galleryOSDiskImage'); +exports.GalleryDataDiskImage = require('./galleryDataDiskImage'); +exports.GalleryImageVersionStorageProfile = require('./galleryImageVersionStorageProfile'); +exports.RegionalReplicationStatus = require('./regionalReplicationStatus'); +exports.ReplicationStatus = require('./replicationStatus'); +exports.GalleryImageVersion = require('./galleryImageVersion'); +exports.ManagedArtifact = require('./managedArtifact'); +exports.GalleryArtifactSource = require('./galleryArtifactSource'); +exports.GalleryList = require('./galleryList'); +exports.GalleryImageList = require('./galleryImageList'); +exports.GalleryImageVersionList = require('./galleryImageVersionList'); exports.ComputeOperationValue = require('./computeOperationValue'); exports.InstanceViewStatus = require('./instanceViewStatus'); exports.SubResource = require('./subResource'); exports.Sku = require('./sku'); -exports.Resource = require('./resource'); exports.AvailabilitySet = require('./availabilitySet'); exports.UpdateResource = require('./updateResource'); exports.AvailabilitySetUpdate = require('./availabilitySetUpdate'); diff --git a/lib/services/computeManagement2/lib/models/managedArtifact.js b/lib/services/computeManagement2/lib/models/managedArtifact.js new file mode 100644 index 0000000000..cadb714ab4 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/managedArtifact.js @@ -0,0 +1,52 @@ +/* + * 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'; + +/** + * The managed artifact. + * + */ +class ManagedArtifact { + /** + * Create a ManagedArtifact. + * @member {string} [id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of ManagedArtifact + * + * @returns {object} metadata of ManagedArtifact + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedArtifact', + type: { + name: 'Composite', + className: 'ManagedArtifact', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ManagedArtifact; diff --git a/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js b/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js new file mode 100644 index 0000000000..a3070932a6 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js @@ -0,0 +1,68 @@ +/* + * 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'); + +/** + * Describes the recommended machine configuration. + * + */ +class RecommendedMachineConfiguration { + /** + * Create a RecommendedMachineConfiguration. + * @member {object} [vCPUs] + * @member {number} [vCPUs.min] The minimum number of the resource. + * @member {number} [vCPUs.max] The maximum number of the resource. + * @member {object} [memory] + * @member {number} [memory.min] The minimum number of the resource. + * @member {number} [memory.max] The maximum number of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of RecommendedMachineConfiguration + * + * @returns {object} metadata of RecommendedMachineConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'RecommendedMachineConfiguration', + type: { + name: 'Composite', + className: 'RecommendedMachineConfiguration', + modelProperties: { + vCPUs: { + required: false, + serializedName: 'vCPUs', + type: { + name: 'Composite', + className: 'ResourceRange' + } + }, + memory: { + required: false, + serializedName: 'memory', + type: { + name: 'Composite', + className: 'ResourceRange' + } + } + } + } + }; + } +} + +module.exports = RecommendedMachineConfiguration; diff --git a/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js b/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js new file mode 100644 index 0000000000..61db9eb55d --- /dev/null +++ b/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js @@ -0,0 +1,79 @@ +/* + * 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'; + +/** + * This is the regional replication status. + * + */ +class RegionalReplicationStatus { + /** + * Create a RegionalReplicationStatus. + * @member {string} [region] The region where the gallery image version is + * published to. + * @member {string} [state] This is the regional replication state. Possible + * values include: 'Unknown', 'Replicating', 'Completed', 'Failed' + * @member {string} [details] The details of the replication status. + * @member {number} [progress] It indicates progress of the replication job. + */ + constructor() { + } + + /** + * Defines the metadata of RegionalReplicationStatus + * + * @returns {object} metadata of RegionalReplicationStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'RegionalReplicationStatus', + type: { + name: 'Composite', + className: 'RegionalReplicationStatus', + modelProperties: { + region: { + required: false, + serializedName: 'region', + type: { + name: 'String' + } + }, + state: { + required: false, + serializedName: 'state', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'Replicating', 'Completed', 'Failed' ] + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'String' + } + }, + progress: { + required: false, + serializedName: 'progress', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = RegionalReplicationStatus; diff --git a/lib/services/computeManagement2/lib/models/replicationStatus.js b/lib/services/computeManagement2/lib/models/replicationStatus.js new file mode 100644 index 0000000000..edaa93fdf1 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/replicationStatus.js @@ -0,0 +1,74 @@ +/* + * 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'); + +/** + * This is the replication status of the gallery image version. + * + */ +class ReplicationStatus { + /** + * Create a ReplicationStatus. + * @member {string} [aggregatedState] This is the aggregated replication + * status based on the regional replication status. Possible values include: + * 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [summary] This is a summary of replication status for each + * region. + */ + constructor() { + } + + /** + * Defines the metadata of ReplicationStatus + * + * @returns {object} metadata of ReplicationStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'ReplicationStatus', + type: { + name: 'Composite', + className: 'ReplicationStatus', + modelProperties: { + aggregatedState: { + required: false, + serializedName: 'aggregatedState', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'InProgress', 'Completed', 'Failed' ] + } + }, + summary: { + required: false, + serializedName: 'summary', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RegionalReplicationStatusElementType', + type: { + name: 'Composite', + className: 'RegionalReplicationStatus' + } + } + } + } + } + } + }; + } +} + +module.exports = ReplicationStatus; diff --git a/lib/services/computeManagement2/lib/models/resourceRange.js b/lib/services/computeManagement2/lib/models/resourceRange.js new file mode 100644 index 0000000000..6c249385e7 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/resourceRange.js @@ -0,0 +1,60 @@ +/* + * 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'; + +/** + * Describes the resource range. + * + */ +class ResourceRange { + /** + * Create a ResourceRange. + * @member {number} [min] The minimum number of the resource. + * @member {number} [max] The maximum number of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceRange + * + * @returns {object} metadata of ResourceRange + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceRange', + type: { + name: 'Composite', + className: 'ResourceRange', + modelProperties: { + min: { + required: false, + serializedName: 'min', + type: { + name: 'Number' + } + }, + max: { + required: false, + serializedName: 'max', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ResourceRange; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageOperations.js b/lib/services/computeManagement2/lib/operations/galleryImageOperations.js new file mode 100644 index 0000000000..f54b4fa9a0 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageOperations.js @@ -0,0 +1,1680 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesInGallery(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImage']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageOperations. */ +class GalleryImageOperations { + /** + * Create a GalleryImageOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImagesInGallery = _listGalleryImagesInGallery; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageOperations; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js new file mode 100644 index 0000000000..558c2f87f8 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js @@ -0,0 +1,1511 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImageVersion']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageVersionOperations. */ +class GalleryImageVersionOperations { + /** + * Create a GalleryImageVersionOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImageVersionsInGalleryImage = _listGalleryImageVersionsInGalleryImage; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageVersionOperations; diff --git a/lib/services/computeManagement2/lib/operations/galleryOperations.js b/lib/services/computeManagement2/lib/operations/galleryOperations.js new file mode 100644 index 0000000000..983c8a3208 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryOperations.js @@ -0,0 +1,1550 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInSubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['Gallery']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryOperations. */ +class GalleryOperations { + /** + * Create a GalleryOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleriesInResourceGroup = _listGalleriesInResourceGroup; + this._listGalleriesInSubscription = _listGalleriesInSubscription; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInSubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInSubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInSubscription(options, optionalCallback); + } + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + +} + +module.exports = GalleryOperations; diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index 6d4d9fcd7b..e67e7f600d 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -12,6 +12,1617 @@ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationRes import * as models from '../models'; +/** + * @class + * GalleryOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface GalleryOperations { + + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Gallery} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Gallery} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleriesInResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listGalleriesInResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleriesInSubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInSubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleriesInSubscription(callback: ServiceCallback): void; + listGalleriesInSubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Gallery} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * GalleryImageOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface GalleryImageOperations { + + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImage} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImage} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImage} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * GalleryImageVersionOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface GalleryImageVersionOperations { + + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageVersionList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + /** * @class * Operations diff --git a/lib/services/computeManagement2/lib/operations/index.js b/lib/services/computeManagement2/lib/operations/index.js index c6c01da729..244c574500 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -14,6 +14,9 @@ 'use strict'; +exports.GalleryOperations = require('./galleryOperations'); +exports.GalleryImageOperations = require('./galleryImageOperations'); +exports.GalleryImageVersionOperations = require('./galleryImageVersionOperations'); exports.Operations = require('./operations'); exports.AvailabilitySets = require('./availabilitySets'); exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages'); From 5ed418781f09a63749cc1797be6c3d78d3e5b0a0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 06:15:55 +0000 Subject: [PATCH 02/10] Generated from 0ae8adebcc75669620242663ebae391ca17bd2d0 Fixed minor issues. Added an example. --- .../lib/models/galleryImageVersion.js | 49 ++++++++++++++++++- .../computeManagement2/lib/models/index.d.ts | 2 +- .../galleryImageVersionOperations.js | 24 +++++++++ .../lib/operations/index.d.ts | 16 ++++++ 4 files changed, 89 insertions(+), 2 deletions(-) diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersion.js b/lib/services/computeManagement2/lib/models/galleryImageVersion.js index bd4ebd5c42..f12b4f6149 100644 --- a/lib/services/computeManagement2/lib/models/galleryImageVersion.js +++ b/lib/services/computeManagement2/lib/models/galleryImageVersion.js @@ -16,8 +16,9 @@ const models = require('./index'); * Specifies information about the gallery image version that you want to * create or update. * + * @extends models['Resource'] */ -class GalleryImageVersion { +class GalleryImageVersion extends models['Resource'] { /** * Create a GalleryImageVersion. * @member {object} [publishingProfile] @@ -42,6 +43,7 @@ class GalleryImageVersion { * replication status for each region. */ constructor() { + super(); } /** @@ -58,6 +60,51 @@ class GalleryImageVersion { name: 'Composite', className: 'GalleryImageVersion', 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' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, publishingProfile: { required: false, serializedName: 'properties.publishingProfile', diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index 05473a22a1..b0778516b3 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -352,7 +352,7 @@ export interface ReplicationStatus { * @member {array} [replicationStatus.summary] This is a summary of replication * status for each region. */ -export interface GalleryImageVersion { +export interface GalleryImageVersion extends Resource { publishingProfile?: GalleryImageVersionPublishingProfile; readonly provisioningState?: string; storageProfile?: GalleryImageVersionStorageProfile; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js index 558c2f87f8..ff9e763145 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js @@ -72,6 +72,10 @@ const WebResource = msRest.WebResource; * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -653,6 +657,10 @@ function _listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -903,6 +911,10 @@ class GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -985,6 +997,10 @@ class GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1377,6 +1393,10 @@ class GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1459,6 +1479,10 @@ class GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index e67e7f600d..ba53017390 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -1155,6 +1155,10 @@ export interface GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1225,6 +1229,10 @@ export interface GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1521,6 +1529,10 @@ export interface GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1591,6 +1603,10 @@ export interface GalleryImageVersionOperations { * @param {array} [parameters.replicationStatus.summary] This is a summary of * replication status for each region. * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the From 69e85706d2973fadd31cd88d93e67011b489ec88 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 18:14:35 +0000 Subject: [PATCH 03/10] Generated from 958b583af5cb30874efc02c325d7e62c8737afce Merge branch 'dev/xiowei/addSwaggerForGallery' of https://github.com/vanbasten2323/azure-rest-api-specs into dev/xiowei/addSwaggerForGallery --- .../lib/computeManagementClient.d.ts | 6 +- .../lib/computeManagementClient.js | 6 +- .../lib/operations/galleries.js | 1550 +++++++++++++++ .../lib/operations/galleryImageVersions.js | 1535 +++++++++++++++ .../lib/operations/galleryImages.js | 1680 +++++++++++++++++ .../lib/operations/index.d.ts | 12 +- .../lib/operations/index.js | 6 +- 7 files changed, 4780 insertions(+), 15 deletions(-) create mode 100644 lib/services/computeManagement2/lib/operations/galleries.js create mode 100644 lib/services/computeManagement2/lib/operations/galleryImageVersions.js create mode 100644 lib/services/computeManagement2/lib/operations/galleryImages.js diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index 791c62c9a2..8116fe5ac5 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -54,9 +54,9 @@ export default class ComputeManagementClient extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups - galleryOperations: operations.GalleryOperations; - galleryImageOperations: operations.GalleryImageOperations; - galleryImageVersionOperations: operations.GalleryImageVersionOperations; + galleries: operations.Galleries; + galleryImages: operations.GalleryImages; + galleryImageVersions: operations.GalleryImageVersions; operations: operations.Operations; availabilitySets: operations.AvailabilitySets; virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index d1958c6ffc..22e35b2deb 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -71,9 +71,9 @@ class ComputeManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } - this.galleryOperations = new operations.GalleryOperations(this); - this.galleryImageOperations = new operations.GalleryImageOperations(this); - this.galleryImageVersionOperations = new operations.GalleryImageVersionOperations(this); + this.galleries = new operations.Galleries(this); + this.galleryImages = new operations.GalleryImages(this); + this.galleryImageVersions = new operations.GalleryImageVersions(this); this.operations = new operations.Operations(this); this.availabilitySets = new operations.AvailabilitySets(this); this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); diff --git a/lib/services/computeManagement2/lib/operations/galleries.js b/lib/services/computeManagement2/lib/operations/galleries.js new file mode 100644 index 0000000000..c9d86acb64 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleries.js @@ -0,0 +1,1550 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInSubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['Gallery']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Galleries. */ +class Galleries { + /** + * Create a Galleries. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleriesInResourceGroup = _listGalleriesInResourceGroup; + this._listGalleriesInSubscription = _listGalleriesInSubscription; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInSubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInSubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInSubscription(options, optionalCallback); + } + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + +} + +module.exports = Galleries; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js new file mode 100644 index 0000000000..28d5ee89e1 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -0,0 +1,1535 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImageVersion']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageVersions. */ +class GalleryImageVersions { + /** + * Create a GalleryImageVersions. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImageVersionsInGalleryImage = _listGalleryImageVersionsInGalleryImage; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageVersions; diff --git a/lib/services/computeManagement2/lib/operations/galleryImages.js b/lib/services/computeManagement2/lib/operations/galleryImages.js new file mode 100644 index 0000000000..e2cda80578 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImages.js @@ -0,0 +1,1680 @@ +/* + * 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 msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesInGallery(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImage']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImages. */ +class GalleryImages { + /** + * Create a GalleryImages. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImagesInGallery = _listGalleryImagesInGallery; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.osType] This property allows you to specify the + * type of the OS that is included in the disk if creating a VM from user-image + * or a specialized VHD.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + +} + +module.exports = GalleryImages; diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index ba53017390..f2a034eafa 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -14,11 +14,11 @@ import * as models from '../models'; /** * @class - * GalleryOperations + * Galleries * __NOTE__: An instance of this class is automatically created for an * instance of the ComputeManagementClient. */ -export interface GalleryOperations { +export interface Galleries { /** @@ -470,11 +470,11 @@ export interface GalleryOperations { /** * @class - * GalleryImageOperations + * GalleryImages * __NOTE__: An instance of this class is automatically created for an * instance of the ComputeManagementClient. */ -export interface GalleryImageOperations { +export interface GalleryImages { /** @@ -1091,11 +1091,11 @@ export interface GalleryImageOperations { /** * @class - * GalleryImageVersionOperations + * GalleryImageVersions * __NOTE__: An instance of this class is automatically created for an * instance of the ComputeManagementClient. */ -export interface GalleryImageVersionOperations { +export interface GalleryImageVersions { /** diff --git a/lib/services/computeManagement2/lib/operations/index.js b/lib/services/computeManagement2/lib/operations/index.js index 244c574500..1c278cc621 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -14,9 +14,9 @@ 'use strict'; -exports.GalleryOperations = require('./galleryOperations'); -exports.GalleryImageOperations = require('./galleryImageOperations'); -exports.GalleryImageVersionOperations = require('./galleryImageVersionOperations'); +exports.Galleries = require('./galleries'); +exports.GalleryImages = require('./galleryImages'); +exports.GalleryImageVersions = require('./galleryImageVersions'); exports.Operations = require('./operations'); exports.AvailabilitySets = require('./availabilitySets'); exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages'); From c227ce5ab04916e41b3958f815410703c283bd32 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 18:20:31 +0000 Subject: [PATCH 04/10] Generated from 29d0c5762aad64243a021fac44d65b8610304e4e Fixed description for 202 response. --- .../lib/operations/galleryImageVersions.js | 348 +++++++++++++----- .../lib/operations/index.d.ts | 68 ++++ 2 files changed, 324 insertions(+), 92 deletions(-) diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js index 28d5ee89e1..8430af61ac 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -312,6 +312,7 @@ function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVers }); } + /** * Delete a gallery image version. * @@ -348,105 +349,34 @@ function _deleteMethod(resourceGroupName, galleryName, galleryImageName, gallery callback = options; options = null; } + if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-06-01'; - // Validate - try { - if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { - throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); - } - if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { - throw new Error('galleryName cannot be null or undefined and it must be of type string.'); - } - if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { - throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); - } - if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { - throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); - requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); - requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - return callback(null, result, httpRequest, response); + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); }); } @@ -839,6 +769,144 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, }); } +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a GalleryImageVersions. */ class GalleryImageVersions { /** @@ -852,6 +920,7 @@ class GalleryImageVersions { this._deleteMethod = _deleteMethod; this._listGalleryImageVersionsInGalleryImage = _listGalleryImageVersionsInGalleryImage; this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; } /** @@ -1530,6 +1599,101 @@ class GalleryImageVersions { } } + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + } module.exports = GalleryImageVersions; diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index f2a034eafa..d729a20d21 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -1637,6 +1637,74 @@ export interface GalleryImageVersions { beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, callback: ServiceCallback): void; beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** From dc619bcdd5a668f3083cb51c324901175df86b77 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 19:09:47 +0000 Subject: [PATCH 05/10] Generated from b74f3ee0fdca928bf92a7fdd2bcd17994deadca9 Changed the operationId to conform to naming convention. --- .../lib/operations/galleries.js | 28 ++++++++-------- .../lib/operations/galleryImageVersions.js | 14 ++++---- .../lib/operations/galleryImages.js | 14 ++++---- .../lib/operations/index.d.ts | 32 +++++++++---------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/services/computeManagement2/lib/operations/galleries.js b/lib/services/computeManagement2/lib/operations/galleries.js index c9d86acb64..b3d1cd4ada 100644 --- a/lib/services/computeManagement2/lib/operations/galleries.js +++ b/lib/services/computeManagement2/lib/operations/galleries.js @@ -333,7 +333,7 @@ function _deleteMethod(resourceGroupName, galleryName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listGalleriesInResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(resourceGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -468,7 +468,7 @@ function _listGalleriesInResourceGroup(resourceGroupName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listGalleriesInSubscription(options, callback) { +function _listBySubscription(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -903,8 +903,8 @@ class Galleries { this._createOrUpdate = _createOrUpdate; this._get = _get; this._deleteMethod = _deleteMethod; - this._listGalleriesInResourceGroup = _listGalleriesInResourceGroup; - this._listGalleriesInSubscription = _listGalleriesInSubscription; + this._listByResourceGroup = _listByResourceGroup; + this._listBySubscription = _listBySubscription; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; } @@ -1206,11 +1206,11 @@ class Galleries { * * @reject {Error} - The error object. */ - listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1252,7 +1252,7 @@ class Galleries { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(resourceGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1261,14 +1261,14 @@ class Galleries { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); } } @@ -1286,11 +1286,11 @@ class Galleries { * * @reject {Error} - The error object. */ - listGalleriesInSubscriptionWithHttpOperationResponse(options) { + listBySubscriptionWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGalleriesInSubscription(options, (err, result, request, response) => { + self._listBySubscription(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1330,7 +1330,7 @@ class Galleries { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGalleriesInSubscription(options, optionalCallback) { + listBySubscription(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1339,14 +1339,14 @@ class Galleries { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGalleriesInSubscription(options, (err, result, request, response) => { + self._listBySubscription(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGalleriesInSubscription(options, optionalCallback); + return self._listBySubscription(options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js index 8430af61ac..ab6c07a977 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -408,7 +408,7 @@ function _deleteMethod(resourceGroupName, galleryName, galleryImageName, gallery * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { +function _listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -918,7 +918,7 @@ class GalleryImageVersions { this._createOrUpdate = _createOrUpdate; this._get = _get; this._deleteMethod = _deleteMethod; - this._listGalleryImageVersionsInGalleryImage = _listGalleryImageVersionsInGalleryImage; + this._listGalleryImageVersionsByGalleryImage = _listGalleryImageVersionsByGalleryImage; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; } @@ -1334,11 +1334,11 @@ class GalleryImageVersions { * * @reject {Error} - The error object. */ - listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + listGalleryImageVersionsByGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1385,7 +1385,7 @@ class GalleryImageVersions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1394,14 +1394,14 @@ class GalleryImageVersions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + return self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/galleryImages.js b/lib/services/computeManagement2/lib/operations/galleryImages.js index e2cda80578..061676f79e 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImages.js +++ b/lib/services/computeManagement2/lib/operations/galleryImages.js @@ -393,7 +393,7 @@ function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listGalleryImagesInGallery(resourceGroupName, galleryName, options, callback) { +function _listGalleryImagesByGallery(resourceGroupName, galleryName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -896,7 +896,7 @@ class GalleryImages { this._createOrUpdate = _createOrUpdate; this._get = _get; this._deleteMethod = _deleteMethod; - this._listGalleryImagesInGallery = _listGalleryImagesInGallery; + this._listGalleryImagesByGallery = _listGalleryImagesByGallery; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; } @@ -1308,11 +1308,11 @@ class GalleryImages { * * @reject {Error} - The error object. */ - listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { + listGalleryImagesByGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1356,7 +1356,7 @@ class GalleryImages { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback) { + listGalleryImagesByGallery(resourceGroupName, galleryName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1365,14 +1365,14 @@ class GalleryImages { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback); + return self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index d729a20d21..d49aea18a4 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -237,7 +237,7 @@ export interface Galleries { * * @reject {Error|ServiceError} - The error object. */ - listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List galleries under a resource group. @@ -271,9 +271,9 @@ export interface Galleries { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGalleriesInResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleriesInResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listGalleriesInResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -290,7 +290,7 @@ export interface Galleries { * * @reject {Error|ServiceError} - The error object. */ - listGalleriesInSubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List galleries under a subscription. @@ -322,9 +322,9 @@ export interface Galleries { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGalleriesInSubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleriesInSubscription(callback: ServiceCallback): void; - listGalleriesInSubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -803,7 +803,7 @@ export interface GalleryImages { * * @reject {Error|ServiceError} - The error object. */ - listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listGalleryImagesByGalleryWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List gallery images under a gallery. @@ -839,9 +839,9 @@ export interface GalleryImages { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - listGalleryImagesInGallery(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1428,7 +1428,7 @@ export interface GalleryImageVersions { * * @reject {Error|ServiceError} - The error object. */ - listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listGalleryImageVersionsByGalleryImageWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List gallery image versions under a gallery image. @@ -1467,9 +1467,9 @@ export interface GalleryImageVersions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - listGalleryImageVersionsInGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** From 16add343f14265f6f4a02be0b2fbf4d183f81c79 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 23:07:03 +0000 Subject: [PATCH 06/10] Generated from 664c041aeed346e4fdc3a2c8c29c1c59e7505b66 Fixed some typos. --- .../lib/operations/galleries.js | 108 ++-- .../lib/operations/galleryImageVersions.js | 420 ++++++------ .../lib/operations/galleryImages.js | 402 ++++++------ .../lib/operations/index.d.ts | 596 +++++++++--------- 4 files changed, 788 insertions(+), 738 deletions(-) diff --git a/lib/services/computeManagement2/lib/operations/galleries.js b/lib/services/computeManagement2/lib/operations/galleries.js index b3d1cd4ada..628b885c28 100644 --- a/lib/services/computeManagement2/lib/operations/galleries.js +++ b/lib/services/computeManagement2/lib/operations/galleries.js @@ -22,17 +22,17 @@ const WebResource = msRest.WebResource; * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -52,7 +52,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, galleryName, gallery, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,7 +65,7 @@ function _createOrUpdate(resourceGroupName, galleryName, parameters, options, ca } // Send request - this.beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -585,17 +585,17 @@ function _listBySubscription(options, callback) { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -615,7 +615,7 @@ function _listBySubscription(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -637,8 +637,8 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, option if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { throw new Error('galleryName cannot be null or undefined and it must be of type string.'); } - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); + if (gallery === null || gallery === undefined) { + throw new Error('gallery cannot be null or undefined.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -683,14 +683,14 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, option let requestContent = null; let requestModel = null; try { - if (parameters !== null && parameters !== undefined) { + if (gallery !== null && gallery !== undefined) { let requestModelMapper = new client.models['Gallery']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestModel = client.serialize(requestModelMapper, gallery, 'gallery'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); + `payload - ${JSON.stringify(gallery, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -916,17 +916,17 @@ class Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -939,11 +939,11 @@ class Galleries { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, gallery, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -960,17 +960,17 @@ class Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -999,7 +999,7 @@ class Galleries { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1008,14 +1008,14 @@ class Galleries { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback); } } @@ -1357,17 +1357,17 @@ class Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1380,11 +1380,11 @@ class Galleries { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, gallery, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1401,17 +1401,17 @@ class Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1440,7 +1440,7 @@ class Galleries { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1449,14 +1449,14 @@ class Galleries { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + return self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js index ab6c07a977..a5f9acb3a1 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -27,54 +27,56 @@ const WebResource = msRest.WebResource; * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -94,7 +96,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -107,7 +109,7 @@ function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galle } // Send request - this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -542,54 +544,56 @@ function _listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -609,7 +613,7 @@ function _listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -637,8 +641,8 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); } - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); + if (galleryImageVersion === null || galleryImageVersion === undefined) { + throw new Error('galleryImageVersion cannot be null or undefined.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -685,14 +689,14 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, let requestContent = null; let requestModel = null; try { - if (parameters !== null && parameters !== undefined) { + if (galleryImageVersion !== null && galleryImageVersion !== undefined) { let requestModelMapper = new client.models['GalleryImageVersion']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestModel = client.serialize(requestModelMapper, galleryImageVersion, 'galleryImageVersion'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); + `payload - ${JSON.stringify(galleryImageVersion, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -935,54 +939,56 @@ class GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -995,11 +1001,11 @@ class GalleryImageVersions { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1021,54 +1027,56 @@ class GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1097,7 +1105,7 @@ class GalleryImageVersions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1106,14 +1114,14 @@ class GalleryImageVersions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback); } } @@ -1417,54 +1425,56 @@ class GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1477,11 +1487,11 @@ class GalleryImageVersions { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1503,54 +1513,56 @@ class GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1579,7 +1591,7 @@ class GalleryImageVersions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1588,14 +1600,14 @@ class GalleryImageVersions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/galleryImages.js b/lib/services/computeManagement2/lib/operations/galleryImages.js index 061676f79e..686972cf71 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImages.js +++ b/lib/services/computeManagement2/lib/operations/galleryImages.js @@ -24,65 +24,68 @@ const WebResource = msRest.WebResource; * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -102,7 +105,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -115,7 +118,7 @@ function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, param } // Send request - this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -520,65 +523,68 @@ function _listGalleryImagesByGallery(resourceGroupName, galleryName, options, ca * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -598,7 +604,7 @@ function _listGalleryImagesByGallery(resourceGroupName, galleryName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -623,8 +629,8 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); } - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); + if (galleryImage === null || galleryImage === undefined) { + throw new Error('galleryImage cannot be null or undefined.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -670,14 +676,14 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, let requestContent = null; let requestModel = null; try { - if (parameters !== null && parameters !== undefined) { + if (galleryImage !== null && galleryImage !== undefined) { let requestModelMapper = new client.models['GalleryImage']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestModel = client.serialize(requestModelMapper, galleryImage, 'galleryImage'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); + `payload - ${JSON.stringify(galleryImage, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -910,65 +916,68 @@ class GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -981,11 +990,11 @@ class GalleryImages { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImage, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1004,65 +1013,68 @@ class GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1091,7 +1103,7 @@ class GalleryImages { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1100,14 +1112,14 @@ class GalleryImages { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback); } } @@ -1385,65 +1397,68 @@ class GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1456,11 +1471,11 @@ class GalleryImages { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImage, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1479,65 +1494,68 @@ class GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1566,7 +1584,7 @@ class GalleryImages { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1575,14 +1593,14 @@ class GalleryImages { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback); } } diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index d49aea18a4..d8a6720736 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -28,17 +28,17 @@ export interface Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -51,7 +51,7 @@ export interface Galleries { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery. @@ -60,17 +60,17 @@ export interface Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -99,9 +99,9 @@ export interface Galleries { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -334,17 +334,17 @@ export interface Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -357,7 +357,7 @@ export interface Galleries { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery. @@ -366,17 +366,17 @@ export interface Galleries { * * @param {string} galleryName The name of the gallery. * - * @param {object} parameters Parameters supplied to the create or update - * gallery operation. + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [gallery.description] The description of this gallery * resource. * - * @param {object} [parameters.identifier] + * @param {object} [gallery.identifier] * - * @param {string} parameters.location Resource location + * @param {string} gallery.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [gallery.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -405,9 +405,9 @@ export interface Galleries { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, parameters: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -486,65 +486,68 @@ export interface GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -557,7 +560,7 @@ export interface GalleryImages { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery image. @@ -568,65 +571,68 @@ export interface GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -655,9 +661,9 @@ export interface GalleryImages { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -853,65 +859,68 @@ export interface GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -924,7 +933,7 @@ export interface GalleryImages { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery image. @@ -935,65 +944,68 @@ export interface GalleryImages { * * @param {string} galleryImageName The name of the gallery image. * - * @param {object} parameters Parameters supplied to the create or update + * @param {object} galleryImage Parameters supplied to the create or update * gallery image operation. * - * @param {string} [parameters.description] The description of this gallery + * @param {string} [galleryImage.description] The description of this gallery * image resource. * - * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. * - * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. * - * @param {string} [parameters.releaseNoteUri] The release note uri. + * @param {string} [galleryImage.releaseNoteUri] The release note uri. * - * @param {string} [parameters.osType] This property allows you to specify the - * type of the OS that is included in the disk if creating a VM from user-image - * or a specialized VHD.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [galleryImage.osType] This property allows you to specify + * the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' * - * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery * image. * - * @param {object} [parameters.identifier] + * @param {object} [galleryImage.identifier] * - * @param {string} [parameters.identifier.publisher] The gallery image + * @param {string} [galleryImage.identifier.publisher] The gallery image * publisher name. * - * @param {string} [parameters.identifier.offer] The gallery image offer name. + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. * - * @param {string} [parameters.identifier.sku] The gallery image sku name. + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. * - * @param {object} [parameters.recommended] + * @param {object} [galleryImage.recommended] * - * @param {object} [parameters.recommended.vCPUs] + * @param {object} [galleryImage.recommended.vCPUs] * - * @param {object} [parameters.recommended.memory] + * @param {object} [galleryImage.recommended.memory] * - * @param {number} [parameters.recommended.memory.min] The minimum number of + * @param {number} [galleryImage.recommended.memory.min] The minimum number of * the resource. * - * @param {number} [parameters.recommended.memory.max] The maximum number of + * @param {number} [galleryImage.recommended.memory.max] The maximum number of * the resource. * - * @param {object} [parameters.disallowed] + * @param {object} [galleryImage.disallowed] * - * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. * - * @param {object} [parameters.purchasePlan] + * @param {object} [galleryImage.purchasePlan] * - * @param {string} [parameters.purchasePlan.name] The plan ID. + * @param {string} [galleryImage.purchasePlan.name] The plan ID. * - * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. * - * @param {string} [parameters.purchasePlan.product] The product ID. + * @param {string} [galleryImage.purchasePlan.product] The product ID. * - * @param {string} parameters.location Resource location + * @param {string} galleryImage.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImage.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1022,9 +1034,9 @@ export interface GalleryImages { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, parameters: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1110,54 +1122,56 @@ export interface GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1170,7 +1184,7 @@ export interface GalleryImageVersions { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery image version. @@ -1184,54 +1198,56 @@ export interface GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1260,9 +1276,9 @@ export interface GalleryImageVersions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1484,54 +1500,56 @@ export interface GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1544,7 +1562,7 @@ export interface GalleryImageVersions { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a gallery image version. @@ -1558,54 +1576,56 @@ export interface GalleryImageVersions { * @param {string} galleryImageVersionName The name of the gallery image * version. * - * @param {object} parameters Parameters supplied to the create or update - * gallery image version operation. + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. * - * @param {object} [parameters.publishingProfile] + * @param {object} [galleryImageVersion.publishingProfile] * - * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag - * means that if it is set to true, people deploying VMs with 'latest' as - * version will not use this version. + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. * - * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life - * date of the gallery image version. + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. * - * @param {array} [parameters.publishingProfile.regions] The regions where the - * artifact is going to be published. + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. * - * @param {object} [parameters.publishingProfile.source] + * @param {object} [galleryImageVersion.publishingProfile.source] * - * @param {object} [parameters.publishingProfile.source.managedImage] + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] * - * @param {string} [parameters.publishingProfile.source.managedImage.id] The - * managed artifact id. + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. * - * @param {object} [parameters.storageProfile] + * @param {object} [galleryImageVersion.storageProfile] * - * @param {object} [parameters.storageProfile.osDiskImage] + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] * - * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It - * indicates the size of the VHD to create. + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. * - * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host - * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * - * @param {array} [parameters.storageProfile.dataDiskImages] A list of data - * disk images. + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. * - * @param {object} [parameters.replicationStatus] + * @param {object} [galleryImageVersion.replicationStatus] * - * @param {string} [parameters.replicationStatus.aggregatedState] This is the - * aggregated replication status based on the regional replication status. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' * - * @param {array} [parameters.replicationStatus.summary] This is a summary of - * replication status for each region. + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. * - * @param {string} parameters.location Resource location + * @param {string} galleryImageVersion.location Resource location * - * @param {object} [parameters.tags] Resource tags + * @param {object} [galleryImageVersion.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1634,9 +1654,9 @@ export interface GalleryImageVersions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, parameters: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** From 692390164c408f65a90b26bcc28539f729e32acb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 18 May 2018 16:34:05 +0000 Subject: [PATCH 07/10] Generated from e7ab96432e0bfc7c49839ca5d1194ec1be0c23a9 Add default error response. Make provisioningInfo a enum type. --- .../computeManagement2/lib/models/gallery.js | 6 ++++-- .../lib/models/galleryImage.js | 6 ++++-- .../lib/models/galleryImageVersion.js | 6 ++++-- .../computeManagement2/lib/models/index.d.ts | 18 ++++++++++++------ 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/services/computeManagement2/lib/models/gallery.js b/lib/services/computeManagement2/lib/models/gallery.js index a0624ba612..08b43a45d4 100644 --- a/lib/services/computeManagement2/lib/models/gallery.js +++ b/lib/services/computeManagement2/lib/models/gallery.js @@ -23,8 +23,10 @@ class Gallery extends models['Resource'] { * @member {string} [description] The description of this gallery resource. * @member {object} [identifier] * @member {string} [identifier.uniqueName] The unique name of the gallery - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery. The + * provisioning state, which only appears in the response. Possible values + * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + * 'Migrating' */ constructor() { super(); diff --git a/lib/services/computeManagement2/lib/models/galleryImage.js b/lib/services/computeManagement2/lib/models/galleryImage.js index 8fb8acb0d9..74bab164a2 100644 --- a/lib/services/computeManagement2/lib/models/galleryImage.js +++ b/lib/services/computeManagement2/lib/models/galleryImage.js @@ -54,8 +54,10 @@ class GalleryImage extends models['Resource'] { * @member {string} [purchasePlan.name] The plan ID. * @member {string} [purchasePlan.publisher] The publisher ID. * @member {string} [purchasePlan.product] The product ID. - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery + * image. The provisioning state, which only appears in the response. + * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating' */ constructor() { super(); diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersion.js b/lib/services/computeManagement2/lib/models/galleryImageVersion.js index f12b4f6149..286394a1f1 100644 --- a/lib/services/computeManagement2/lib/models/galleryImageVersion.js +++ b/lib/services/computeManagement2/lib/models/galleryImageVersion.js @@ -29,8 +29,10 @@ class GalleryImageVersion extends models['Resource'] { * image version is published. * @member {date} [publishingProfile.endOfLifeDate] The end of life date of * the gallery image version. - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery + * image version. The provisioning state, which only appears in the response. + * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating' * @member {object} [storageProfile] * @member {object} [storageProfile.osDiskImage] * @member {array} [storageProfile.dataDiskImages] A list of data disk diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index b0778516b3..6516583a6d 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -55,8 +55,10 @@ export interface Resource extends BaseResource { * @member {string} [description] The description of this gallery resource. * @member {object} [identifier] * @member {string} [identifier.uniqueName] The unique name of the gallery - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery. The + * provisioning state, which only appears in the response. Possible values + * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + * 'Migrating' */ export interface Gallery extends Resource { description?: string; @@ -179,8 +181,10 @@ export interface ImagePurchasePlan { * @member {string} [purchasePlan.name] The plan ID. * @member {string} [purchasePlan.publisher] The publisher ID. * @member {string} [purchasePlan.product] The product ID. - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery image. + * The provisioning state, which only appears in the response. Possible values + * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + * 'Migrating' */ export interface GalleryImage extends Resource { description?: string; @@ -340,8 +344,10 @@ export interface ReplicationStatus { * image version is published. * @member {date} [publishingProfile.endOfLifeDate] The end of life date of the * gallery image version. - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. + * @member {string} [provisioningState] The current state of the gallery image + * version. The provisioning state, which only appears in the response. + * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating' * @member {object} [storageProfile] * @member {object} [storageProfile.osDiskImage] * @member {array} [storageProfile.dataDiskImages] A list of data disk images. From ede21ac0468f38a713fab7584c68c507c58800b8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 21 May 2018 01:22:48 +0000 Subject: [PATCH 08/10] Generated from c26feda2acff5be97893b6e5db4270e09dbf1c25 Fixed comments according to CR. --- .../lib/models/galleryImageList.js | 9 +- .../lib/models/galleryImageVersionList.js | 9 +- .../lib/models/galleryList.js | 9 +- .../computeManagement2/lib/models/index.d.ts | 206 ++++---- .../computeManagement2/lib/models/index.js | 14 +- .../lib/operations/galleries.js | 487 +++++++++++++++++- .../lib/operations/galleryImageVersions.js | 290 ++++++++++- .../lib/operations/galleryImages.js | 275 +++++++++- .../lib/operations/index.d.ts | 329 ++++++++++-- 9 files changed, 1412 insertions(+), 216 deletions(-) diff --git a/lib/services/computeManagement2/lib/models/galleryImageList.js b/lib/services/computeManagement2/lib/models/galleryImageList.js index 9497404b90..9c66d02ec3 100644 --- a/lib/services/computeManagement2/lib/models/galleryImageList.js +++ b/lib/services/computeManagement2/lib/models/galleryImageList.js @@ -10,21 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * The List Gallery Images operation response. - * */ -class GalleryImageList { +class GalleryImageList extends Array { /** * Create a GalleryImageList. - * @member {array} value A list of gallery images. * @member {string} [nextLink] The uri to fetch the next page of gallery * images. Call ListNext() with this to fetch the next page of gallery * images. */ constructor() { + super(); } /** @@ -43,7 +40,7 @@ class GalleryImageList { modelProperties: { value: { required: true, - serializedName: 'value', + serializedName: '', type: { name: 'Sequence', element: { diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionList.js b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js index 9bc452fd73..19bc6c80cf 100644 --- a/lib/services/computeManagement2/lib/models/galleryImageVersionList.js +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js @@ -10,21 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * The List Gallery Image version operation response. - * */ -class GalleryImageVersionList { +class GalleryImageVersionList extends Array { /** * Create a GalleryImageVersionList. - * @member {array} value A list of gallery image versions. * @member {string} [nextLink] The uri to fetch the next page of gallery * image versions. Call ListNext() with this to fetch the next page of * gallery image versions. */ constructor() { + super(); } /** @@ -43,7 +40,7 @@ class GalleryImageVersionList { modelProperties: { value: { required: true, - serializedName: 'value', + serializedName: '', type: { name: 'Sequence', element: { diff --git a/lib/services/computeManagement2/lib/models/galleryList.js b/lib/services/computeManagement2/lib/models/galleryList.js index 2411bace17..3d28a0c7fe 100644 --- a/lib/services/computeManagement2/lib/models/galleryList.js +++ b/lib/services/computeManagement2/lib/models/galleryList.js @@ -10,20 +10,17 @@ 'use strict'; -const models = require('./index'); - /** * The List Galleries operation response. - * */ -class GalleryList { +class GalleryList extends Array { /** * Create a GalleryList. - * @member {array} value A list of galleries. * @member {string} [nextLink] The uri to fetch the next page of galleries. * Call ListNext() with this to fetch the next page of galleries. */ constructor() { + super(); } /** @@ -42,7 +39,7 @@ class GalleryList { modelProperties: { value: { required: true, - serializedName: 'value', + serializedName: '', type: { name: 'Sequence', element: { diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index 6516583a6d..b844b53659 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -392,48 +392,83 @@ export interface GalleryArtifactSource { /** * @class - * Initializes a new instance of the GalleryList class. + * Initializes a new instance of the ApiErrorBase class. * @constructor - * The List Galleries operation response. + * Api error base. * - * @member {array} value A list of galleries. - * @member {string} [nextLink] The uri to fetch the next page of galleries. - * Call ListNext() with this to fetch the next page of galleries. + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. */ -export interface GalleryList { - value: Gallery[]; - nextLink?: string; +export interface ApiErrorBase { + code?: string; + target?: string; + message?: string; } /** * @class - * Initializes a new instance of the GalleryImageList class. + * Initializes a new instance of the InnerError class. * @constructor - * The List Gallery Images operation response. + * Inner error details. * - * @member {array} value A list of gallery images. - * @member {string} [nextLink] The uri to fetch the next page of gallery - * images. Call ListNext() with this to fetch the next page of gallery images. + * @member {string} [exceptiontype] The exception type. + * @member {string} [errordetail] The internal error message or exception dump. */ -export interface GalleryImageList { - value: GalleryImage[]; - nextLink?: string; +export interface InnerError { + exceptiontype?: string; + errordetail?: string; } /** * @class - * Initializes a new instance of the GalleryImageVersionList class. + * Initializes a new instance of the ApiError class. * @constructor - * The List Gallery Image version operation response. + * Api error. * - * @member {array} value A list of gallery image versions. - * @member {string} [nextLink] The uri to fetch the next page of gallery image - * versions. Call ListNext() with this to fetch the next page of gallery image - * versions. + * @member {array} [details] The Api error details + * @member {object} [innererror] The Api inner error + * @member {string} [innererror.exceptiontype] The exception type. + * @member {string} [innererror.errordetail] The internal error message or + * exception dump. + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. */ -export interface GalleryImageVersionList { - value: GalleryImageVersion[]; - nextLink?: string; +export interface ApiError { + details?: ApiErrorBase[]; + innererror?: InnerError; + code?: string; + target?: string; + message?: string; +} + +/** + * @class + * Initializes a new instance of the OperationStatusResponse class. + * @constructor + * Operation status response + * + * @member {string} [name] Operation ID + * @member {string} [status] Operation status + * @member {date} [startTime] Start time of the operation + * @member {date} [endTime] End time of the operation + * @member {object} [error] Api error + * @member {array} [error.details] The Api error details + * @member {object} [error.innererror] The Api inner error + * @member {string} [error.innererror.exceptiontype] The exception type. + * @member {string} [error.innererror.errordetail] The internal error message + * or exception dump. + * @member {string} [error.code] The error code. + * @member {string} [error.target] The target of the particular error. + * @member {string} [error.message] The error message. + */ +export interface OperationStatusResponse { + readonly name?: string; + readonly status?: string; + readonly startTime?: Date; + readonly endTime?: Date; + readonly error?: ApiError; } /** @@ -4682,59 +4717,6 @@ export interface VirtualMachineScaleSetSku { readonly capacity?: VirtualMachineScaleSetSkuCapacity; } -/** - * @class - * Initializes a new instance of the ApiErrorBase class. - * @constructor - * Api error base. - * - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiErrorBase { - code?: string; - target?: string; - message?: string; -} - -/** - * @class - * Initializes a new instance of the InnerError class. - * @constructor - * Inner error details. - * - * @member {string} [exceptiontype] The exception type. - * @member {string} [errordetail] The internal error message or exception dump. - */ -export interface InnerError { - exceptiontype?: string; - errordetail?: string; -} - -/** - * @class - * Initializes a new instance of the ApiError class. - * @constructor - * Api error. - * - * @member {array} [details] The Api error details - * @member {object} [innererror] The Api inner error - * @member {string} [innererror.exceptiontype] The exception type. - * @member {string} [innererror.errordetail] The internal error message or - * exception dump. - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiError { - details?: ApiErrorBase[]; - innererror?: InnerError; - code?: string; - target?: string; - message?: string; -} - /** * @class * Initializes a new instance of the RollbackStatusInfo class. @@ -5546,34 +5528,6 @@ export interface RecoveryWalkResponse { readonly nextPlatformUpdateDomain?: number; } -/** - * @class - * Initializes a new instance of the OperationStatusResponse class. - * @constructor - * Operation status response - * - * @member {string} [name] Operation ID - * @member {string} [status] Operation status - * @member {date} [startTime] Start time of the operation - * @member {date} [endTime] End time of the operation - * @member {object} [error] Api error - * @member {array} [error.details] The Api error details - * @member {object} [error.innererror] The Api inner error - * @member {string} [error.innererror.exceptiontype] The exception type. - * @member {string} [error.innererror.errordetail] The internal error message - * or exception dump. - * @member {string} [error.code] The error code. - * @member {string} [error.target] The target of the particular error. - * @member {string} [error.message] The error message. - */ -export interface OperationStatusResponse { - readonly name?: string; - readonly status?: string; - readonly startTime?: Date; - readonly endTime?: Date; - readonly error?: ApiError; -} - /** * @class * Initializes a new instance of the LogAnalyticsInputBase class. @@ -6583,6 +6537,46 @@ export interface ContainerService extends Resource { } +/** + * @class + * Initializes a new instance of the GalleryList class. + * @constructor + * The List Galleries operation response. + * + * @member {string} [nextLink] The uri to fetch the next page of galleries. + * Call ListNext() with this to fetch the next page of galleries. + */ +export interface GalleryList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageList class. + * @constructor + * The List Gallery Images operation response. + * + * @member {string} [nextLink] The uri to fetch the next page of gallery + * images. Call ListNext() with this to fetch the next page of gallery images. + */ +export interface GalleryImageList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageVersionList class. + * @constructor + * The List Gallery Image version operation response. + * + * @member {string} [nextLink] The uri to fetch the next page of gallery image + * versions. Call ListNext() with this to fetch the next page of gallery image + * versions. + */ +export interface GalleryImageVersionList extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the ComputeOperationListResult class. diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index 3c2edf81b6..f8e15f6ed5 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -38,9 +38,10 @@ exports.ReplicationStatus = require('./replicationStatus'); exports.GalleryImageVersion = require('./galleryImageVersion'); exports.ManagedArtifact = require('./managedArtifact'); exports.GalleryArtifactSource = require('./galleryArtifactSource'); -exports.GalleryList = require('./galleryList'); -exports.GalleryImageList = require('./galleryImageList'); -exports.GalleryImageVersionList = require('./galleryImageVersionList'); +exports.ApiErrorBase = require('./apiErrorBase'); +exports.InnerError = require('./innerError'); +exports.ApiError = require('./apiError'); +exports.OperationStatusResponse = require('./operationStatusResponse'); exports.ComputeOperationValue = require('./computeOperationValue'); exports.InstanceViewStatus = require('./instanceViewStatus'); exports.SubResource = require('./subResource'); @@ -140,9 +141,6 @@ exports.VirtualMachineScaleSetVMExtensionsSummary = require('./virtualMachineSca exports.VirtualMachineScaleSetInstanceView = require('./virtualMachineScaleSetInstanceView'); exports.VirtualMachineScaleSetSkuCapacity = require('./virtualMachineScaleSetSkuCapacity'); exports.VirtualMachineScaleSetSku = require('./virtualMachineScaleSetSku'); -exports.ApiErrorBase = require('./apiErrorBase'); -exports.InnerError = require('./innerError'); -exports.ApiError = require('./apiError'); exports.RollbackStatusInfo = require('./rollbackStatusInfo'); exports.UpgradeOperationHistoryStatus = require('./upgradeOperationHistoryStatus'); exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo'); @@ -155,7 +153,6 @@ exports.RollingUpgradeRunningStatus = require('./rollingUpgradeRunningStatus'); exports.RollingUpgradeStatusInfo = require('./rollingUpgradeStatusInfo'); exports.ComputeLongRunningOperationProperties = require('./computeLongRunningOperationProperties'); exports.RecoveryWalkResponse = require('./recoveryWalkResponse'); -exports.OperationStatusResponse = require('./operationStatusResponse'); exports.LogAnalyticsInputBase = require('./logAnalyticsInputBase'); exports.RequestRateByIntervalInput = require('./requestRateByIntervalInput'); exports.ThrottledRequestsInput = require('./throttledRequestsInput'); @@ -201,6 +198,9 @@ exports.ContainerServiceLinuxProfile = require('./containerServiceLinuxProfile') exports.ContainerServiceVMDiagnostics = require('./containerServiceVMDiagnostics'); exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnosticsProfile'); exports.ContainerService = require('./containerService'); +exports.GalleryList = require('./galleryList'); +exports.GalleryImageList = require('./galleryImageList'); +exports.GalleryImageVersionList = require('./galleryImageVersionList'); exports.ComputeOperationListResult = require('./computeOperationListResult'); exports.AvailabilitySetListResult = require('./availabilitySetListResult'); exports.VirtualMachineSizeListResult = require('./virtualMachineSizeListResult'); diff --git a/lib/services/computeManagement2/lib/operations/galleries.js b/lib/services/computeManagement2/lib/operations/galleries.js index 628b885c28..d4ac24efb0 100644 --- a/lib/services/computeManagement2/lib/operations/galleries.js +++ b/lib/services/computeManagement2/lib/operations/galleries.js @@ -266,7 +266,9 @@ function _get(resourceGroupName, galleryName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -304,6 +306,20 @@ function _deleteMethod(resourceGroupName, galleryName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } return callback(null, result, httpRequest, response); }); @@ -700,7 +716,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -729,7 +745,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -746,7 +762,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, } } // Deserialize Response - if (statusCode === 202) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -785,7 +801,9 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -859,7 +877,261 @@ function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -887,6 +1159,23 @@ function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); @@ -907,6 +1196,8 @@ class Galleries { this._listBySubscription = _listBySubscription; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySubscriptionNext = _listBySubscriptionNext; } /** @@ -1119,7 +1410,7 @@ class Galleries { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1156,7 +1447,7 @@ class Galleries { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1164,7 +1455,9 @@ class Galleries { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1474,7 +1767,7 @@ class Galleries { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1511,7 +1804,7 @@ class Galleries { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1519,7 +1812,9 @@ class Galleries { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1545,6 +1840,174 @@ class Galleries { } } + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = Galleries; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js index a5f9acb3a1..60c7922175 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -163,7 +163,7 @@ function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galle * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] The expand expression to apply on the - * operation. + * operation. Possible values include: 'ReplicationStatus' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -210,8 +210,11 @@ function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVers if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); } - if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { - throw new Error('expand must be of type string.'); + if (expand) { + let allowedValues = [ 'ReplicationStatus' ]; + if (!allowedValues.some( function(item) { return item === expand; })) { + throw new Error(expand + ' is not a valid value. The valid values are: ' + allowedValues); + } } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -338,7 +341,9 @@ function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVers * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -376,6 +381,20 @@ function _deleteMethod(resourceGroupName, galleryName, galleryImageName, gallery if (responseBody === '') responseBody = null; // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } return callback(null, result, httpRequest, response); }); @@ -706,7 +725,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -735,7 +754,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -752,7 +771,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, } } // Deserialize Response - if (statusCode === 202) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -796,7 +815,9 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -878,7 +899,135 @@ function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, ga return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -906,6 +1055,23 @@ function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, ga // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); @@ -925,6 +1091,7 @@ class GalleryImageVersions { this._listGalleryImageVersionsByGalleryImage = _listGalleryImageVersionsByGalleryImage; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; + this._listGalleryImageVersionsByGalleryImageNext = _listGalleryImageVersionsByGalleryImageNext; } /** @@ -1140,7 +1307,7 @@ class GalleryImageVersions { * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] The expand expression to apply on the - * operation. + * operation. Possible values include: 'ReplicationStatus' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1180,7 +1347,7 @@ class GalleryImageVersions { * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] The expand expression to apply on the - * operation. + * operation. Possible values include: 'ReplicationStatus' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1246,7 +1413,7 @@ class GalleryImageVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1288,7 +1455,7 @@ class GalleryImageVersions { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1296,7 +1463,9 @@ class GalleryImageVersions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1630,7 +1799,7 @@ class GalleryImageVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1672,7 +1841,7 @@ class GalleryImageVersions { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1680,7 +1849,9 @@ class GalleryImageVersions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1706,6 +1877,91 @@ class GalleryImageVersions { } } + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsByGalleryImageNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = GalleryImageVersions; diff --git a/lib/services/computeManagement2/lib/operations/galleryImages.js b/lib/services/computeManagement2/lib/operations/galleryImages.js index 686972cf71..43ddc1bc74 100644 --- a/lib/services/computeManagement2/lib/operations/galleryImages.js +++ b/lib/services/computeManagement2/lib/operations/galleryImages.js @@ -327,7 +327,9 @@ function _get(resourceGroupName, galleryName, galleryImageName, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -365,6 +367,20 @@ function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options if (responseBody === '') responseBody = null; // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } return callback(null, result, httpRequest, response); }); @@ -693,7 +709,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -722,7 +738,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -739,7 +755,7 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, } } // Deserialize Response - if (statusCode === 202) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -780,7 +796,9 @@ function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -858,7 +876,7 @@ function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -886,6 +904,150 @@ function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, op // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesByGalleryNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); @@ -905,6 +1067,7 @@ class GalleryImages { this._listGalleryImagesByGallery = _listGalleryImagesByGallery; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; + this._listGalleryImagesByGalleryNext = _listGalleryImagesByGalleryNext; } /** @@ -1229,7 +1392,7 @@ class GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1268,7 +1431,7 @@ class GalleryImages { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1276,7 +1439,9 @@ class GalleryImages { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1620,7 +1785,7 @@ class GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1659,7 +1824,7 @@ class GalleryImages { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1667,7 +1832,9 @@ class GalleryImages { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1693,6 +1860,90 @@ class GalleryImages { } } + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesByGalleryNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesByGalleryNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesByGalleryNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesByGalleryNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesByGalleryNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = GalleryImages; diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index d8a6720736..ca51044e97 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -177,11 +177,11 @@ export interface Galleries { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery. @@ -202,7 +202,7 @@ export interface Galleries { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -210,15 +210,17 @@ export interface Galleries { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -424,11 +426,11 @@ export interface Galleries { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery. @@ -449,7 +451,7 @@ export interface Galleries { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -457,15 +459,131 @@ export interface Galleries { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -745,11 +863,11 @@ export interface GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery image. @@ -772,7 +890,7 @@ export interface GalleryImages { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -780,15 +898,17 @@ export interface GalleryImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1055,11 +1175,11 @@ export interface GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery image. @@ -1082,7 +1202,7 @@ export interface GalleryImages { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1090,15 +1210,74 @@ export interface GalleryImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleryImagesByGalleryNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGalleryImagesByGalleryNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImagesByGalleryNext(nextPageLink: string, callback: ServiceCallback): void; + listGalleryImagesByGalleryNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -1296,7 +1475,7 @@ export interface GalleryImageVersions { * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] The expand expression to apply on the - * operation. + * operation. Possible values include: 'ReplicationStatus' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1324,7 +1503,7 @@ export interface GalleryImageVersions { * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] The expand expression to apply on the - * operation. + * operation. Possible values include: 'ReplicationStatus' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1375,11 +1554,11 @@ export interface GalleryImageVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery image version. @@ -1405,7 +1584,7 @@ export interface GalleryImageVersions { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1413,15 +1592,17 @@ export interface GalleryImageVersions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1678,11 +1859,11 @@ export interface GalleryImageVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a gallery image version. @@ -1708,7 +1889,7 @@ export interface GalleryImageVersions { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1716,15 +1897,75 @@ export interface GalleryImageVersions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGalleryImageVersionsByGalleryImageNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageVersionList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, callback: ServiceCallback): void; + listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** From 5d663da034a09426032082779bfb14ee8d2b7ad1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 21 May 2018 20:44:51 +0000 Subject: [PATCH 09/10] Generated from b757a4ec5fd9e1a35bedefd53fe3d92e111db5eb Resolved merge conflicts. --- .../lib/models/accessUri.js | 2 +- .../lib/operations/disks.js | 110 +++------------ .../lib/operations/index.d.ts | 128 ++++++++---------- .../lib/operations/snapshots.js | 110 +++------------ 4 files changed, 89 insertions(+), 261 deletions(-) diff --git a/lib/services/computeManagement2/lib/models/accessUri.js b/lib/services/computeManagement2/lib/models/accessUri.js index 2f3d401a97..3fa859d644 100644 --- a/lib/services/computeManagement2/lib/models/accessUri.js +++ b/lib/services/computeManagement2/lib/models/accessUri.js @@ -39,7 +39,7 @@ class AccessUri { accessSAS: { required: false, readOnly: true, - serializedName: 'properties.output.accessSAS', + serializedName: 'accessSAS', type: { name: 'String' } diff --git a/lib/services/computeManagement2/lib/operations/disks.js b/lib/services/computeManagement2/lib/operations/disks.js index aeb9e01a49..436ad19155 100644 --- a/lib/services/computeManagement2/lib/operations/disks.js +++ b/lib/services/computeManagement2/lib/operations/disks.js @@ -473,9 +473,7 @@ function _get(resourceGroupName, diskName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -513,20 +511,6 @@ function _deleteMethod(resourceGroupName, diskName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -913,9 +897,7 @@ function _grantAccess(resourceGroupName, diskName, grantAccessData, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -953,20 +935,6 @@ function _revokeAccess(resourceGroupName, diskName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1483,9 +1451,7 @@ function _beginUpdate(resourceGroupName, diskName, disk, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1587,23 +1553,6 @@ function _beginDeleteMethod(resourceGroupName, diskName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1802,9 +1751,7 @@ function _beginGrantAccess(resourceGroupName, diskName, grantAccessData, options * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1906,23 +1853,6 @@ function _beginRevokeAccess(resourceGroupName, diskName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2758,7 +2688,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2798,7 +2728,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2806,9 +2736,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3121,7 +3049,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3161,7 +3089,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3169,9 +3097,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3656,7 +3582,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3696,7 +3622,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3704,9 +3630,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3859,7 +3783,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3899,7 +3823,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3907,9 +3831,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index ca51044e97..b29ecdebdb 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -20541,11 +20541,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a disk. @@ -20569,7 +20569,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20577,17 +20577,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -20796,11 +20794,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - revokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + revokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a disk. @@ -20824,7 +20822,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20832,17 +20830,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - revokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - revokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - revokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + revokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -21250,11 +21246,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a disk. @@ -21278,7 +21274,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21286,17 +21282,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -21399,11 +21393,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a disk. @@ -21427,7 +21421,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21435,17 +21429,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRevokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRevokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - beginRevokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRevokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -22039,11 +22031,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a snapshot. @@ -22067,7 +22059,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22075,17 +22067,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -22294,11 +22284,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - revokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + revokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a snapshot. @@ -22322,7 +22312,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22330,17 +22320,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - revokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - revokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - revokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + revokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -22746,11 +22734,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a snapshot. @@ -22774,7 +22762,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22782,17 +22770,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -22895,11 +22881,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a snapshot. @@ -22923,7 +22909,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22931,17 +22917,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRevokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - beginRevokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/computeManagement2/lib/operations/snapshots.js b/lib/services/computeManagement2/lib/operations/snapshots.js index 0bc6378ffd..e0c8b4bc7e 100644 --- a/lib/services/computeManagement2/lib/operations/snapshots.js +++ b/lib/services/computeManagement2/lib/operations/snapshots.js @@ -472,9 +472,7 @@ function _get(resourceGroupName, snapshotName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -512,20 +510,6 @@ function _deleteMethod(resourceGroupName, snapshotName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -912,9 +896,7 @@ function _grantAccess(resourceGroupName, snapshotName, grantAccessData, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -952,20 +934,6 @@ function _revokeAccess(resourceGroupName, snapshotName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1481,9 +1449,7 @@ function _beginUpdate(resourceGroupName, snapshotName, snapshot, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1585,23 +1551,6 @@ function _beginDeleteMethod(resourceGroupName, snapshotName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1800,9 +1749,7 @@ function _beginGrantAccess(resourceGroupName, snapshotName, grantAccessData, opt * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1904,23 +1851,6 @@ function _beginRevokeAccess(resourceGroupName, snapshotName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2754,7 +2684,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2794,7 +2724,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2802,9 +2732,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3117,7 +3045,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3157,7 +3085,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3165,9 +3093,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3650,7 +3576,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3690,7 +3616,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3698,9 +3624,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3853,7 +3777,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3893,7 +3817,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3901,9 +3825,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * From 084fd613298fec62b76f2ef3df419ae179fc5058 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 21 May 2018 21:31:00 +0000 Subject: [PATCH 10/10] Generated from fa546f92703f69fabf94f3e104282d5e8d95965e Updated the readme.md --- .../lib/computeManagementClient.d.ts | 3 - .../lib/computeManagementClient.js | 3 - .../computeManagement2/lib/models/dataDisk.js | 14 +- .../computeManagement2/lib/models/index.d.ts | 708 +--- .../computeManagement2/lib/models/index.js | 32 +- .../lib/models/logAnalyticsOperationResult.js | 45 +- .../computeManagement2/lib/models/oSDisk.js | 14 +- .../lib/models/runCommandResult.js | 47 +- .../lib/models/storageProfile.js | 15 +- .../lib/models/virtualMachine.js | 14 +- .../lib/models/virtualMachineCaptureResult.js | 44 +- .../lib/models/virtualMachineScaleSet.js | 10 +- .../models/virtualMachineScaleSetOSDisk.js | 10 +- .../virtualMachineScaleSetStorageProfile.js | 10 +- .../lib/models/virtualMachineScaleSetVM.js | 14 +- .../models/virtualMachineScaleSetVMProfile.js | 10 +- .../lib/models/virtualMachineUpdate.js | 14 +- .../lib/operations/availabilitySets.js | 41 +- .../lib/operations/images.js | 67 +- .../lib/operations/index.d.ts | 3278 +++-------------- .../lib/operations/index.js | 3 - .../lib/operations/logAnalytics.js | 4 +- .../lib/operations/operations.js | 2 +- .../lib/operations/usageOperations.js | 2 +- .../virtualMachineExtensionImages.js | 6 +- .../operations/virtualMachineExtensions.js | 63 +- .../lib/operations/virtualMachineImages.js | 10 +- .../operations/virtualMachineRunCommands.js | 4 +- .../virtualMachineScaleSetExtensions.js | 63 +- .../virtualMachineScaleSetRollingUpgrades.js | 116 +- .../operations/virtualMachineScaleSetVMs.js | 599 +-- .../lib/operations/virtualMachineScaleSets.js | 717 +--- .../lib/operations/virtualMachineSizes.js | 2 +- .../lib/operations/virtualMachines.js | 715 ++-- 34 files changed, 1411 insertions(+), 5288 deletions(-) diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index 8116fe5ac5..4894e75f99 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -54,9 +54,6 @@ export default class ComputeManagementClient extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups - galleries: operations.Galleries; - galleryImages: operations.GalleryImages; - galleryImageVersions: operations.GalleryImageVersions; operations: operations.Operations; availabilitySets: operations.AvailabilitySets; virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index 22e35b2deb..15a0e2a7d3 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -71,9 +71,6 @@ class ComputeManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } - this.galleries = new operations.Galleries(this); - this.galleryImages = new operations.GalleryImages(this); - this.galleryImageVersions = new operations.GalleryImageVersions(this); this.operations = new operations.Operations(this); this.availabilitySets = new operations.AvailabilitySets(this); this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); diff --git a/lib/services/computeManagement2/lib/models/dataDisk.js b/lib/services/computeManagement2/lib/models/dataDisk.js index 35ad8c7602..5a4e36bacb 100644 --- a/lib/services/computeManagement2/lib/models/dataDisk.js +++ b/lib/services/computeManagement2/lib/models/dataDisk.js @@ -38,13 +38,13 @@ class DataDisk { * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machine should be - * created.

Possible values are:

**Attach** This value is - * used when you are using a specialized disk to create the virtual - * machine.

**FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, - * you also use the imageReference element described above. If you are using - * a marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * created.

Possible values are:

**Attach** \u2013 This value + * is used when you are using a specialized disk to create the virtual + * machine.

**FromImage** \u2013 This value is used when you are + * using an image to create the virtual machine. If you are using a platform + * image, you also use the imageReference element described above. If you are + * using a marketplace image, you also use the plan element previously + * described. Possible values include: 'FromImage', 'Empty', 'Attach' * @member {number} [diskSizeGB] Specifies the size of an empty data disk in * gigabytes. This element can be used to overwrite the name of the disk in a * virtual machine image.

This value cannot be larger than 1023 GB diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index b844b53659..48d4654c66 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -16,461 +16,6 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; -/** - * @class - * Initializes a new instance of the GalleryIdentifier class. - * @constructor - * @member {string} [uniqueName] The unique name of the gallery - */ -export interface GalleryIdentifier { - readonly uniqueName?: string; -} - -/** - * @class - * Initializes a new instance of the Resource class. - * @constructor - * The Resource model definition. - * - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type - * @member {string} location Resource location - * @member {object} [tags] Resource tags - */ -export interface Resource extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; - location: string; - tags?: { [propertyName: string]: string }; -} - -/** - * @class - * Initializes a new instance of the Gallery class. - * @constructor - * Specifies information about the gallery that you want to create or update. - * - * @member {string} [description] The description of this gallery resource. - * @member {object} [identifier] - * @member {string} [identifier.uniqueName] The unique name of the gallery - * @member {string} [provisioningState] The current state of the gallery. The - * provisioning state, which only appears in the response. Possible values - * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - * 'Migrating' - */ -export interface Gallery extends Resource { - description?: string; - identifier?: GalleryIdentifier; - readonly provisioningState?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryImageIdentifier class. - * @constructor - * This is the gallery image identifier. - * - * @member {string} [publisher] The gallery image publisher name. - * @member {string} [offer] The gallery image offer name. - * @member {string} [sku] The gallery image sku name. - */ -export interface GalleryImageIdentifier { - publisher?: string; - offer?: string; - sku?: string; -} - -/** - * @class - * Initializes a new instance of the ResourceRange class. - * @constructor - * Describes the resource range. - * - * @member {number} [min] The minimum number of the resource. - * @member {number} [max] The maximum number of the resource. - */ -export interface ResourceRange { - min?: number; - max?: number; -} - -/** - * @class - * Initializes a new instance of the RecommendedMachineConfiguration class. - * @constructor - * Describes the recommended machine configuration. - * - * @member {object} [vCPUs] - * @member {number} [vCPUs.min] The minimum number of the resource. - * @member {number} [vCPUs.max] The maximum number of the resource. - * @member {object} [memory] - * @member {number} [memory.min] The minimum number of the resource. - * @member {number} [memory.max] The maximum number of the resource. - */ -export interface RecommendedMachineConfiguration { - vCPUs?: ResourceRange; - memory?: ResourceRange; -} - -/** - * @class - * Initializes a new instance of the Disallowed class. - * @constructor - * Describes the disallowed disk types. - * - * @member {array} [diskTypes] A list of disk types. - */ -export interface Disallowed { - diskTypes?: string[]; -} - -/** - * @class - * Initializes a new instance of the ImagePurchasePlan class. - * @constructor - * Describes the gallery image purchase plan. This is used by marketplace - * images. - * - * @member {string} [name] The plan ID. - * @member {string} [publisher] The publisher ID. - * @member {string} [product] The product ID. - */ -export interface ImagePurchasePlan { - name?: string; - publisher?: string; - product?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryImage class. - * @constructor - * Specifies information about the gallery image that you want to create or - * update. - * - * @member {string} [description] The description of this gallery image - * resource. - * @member {string} [eula] The Eula agreement for the gallery image. - * @member {string} [privacyStatementUri] The privacy statement uri. - * @member {string} [releaseNoteUri] The release note uri. - * @member {string} [osType] This property allows you to specify the type of - * the OS that is included in the disk if creating a VM from user-image or a - * specialized VHD.

Possible values are:

**Windows**

- * **Linux**. Possible values include: 'Windows', 'Linux' - * @member {string} [osState] The OS State. Possible values include: - * 'Generalized', 'Specialized' - * @member {date} [endOfLifeDate] The end of life of this gallery image. - * @member {object} [identifier] - * @member {string} [identifier.publisher] The gallery image publisher name. - * @member {string} [identifier.offer] The gallery image offer name. - * @member {string} [identifier.sku] The gallery image sku name. - * @member {object} [recommended] - * @member {object} [recommended.vCPUs] - * @member {number} [recommended.vCPUs.min] The minimum number of the resource. - * @member {number} [recommended.vCPUs.max] The maximum number of the resource. - * @member {object} [recommended.memory] - * @member {number} [recommended.memory.min] The minimum number of the - * resource. - * @member {number} [recommended.memory.max] The maximum number of the - * resource. - * @member {object} [disallowed] - * @member {array} [disallowed.diskTypes] A list of disk types. - * @member {object} [purchasePlan] - * @member {string} [purchasePlan.name] The plan ID. - * @member {string} [purchasePlan.publisher] The publisher ID. - * @member {string} [purchasePlan.product] The product ID. - * @member {string} [provisioningState] The current state of the gallery image. - * The provisioning state, which only appears in the response. Possible values - * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - * 'Migrating' - */ -export interface GalleryImage extends Resource { - description?: string; - eula?: string; - privacyStatementUri?: string; - releaseNoteUri?: string; - osType?: string; - osState?: string; - endOfLifeDate?: Date; - identifier?: GalleryImageIdentifier; - recommended?: RecommendedMachineConfiguration; - disallowed?: Disallowed; - purchasePlan?: ImagePurchasePlan; - readonly provisioningState?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryArtifactPublishingProfileBase class. - * @constructor - * Describes the basic gallery artifact publishing profile. - * - * @member {array} [regions] The regions where the artifact is going to be - * published. - * @member {object} [source] - * @member {object} [source.managedImage] - * @member {string} [source.managedImage.id] The managed artifact id. - */ -export interface GalleryArtifactPublishingProfileBase { - regions?: string[]; - source?: GalleryArtifactSource; -} - -/** - * @class - * Initializes a new instance of the GalleryImageVersionPublishingProfile class. - * @constructor - * The publishing profile of a gallery image version. - * - * @member {boolean} [excludeFromLatest] The flag means that if it is set to - * true, people deploying VMs with 'latest' as version will not use this - * version. - * @member {date} [publishedDate] The time when the gallery image version is - * published. - * @member {date} [endOfLifeDate] The end of life date of the gallery image - * version. - */ -export interface GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase { - excludeFromLatest?: boolean; - readonly publishedDate?: Date; - endOfLifeDate?: Date; -} - -/** - * @class - * Initializes a new instance of the GalleryDiskImage class. - * @constructor - * This is the disk image base class. - * - * @member {number} [sizedInGB] It indicates the size of the VHD to create. - * @member {string} [hostCaching] The host caching of the disk. Valid values - * are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' - */ -export interface GalleryDiskImage { - sizedInGB?: number; - hostCaching?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryOSDiskImage class. - * @constructor - * This is the OS disk image. - * - */ -export interface GalleryOSDiskImage extends GalleryDiskImage { -} - -/** - * @class - * Initializes a new instance of the GalleryDataDiskImage class. - * @constructor - * This is the data disk image. - * - * @member {number} [lun] Specifies the logical unit number of the data disk. - * This value is used to identify data disks within the VM and therefore must - * be unique for each data disk attached to a VM. - */ -export interface GalleryDataDiskImage extends GalleryDiskImage { - lun?: number; -} - -/** - * @class - * Initializes a new instance of the GalleryImageVersionStorageProfile class. - * @constructor - * This is the storage profile of a gallery image version. - * - * @member {object} [osDiskImage] - * @member {array} [dataDiskImages] A list of data disk images. - */ -export interface GalleryImageVersionStorageProfile { - osDiskImage?: GalleryOSDiskImage; - dataDiskImages?: GalleryDataDiskImage[]; -} - -/** - * @class - * Initializes a new instance of the RegionalReplicationStatus class. - * @constructor - * This is the regional replication status. - * - * @member {string} [region] The region where the gallery image version is - * published to. - * @member {string} [state] This is the regional replication state. Possible - * values include: 'Unknown', 'Replicating', 'Completed', 'Failed' - * @member {string} [details] The details of the replication status. - * @member {number} [progress] It indicates progress of the replication job. - */ -export interface RegionalReplicationStatus { - region?: string; - state?: string; - details?: string; - progress?: number; -} - -/** - * @class - * Initializes a new instance of the ReplicationStatus class. - * @constructor - * This is the replication status of the gallery image version. - * - * @member {string} [aggregatedState] This is the aggregated replication status - * based on the regional replication status. Possible values include: - * 'Unknown', 'InProgress', 'Completed', 'Failed' - * @member {array} [summary] This is a summary of replication status for each - * region. - */ -export interface ReplicationStatus { - aggregatedState?: string; - summary?: RegionalReplicationStatus[]; -} - -/** - * @class - * Initializes a new instance of the GalleryImageVersion class. - * @constructor - * Specifies information about the gallery image version that you want to - * create or update. - * - * @member {object} [publishingProfile] - * @member {boolean} [publishingProfile.excludeFromLatest] The flag means that - * if it is set to true, people deploying VMs with 'latest' as version will not - * use this version. - * @member {date} [publishingProfile.publishedDate] The time when the gallery - * image version is published. - * @member {date} [publishingProfile.endOfLifeDate] The end of life date of the - * gallery image version. - * @member {string} [provisioningState] The current state of the gallery image - * version. The provisioning state, which only appears in the response. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - * 'Deleting', 'Migrating' - * @member {object} [storageProfile] - * @member {object} [storageProfile.osDiskImage] - * @member {array} [storageProfile.dataDiskImages] A list of data disk images. - * @member {object} [replicationStatus] - * @member {string} [replicationStatus.aggregatedState] This is the aggregated - * replication status based on the regional replication status. Possible values - * include: 'Unknown', 'InProgress', 'Completed', 'Failed' - * @member {array} [replicationStatus.summary] This is a summary of replication - * status for each region. - */ -export interface GalleryImageVersion extends Resource { - publishingProfile?: GalleryImageVersionPublishingProfile; - readonly provisioningState?: string; - storageProfile?: GalleryImageVersionStorageProfile; - replicationStatus?: ReplicationStatus; -} - -/** - * @class - * Initializes a new instance of the ManagedArtifact class. - * @constructor - * The managed artifact. - * - * @member {string} [id] The managed artifact id. - */ -export interface ManagedArtifact { - id?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryArtifactSource class. - * @constructor - * The source of the gallery artifact. - * - * @member {object} [managedImage] - * @member {string} [managedImage.id] The managed artifact id. - */ -export interface GalleryArtifactSource { - managedImage?: ManagedArtifact; -} - -/** - * @class - * Initializes a new instance of the ApiErrorBase class. - * @constructor - * Api error base. - * - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiErrorBase { - code?: string; - target?: string; - message?: string; -} - -/** - * @class - * Initializes a new instance of the InnerError class. - * @constructor - * Inner error details. - * - * @member {string} [exceptiontype] The exception type. - * @member {string} [errordetail] The internal error message or exception dump. - */ -export interface InnerError { - exceptiontype?: string; - errordetail?: string; -} - -/** - * @class - * Initializes a new instance of the ApiError class. - * @constructor - * Api error. - * - * @member {array} [details] The Api error details - * @member {object} [innererror] The Api inner error - * @member {string} [innererror.exceptiontype] The exception type. - * @member {string} [innererror.errordetail] The internal error message or - * exception dump. - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiError { - details?: ApiErrorBase[]; - innererror?: InnerError; - code?: string; - target?: string; - message?: string; -} - -/** - * @class - * Initializes a new instance of the OperationStatusResponse class. - * @constructor - * Operation status response - * - * @member {string} [name] Operation ID - * @member {string} [status] Operation status - * @member {date} [startTime] Start time of the operation - * @member {date} [endTime] End time of the operation - * @member {object} [error] Api error - * @member {array} [error.details] The Api error details - * @member {object} [error.innererror] The Api inner error - * @member {string} [error.innererror.exceptiontype] The exception type. - * @member {string} [error.innererror.errordetail] The internal error message - * or exception dump. - * @member {string} [error.code] The error code. - * @member {string} [error.target] The target of the particular error. - * @member {string} [error.message] The error message. - */ -export interface OperationStatusResponse { - readonly name?: string; - readonly status?: string; - readonly startTime?: Date; - readonly endTime?: Date; - readonly error?: ApiError; -} - /** * @class * Initializes a new instance of the ComputeOperationValue class. @@ -545,6 +90,26 @@ export interface Sku { capacity?: number; } +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * The Resource model definition. + * + * @member {string} [id] Resource Id + * @member {string} [name] Resource name + * @member {string} [type] Resource type + * @member {string} location Resource location + * @member {object} [tags] Resource tags + */ +export interface Resource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; + location: string; + tags?: { [propertyName: string]: string }; +} + /** * @class * Initializes a new instance of the AvailabilitySet class. @@ -928,12 +493,19 @@ export interface VirtualMachineCaptureParameters { * @class * Initializes a new instance of the VirtualMachineCaptureResult class. * @constructor - * Resource Id. + * Output of virtual machine capture operation. * - * @member {object} [output] Operation output data (raw JSON) + * @member {string} [schema] the schema of the captured virtual machine + * @member {string} [contentVersion] the version of the content + * @member {object} [parameters] parameters of the captured virtual machine + * @member {array} [resources] a list of resource items of the captured virtual + * machine */ export interface VirtualMachineCaptureResult extends SubResource { - output?: any; + readonly schema?: string; + readonly contentVersion?: string; + readonly parameters?: any; + readonly resources?: any[]; } /** @@ -1191,13 +763,13 @@ export interface ManagedDiskParameters extends SubResource { * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machine should be - * created.

Possible values are:

**Attach** This value is used - * when you are using a specialized disk to create the virtual machine.

- * **FromImage** This value is used when you are using an image to create the - * virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace - * image, you also use the plan element previously described. Possible values - * include: 'FromImage', 'Empty', 'Attach' + * created.

Possible values are:

**Attach** \u2013 This value + * is used when you are using a specialized disk to create the virtual + * machine.

**FromImage** \u2013 This value is used when you are using + * an image to create the virtual machine. If you are using a platform image, + * you also use the imageReference element described above. If you are using a + * marketplace image, you also use the plan element previously described. + * Possible values include: 'FromImage', 'Empty', 'Attach' * @member {number} [diskSizeGB] Specifies the size of an empty data disk in * gigabytes. This element can be used to overwrite the name of the disk in a * virtual machine image.

This value cannot be larger than 1023 GB @@ -1243,13 +815,13 @@ export interface OSDisk { * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machine should be - * created.

Possible values are:

**Attach** This value is used - * when you are using a specialized disk to create the virtual machine.

- * **FromImage** This value is used when you are using an image to create the - * virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace - * image, you also use the plan element previously described. Possible values - * include: 'FromImage', 'Empty', 'Attach' + * created.

Possible values are:

**Attach** \u2013 This value + * is used when you are using a specialized disk to create the virtual + * machine.

**FromImage** \u2013 This value is used when you are using + * an image to create the virtual machine. If you are using a platform image, + * you also use the imageReference element described above. If you are using a + * marketplace image, you also use the plan element previously described. + * Possible values include: 'FromImage', 'Empty', 'Attach' * @member {number} [diskSizeGB] Specifies the size of an empty data disk in * gigabytes. This element can be used to overwrite the name of the disk in a * virtual machine image.

This value cannot be larger than 1023 GB @@ -1336,13 +908,13 @@ export interface DataDisk { * @member {boolean} [osDisk.writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} [osDisk.createOption] Specifies how the virtual machine - * should be created.

Possible values are:

**Attach** This - * value is used when you are using a specialized disk to create the virtual - * machine.

**FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, you - * also use the imageReference element described above. If you are using a - * marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * should be created.

Possible values are:

**Attach** \u2013 + * This value is used when you are using a specialized disk to create the + * virtual machine.

**FromImage** \u2013 This value is used when you + * are using an image to create the virtual machine. If you are using a + * platform image, you also use the imageReference element described above. If + * you are using a marketplace image, you also use the plan element previously + * described. Possible values include: 'FromImage', 'Empty', 'Attach' * @member {number} [osDisk.diskSizeGB] Specifies the size of an empty data * disk in gigabytes. This element can be used to overwrite the name of the * disk in a virtual machine image.

This value cannot be larger than @@ -2069,12 +1641,13 @@ export interface VirtualMachineInstanceView { * whether writeAccelerator should be enabled or disabled on the disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of an * empty data disk in gigabytes. This element can be used to overwrite the name * of the disk in a virtual machine image.

This value cannot be larger @@ -2455,12 +2028,13 @@ export interface VirtualMachine extends Resource { * whether writeAccelerator should be enabled or disabled on the disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of an * empty data disk in gigabytes. This element can be used to overwrite the name * of the disk in a virtual machine image.

This value cannot be larger @@ -3203,9 +2777,9 @@ export interface VirtualMachineScaleSetManagedDiskParameters { * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machines in the * scale set should be created.

The only allowed value is: - * **FromImage** This value is used when you are using an image to create the - * virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace + * **FromImage** \u2013 This value is used when you are using an image to + * create the virtual machine. If you are using a platform image, you also use + * the imageReference element described above. If you are using a marketplace * image, you also use the plan element previously described. Possible values * include: 'FromImage', 'Empty', 'Attach' * @member {string} [osType] This property allows you to specify the type of @@ -3336,9 +2910,9 @@ export interface VirtualMachineScaleSetDataDisk { * writeAccelerator should be enabled or disabled on the disk. * @member {string} [osDisk.createOption] Specifies how the virtual machines in * the scale set should be created.

The only allowed value is: - * **FromImage** This value is used when you are using an image to create the - * virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace + * **FromImage** \u2013 This value is used when you are using an image to + * create the virtual machine. If you are using a platform image, you also use + * the imageReference element described above. If you are using a marketplace * image, you also use the plan element previously described. Possible values * include: 'FromImage', 'Empty', 'Attach' * @member {string} [osDisk.osType] This property allows you to specify the @@ -3865,9 +3439,9 @@ export interface VirtualMachineScaleSetExtensionProfile { * whether writeAccelerator should be enabled or disabled on the disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machines in the scale set should be created.

The only - * allowed value is: **FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, you - * also use the imageReference element described above. If you are using a + * allowed value is: **FromImage** \u2013 This value is used when you are using + * an image to create the virtual machine. If you are using a platform image, + * you also use the imageReference element described above. If you are using a * marketplace image, you also use the plan element previously described. * Possible values include: 'FromImage', 'Empty', 'Attach' * @member {string} [storageProfile.osDisk.osType] This property allows you to @@ -4248,12 +3822,12 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * disk. * @member {string} [virtualMachineProfile.storageProfile.osDisk.createOption] * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * @member {string} [virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the * disk if creating a VM from user-image or a specialized VHD.

@@ -4717,6 +4291,59 @@ export interface VirtualMachineScaleSetSku { readonly capacity?: VirtualMachineScaleSetSkuCapacity; } +/** + * @class + * Initializes a new instance of the ApiErrorBase class. + * @constructor + * Api error base. + * + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. + */ +export interface ApiErrorBase { + code?: string; + target?: string; + message?: string; +} + +/** + * @class + * Initializes a new instance of the InnerError class. + * @constructor + * Inner error details. + * + * @member {string} [exceptiontype] The exception type. + * @member {string} [errordetail] The internal error message or exception dump. + */ +export interface InnerError { + exceptiontype?: string; + errordetail?: string; +} + +/** + * @class + * Initializes a new instance of the ApiError class. + * @constructor + * Api error. + * + * @member {array} [details] The Api error details + * @member {object} [innererror] The Api inner error + * @member {string} [innererror.exceptiontype] The exception type. + * @member {string} [innererror.errordetail] The internal error message or + * exception dump. + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. + */ +export interface ApiError { + details?: ApiErrorBase[]; + innererror?: InnerError; + code?: string; + target?: string; + message?: string; +} + /** * @class * Initializes a new instance of the RollbackStatusInfo class. @@ -5153,12 +4780,13 @@ export interface UpgradeOperationHistoricalStatusInfo { * whether writeAccelerator should be enabled or disabled on the disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of an * empty data disk in gigabytes. This element can be used to overwrite the name * of the disk in a virtual machine image.

This value cannot be larger @@ -5500,18 +5128,6 @@ export interface RollingUpgradeStatusInfo extends Resource { readonly error?: ApiError; } -/** - * @class - * Initializes a new instance of the ComputeLongRunningOperationProperties class. - * @constructor - * Compute-specific operation properties, including output - * - * @member {object} [output] Operation output data (raw JSON) - */ -export interface ComputeLongRunningOperationProperties { - output?: any; -} - /** * @class * Initializes a new instance of the RecoveryWalkResponse class. @@ -5598,7 +5214,7 @@ export interface LogAnalyticsOutput { * @member {object} [properties] LogAnalyticsOutput * @member {string} [properties.output] Output file Uri path to blob container. */ -export interface LogAnalyticsOperationResult extends OperationStatusResponse { +export interface LogAnalyticsOperationResult { readonly properties?: LogAnalyticsOutput; } @@ -5696,7 +5312,7 @@ export interface RunCommandDocument extends RunCommandDocumentBase { * * @member {object} [output] Operation output data (raw JSON) */ -export interface RunCommandResult extends OperationStatusResponse { +export interface RunCommandResult { output?: any; } @@ -6537,46 +6153,6 @@ export interface ContainerService extends Resource { } -/** - * @class - * Initializes a new instance of the GalleryList class. - * @constructor - * The List Galleries operation response. - * - * @member {string} [nextLink] The uri to fetch the next page of galleries. - * Call ListNext() with this to fetch the next page of galleries. - */ -export interface GalleryList extends Array { - nextLink?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryImageList class. - * @constructor - * The List Gallery Images operation response. - * - * @member {string} [nextLink] The uri to fetch the next page of gallery - * images. Call ListNext() with this to fetch the next page of gallery images. - */ -export interface GalleryImageList extends Array { - nextLink?: string; -} - -/** - * @class - * Initializes a new instance of the GalleryImageVersionList class. - * @constructor - * The List Gallery Image version operation response. - * - * @member {string} [nextLink] The uri to fetch the next page of gallery image - * versions. Call ListNext() with this to fetch the next page of gallery image - * versions. - */ -export interface GalleryImageVersionList extends Array { - nextLink?: string; -} - /** * @class * Initializes a new instance of the ComputeOperationListResult class. diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index f8e15f6ed5..8a8cb4a449 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -18,34 +18,11 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; -exports.GalleryIdentifier = require('./galleryIdentifier'); -exports.Resource = require('./resource'); -exports.Gallery = require('./gallery'); -exports.GalleryImageIdentifier = require('./galleryImageIdentifier'); -exports.ResourceRange = require('./resourceRange'); -exports.RecommendedMachineConfiguration = require('./recommendedMachineConfiguration'); -exports.Disallowed = require('./disallowed'); -exports.ImagePurchasePlan = require('./imagePurchasePlan'); -exports.GalleryImage = require('./galleryImage'); -exports.GalleryArtifactPublishingProfileBase = require('./galleryArtifactPublishingProfileBase'); -exports.GalleryImageVersionPublishingProfile = require('./galleryImageVersionPublishingProfile'); -exports.GalleryDiskImage = require('./galleryDiskImage'); -exports.GalleryOSDiskImage = require('./galleryOSDiskImage'); -exports.GalleryDataDiskImage = require('./galleryDataDiskImage'); -exports.GalleryImageVersionStorageProfile = require('./galleryImageVersionStorageProfile'); -exports.RegionalReplicationStatus = require('./regionalReplicationStatus'); -exports.ReplicationStatus = require('./replicationStatus'); -exports.GalleryImageVersion = require('./galleryImageVersion'); -exports.ManagedArtifact = require('./managedArtifact'); -exports.GalleryArtifactSource = require('./galleryArtifactSource'); -exports.ApiErrorBase = require('./apiErrorBase'); -exports.InnerError = require('./innerError'); -exports.ApiError = require('./apiError'); -exports.OperationStatusResponse = require('./operationStatusResponse'); exports.ComputeOperationValue = require('./computeOperationValue'); exports.InstanceViewStatus = require('./instanceViewStatus'); exports.SubResource = require('./subResource'); exports.Sku = require('./sku'); +exports.Resource = require('./resource'); exports.AvailabilitySet = require('./availabilitySet'); exports.UpdateResource = require('./updateResource'); exports.AvailabilitySetUpdate = require('./availabilitySetUpdate'); @@ -141,6 +118,9 @@ exports.VirtualMachineScaleSetVMExtensionsSummary = require('./virtualMachineSca exports.VirtualMachineScaleSetInstanceView = require('./virtualMachineScaleSetInstanceView'); exports.VirtualMachineScaleSetSkuCapacity = require('./virtualMachineScaleSetSkuCapacity'); exports.VirtualMachineScaleSetSku = require('./virtualMachineScaleSetSku'); +exports.ApiErrorBase = require('./apiErrorBase'); +exports.InnerError = require('./innerError'); +exports.ApiError = require('./apiError'); exports.RollbackStatusInfo = require('./rollbackStatusInfo'); exports.UpgradeOperationHistoryStatus = require('./upgradeOperationHistoryStatus'); exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo'); @@ -151,7 +131,6 @@ exports.VirtualMachineHealthStatus = require('./virtualMachineHealthStatus'); exports.VirtualMachineScaleSetVMInstanceView = require('./virtualMachineScaleSetVMInstanceView'); exports.RollingUpgradeRunningStatus = require('./rollingUpgradeRunningStatus'); exports.RollingUpgradeStatusInfo = require('./rollingUpgradeStatusInfo'); -exports.ComputeLongRunningOperationProperties = require('./computeLongRunningOperationProperties'); exports.RecoveryWalkResponse = require('./recoveryWalkResponse'); exports.LogAnalyticsInputBase = require('./logAnalyticsInputBase'); exports.RequestRateByIntervalInput = require('./requestRateByIntervalInput'); @@ -198,9 +177,6 @@ exports.ContainerServiceLinuxProfile = require('./containerServiceLinuxProfile') exports.ContainerServiceVMDiagnostics = require('./containerServiceVMDiagnostics'); exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnosticsProfile'); exports.ContainerService = require('./containerService'); -exports.GalleryList = require('./galleryList'); -exports.GalleryImageList = require('./galleryImageList'); -exports.GalleryImageVersionList = require('./galleryImageVersionList'); exports.ComputeOperationListResult = require('./computeOperationListResult'); exports.AvailabilitySetListResult = require('./availabilitySetListResult'); exports.VirtualMachineSizeListResult = require('./virtualMachineSizeListResult'); diff --git a/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js b/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js index 0bc73509e1..74be807688 100644 --- a/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js +++ b/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js @@ -15,9 +15,8 @@ const models = require('./index'); /** * LogAnalytics operation status response * - * @extends models['OperationStatusResponse'] */ -class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { +class LogAnalyticsOperationResult { /** * Create a LogAnalyticsOperationResult. * @member {object} [properties] LogAnalyticsOutput @@ -25,7 +24,6 @@ class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { * container. */ constructor() { - super(); } /** @@ -42,47 +40,6 @@ class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { name: 'Composite', className: 'LogAnalyticsOperationResult', modelProperties: { - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - status: { - required: false, - readOnly: true, - serializedName: 'status', - type: { - name: 'String' - } - }, - startTime: { - required: false, - readOnly: true, - serializedName: 'startTime', - type: { - name: 'DateTime' - } - }, - endTime: { - required: false, - readOnly: true, - serializedName: 'endTime', - type: { - name: 'DateTime' - } - }, - error: { - required: false, - readOnly: true, - serializedName: 'error', - type: { - name: 'Composite', - className: 'ApiError' - } - }, properties: { required: false, readOnly: true, diff --git a/lib/services/computeManagement2/lib/models/oSDisk.js b/lib/services/computeManagement2/lib/models/oSDisk.js index ef1de61c3a..bf576f1740 100644 --- a/lib/services/computeManagement2/lib/models/oSDisk.js +++ b/lib/services/computeManagement2/lib/models/oSDisk.js @@ -62,13 +62,13 @@ class OSDisk { * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machine should be - * created.

Possible values are:

**Attach** This value is - * used when you are using a specialized disk to create the virtual - * machine.

**FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, - * you also use the imageReference element described above. If you are using - * a marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * created.

Possible values are:

**Attach** \u2013 This value + * is used when you are using a specialized disk to create the virtual + * machine.

**FromImage** \u2013 This value is used when you are + * using an image to create the virtual machine. If you are using a platform + * image, you also use the imageReference element described above. If you are + * using a marketplace image, you also use the plan element previously + * described. Possible values include: 'FromImage', 'Empty', 'Attach' * @member {number} [diskSizeGB] Specifies the size of an empty data disk in * gigabytes. This element can be used to overwrite the name of the disk in a * virtual machine image.

This value cannot be larger than 1023 GB diff --git a/lib/services/computeManagement2/lib/models/runCommandResult.js b/lib/services/computeManagement2/lib/models/runCommandResult.js index f23a7d1b8c..e279a76461 100644 --- a/lib/services/computeManagement2/lib/models/runCommandResult.js +++ b/lib/services/computeManagement2/lib/models/runCommandResult.js @@ -10,20 +10,16 @@ 'use strict'; -const models = require('./index'); - /** * Run command operation response. * - * @extends models['OperationStatusResponse'] */ -class RunCommandResult extends models['OperationStatusResponse'] { +class RunCommandResult { /** * Create a RunCommandResult. * @member {object} [output] Operation output data (raw JSON) */ constructor() { - super(); } /** @@ -40,47 +36,6 @@ class RunCommandResult extends models['OperationStatusResponse'] { name: 'Composite', className: 'RunCommandResult', modelProperties: { - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - status: { - required: false, - readOnly: true, - serializedName: 'status', - type: { - name: 'String' - } - }, - startTime: { - required: false, - readOnly: true, - serializedName: 'startTime', - type: { - name: 'DateTime' - } - }, - endTime: { - required: false, - readOnly: true, - serializedName: 'endTime', - type: { - name: 'DateTime' - } - }, - error: { - required: false, - readOnly: true, - serializedName: 'error', - type: { - name: 'Composite', - className: 'ApiError' - } - }, output: { required: false, serializedName: 'properties.output', diff --git a/lib/services/computeManagement2/lib/models/storageProfile.js b/lib/services/computeManagement2/lib/models/storageProfile.js index 1d7cde3559..38b108fcd0 100644 --- a/lib/services/computeManagement2/lib/models/storageProfile.js +++ b/lib/services/computeManagement2/lib/models/storageProfile.js @@ -80,13 +80,14 @@ class StorageProfile { * @member {boolean} [osDisk.writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. * @member {string} [osDisk.createOption] Specifies how the virtual machine - * should be created.

Possible values are:

**Attach** This - * value is used when you are using a specialized disk to create the virtual - * machine.

**FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, - * you also use the imageReference element described above. If you are using - * a marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * should be created.

Possible values are:

**Attach** \u2013 + * This value is used when you are using a specialized disk to create the + * virtual machine.

**FromImage** \u2013 This value is used when you + * are using an image to create the virtual machine. If you are using a + * platform image, you also use the imageReference element described above. + * If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * @member {number} [osDisk.diskSizeGB] Specifies the size of an empty data * disk in gigabytes. This element can be used to overwrite the name of the * disk in a virtual machine image.

This value cannot be larger than diff --git a/lib/services/computeManagement2/lib/models/virtualMachine.js b/lib/services/computeManagement2/lib/models/virtualMachine.js index 021ab3369e..dfb237a362 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachine.js +++ b/lib/services/computeManagement2/lib/models/virtualMachine.js @@ -172,13 +172,13 @@ class VirtualMachine extends models['Resource'] { * disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan + * element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of * an empty data disk in gigabytes. This element can be used to overwrite the * name of the disk in a virtual machine image.

This value cannot be diff --git a/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js b/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js index 82d3ef372b..67facb1d8a 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js @@ -13,14 +13,18 @@ const models = require('./index'); /** - * Resource Id. + * Output of virtual machine capture operation. * * @extends models['SubResource'] */ class VirtualMachineCaptureResult extends models['SubResource'] { /** * Create a VirtualMachineCaptureResult. - * @member {object} [output] Operation output data (raw JSON) + * @member {string} [schema] the schema of the captured virtual machine + * @member {string} [contentVersion] the version of the content + * @member {object} [parameters] parameters of the captured virtual machine + * @member {array} [resources] a list of resource items of the captured + * virtual machine */ constructor() { super(); @@ -47,12 +51,44 @@ class VirtualMachineCaptureResult extends models['SubResource'] { name: 'String' } }, - output: { + schema: { required: false, - serializedName: 'properties.output', + readOnly: true, + serializedName: '$schema', + type: { + name: 'String' + } + }, + contentVersion: { + required: false, + readOnly: true, + serializedName: 'contentVersion', + type: { + name: 'String' + } + }, + parameters: { + required: false, + readOnly: true, + serializedName: 'parameters', type: { name: 'Object' } + }, + resources: { + required: false, + readOnly: true, + serializedName: 'resources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js index ec71b2c23b..601e8f504c 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js @@ -217,11 +217,11 @@ class VirtualMachineScaleSet extends models['Resource'] { * @member {string} * [virtualMachineProfile.storageProfile.osDisk.createOption] Specifies how * the virtual machines in the scale set should be created.

The only - * allowed value is: **FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, - * you also use the imageReference element described above. If you are using - * a marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * allowed value is: **FromImage** \u2013 This value is used when you are + * using an image to create the virtual machine. If you are using a platform + * image, you also use the imageReference element described above. If you are + * using a marketplace image, you also use the plan element previously + * described. Possible values include: 'FromImage', 'Empty', 'Attach' * @member {string} [virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the * disk if creating a VM from user-image or a specialized VHD.

diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js index f53cfd7fe7..737b7c9db1 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js @@ -29,11 +29,11 @@ class VirtualMachineScaleSetOSDisk { * writeAccelerator should be enabled or disabled on the disk. * @member {string} createOption Specifies how the virtual machines in the * scale set should be created.

The only allowed value is: - * **FromImage** This value is used when you are using an image to create - * the virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace - * image, you also use the plan element previously described. Possible - * values include: 'FromImage', 'Empty', 'Attach' + * **FromImage** \u2013 This value is used when you are using an image to + * create the virtual machine. If you are using a platform image, you also + * use the imageReference element described above. If you are using a + * marketplace image, you also use the plan element previously described. + * Possible values include: 'FromImage', 'Empty', 'Attach' * @member {string} [osType] This property allows you to specify the type of * the OS that is included in the disk if creating a VM from user-image or a * specialized VHD.

Possible values are:

**Windows** diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js index d10d24ff7f..b8ab9a175b 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js @@ -49,11 +49,11 @@ class VirtualMachineScaleSetStorageProfile { * writeAccelerator should be enabled or disabled on the disk. * @member {string} [osDisk.createOption] Specifies how the virtual machines * in the scale set should be created.

The only allowed value is: - * **FromImage** This value is used when you are using an image to create - * the virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace - * image, you also use the plan element previously described. Possible - * values include: 'FromImage', 'Empty', 'Attach' + * **FromImage** \u2013 This value is used when you are using an image to + * create the virtual machine. If you are using a platform image, you also + * use the imageReference element described above. If you are using a + * marketplace image, you also use the plan element previously described. + * Possible values include: 'FromImage', 'Empty', 'Attach' * @member {string} [osDisk.osType] This property allows you to specify the * type of the OS that is included in the disk if creating a VM from * user-image or a specialized VHD.

Possible values are:

diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js index 74cfa7f752..7b9e19dea1 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js @@ -228,13 +228,13 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan + * element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of * an empty data disk in gigabytes. This element can be used to overwrite the * name of the disk in a virtual machine image.

This value cannot be diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js index 22bedcae0e..c0ee43dd34 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js @@ -132,11 +132,11 @@ class VirtualMachineScaleSetVMProfile { * disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machines in the scale set should be created.

The only - * allowed value is: **FromImage** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, - * you also use the imageReference element described above. If you are using - * a marketplace image, you also use the plan element previously described. - * Possible values include: 'FromImage', 'Empty', 'Attach' + * allowed value is: **FromImage** \u2013 This value is used when you are + * using an image to create the virtual machine. If you are using a platform + * image, you also use the imageReference element described above. If you are + * using a marketplace image, you also use the plan element previously + * described. Possible values include: 'FromImage', 'Empty', 'Attach' * @member {string} [storageProfile.osDisk.osType] This property allows you * to specify the type of the OS that is included in the disk if creating a * VM from user-image or a specialized VHD.

Possible values are: diff --git a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js index a04666a880..c3aa49a406 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js @@ -172,13 +172,13 @@ class VirtualMachineUpdate extends models['UpdateResource'] { * disk. * @member {string} [storageProfile.osDisk.createOption] Specifies how the * virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan + * element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of * an empty data disk in gigabytes. This element can be used to overwrite the * name of the disk in a virtual machine image.

This value cannot be diff --git a/lib/services/computeManagement2/lib/operations/availabilitySets.js b/lib/services/computeManagement2/lib/operations/availabilitySets.js index 292da5c63a..d2d6a7b712 100644 --- a/lib/services/computeManagement2/lib/operations/availabilitySets.js +++ b/lib/services/computeManagement2/lib/operations/availabilitySets.js @@ -74,7 +74,7 @@ function _createOrUpdate(resourceGroupName, availabilitySetName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -257,7 +257,7 @@ function _update(resourceGroupName, availabilitySetName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -400,9 +400,7 @@ function _update(resourceGroupName, availabilitySetName, parameters, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -418,7 +416,7 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -504,23 +502,6 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -561,7 +542,7 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -703,7 +684,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -844,7 +825,7 @@ function _listAvailableSizes(resourceGroupName, availabilitySetName, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1250,7 +1231,7 @@ class AvailabilitySets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1287,7 +1268,7 @@ class AvailabilitySets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1295,9 +1276,7 @@ class AvailabilitySets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/images.js b/lib/services/computeManagement2/lib/operations/images.js index 27ee1a0181..cc3a456cba 100644 --- a/lib/services/computeManagement2/lib/operations/images.js +++ b/lib/services/computeManagement2/lib/operations/images.js @@ -313,9 +313,7 @@ function _update(resourceGroupName, imageName, parameters, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -353,20 +351,6 @@ function _deleteMethod(resourceGroupName, imageName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -412,7 +396,7 @@ function _get(resourceGroupName, imageName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -559,7 +543,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -696,7 +680,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -894,7 +878,7 @@ function _beginCreateOrUpdate(resourceGroupName, imageName, parameters, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1132,7 +1116,7 @@ function _beginUpdate(resourceGroupName, imageName, parameters, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1292,9 +1276,7 @@ function _beginUpdate(resourceGroupName, imageName, parameters, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1310,7 +1292,7 @@ function _beginDeleteMethod(resourceGroupName, imageName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1396,23 +1378,6 @@ function _beginDeleteMethod(resourceGroupName, imageName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2129,7 +2094,7 @@ class Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2166,7 +2131,7 @@ class Images { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2174,9 +2139,7 @@ class Images { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2892,7 +2855,7 @@ class Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2929,7 +2892,7 @@ class Images { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2937,9 +2900,7 @@ class Images { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index b29ecdebdb..dd345e1f9b 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -12,1962 +12,6 @@ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationRes import * as models from '../models'; -/** - * @class - * Galleries - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface Galleries { - - - /** - * Create or update a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} gallery Parameters supplied to the create or update gallery - * operation. - * - * @param {string} [gallery.description] The description of this gallery - * resource. - * - * @param {object} [gallery.identifier] - * - * @param {string} gallery.location Resource location - * - * @param {object} [gallery.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} gallery Parameters supplied to the create or update gallery - * operation. - * - * @param {string} [gallery.description] The description of this gallery - * resource. - * - * @param {object} [gallery.identifier] - * - * @param {string} gallery.location Resource location - * - * @param {object} [gallery.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Gallery} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Gallery} [result] - The deserialized result object if an error did not occur. - * See {@link Gallery} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Retrieves information about a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves information about a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Gallery} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Gallery} [result] - The deserialized result object if an error did not occur. - * See {@link Gallery} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List galleries under a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List galleries under a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List galleries under a subscription. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List galleries under a subscription. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Create or update a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} gallery Parameters supplied to the create or update gallery - * operation. - * - * @param {string} [gallery.description] The description of this gallery - * resource. - * - * @param {object} [gallery.identifier] - * - * @param {string} gallery.location Resource location - * - * @param {object} [gallery.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} gallery Parameters supplied to the create or update gallery - * operation. - * - * @param {string} [gallery.description] The description of this gallery - * resource. - * - * @param {object} [gallery.identifier] - * - * @param {string} gallery.location Resource location - * - * @param {object} [gallery.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Gallery} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Gallery} [result] - The deserialized result object if an error did not occur. - * See {@link Gallery} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: models.Gallery, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List galleries under a resource group. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List galleries under a resource group. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List galleries under a subscription. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List galleries under a subscription. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * GalleryImages - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface GalleryImages { - - - /** - * Create or update a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} galleryImage Parameters supplied to the create or update - * gallery image operation. - * - * @param {string} [galleryImage.description] The description of this gallery - * image resource. - * - * @param {string} [galleryImage.eula] The Eula agreement for the gallery - * image. - * - * @param {string} [galleryImage.privacyStatementUri] The privacy statement - * uri. - * - * @param {string} [galleryImage.releaseNoteUri] The release note uri. - * - * @param {string} [galleryImage.osType] This property allows you to specify - * the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD.

Possible values are:

- * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} [galleryImage.osState] The OS State. Possible values - * include: 'Generalized', 'Specialized' - * - * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery - * image. - * - * @param {object} [galleryImage.identifier] - * - * @param {string} [galleryImage.identifier.publisher] The gallery image - * publisher name. - * - * @param {string} [galleryImage.identifier.offer] The gallery image offer - * name. - * - * @param {string} [galleryImage.identifier.sku] The gallery image sku name. - * - * @param {object} [galleryImage.recommended] - * - * @param {object} [galleryImage.recommended.vCPUs] - * - * @param {object} [galleryImage.recommended.memory] - * - * @param {number} [galleryImage.recommended.memory.min] The minimum number of - * the resource. - * - * @param {number} [galleryImage.recommended.memory.max] The maximum number of - * the resource. - * - * @param {object} [galleryImage.disallowed] - * - * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. - * - * @param {object} [galleryImage.purchasePlan] - * - * @param {string} [galleryImage.purchasePlan.name] The plan ID. - * - * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. - * - * @param {string} [galleryImage.purchasePlan.product] The product ID. - * - * @param {string} galleryImage.location Resource location - * - * @param {object} [galleryImage.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} galleryImage Parameters supplied to the create or update - * gallery image operation. - * - * @param {string} [galleryImage.description] The description of this gallery - * image resource. - * - * @param {string} [galleryImage.eula] The Eula agreement for the gallery - * image. - * - * @param {string} [galleryImage.privacyStatementUri] The privacy statement - * uri. - * - * @param {string} [galleryImage.releaseNoteUri] The release note uri. - * - * @param {string} [galleryImage.osType] This property allows you to specify - * the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD.

Possible values are:

- * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} [galleryImage.osState] The OS State. Possible values - * include: 'Generalized', 'Specialized' - * - * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery - * image. - * - * @param {object} [galleryImage.identifier] - * - * @param {string} [galleryImage.identifier.publisher] The gallery image - * publisher name. - * - * @param {string} [galleryImage.identifier.offer] The gallery image offer - * name. - * - * @param {string} [galleryImage.identifier.sku] The gallery image sku name. - * - * @param {object} [galleryImage.recommended] - * - * @param {object} [galleryImage.recommended.vCPUs] - * - * @param {object} [galleryImage.recommended.memory] - * - * @param {number} [galleryImage.recommended.memory.min] The minimum number of - * the resource. - * - * @param {number} [galleryImage.recommended.memory.max] The maximum number of - * the resource. - * - * @param {object} [galleryImage.disallowed] - * - * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. - * - * @param {object} [galleryImage.purchasePlan] - * - * @param {string} [galleryImage.purchasePlan.name] The plan ID. - * - * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. - * - * @param {string} [galleryImage.purchasePlan.product] The product ID. - * - * @param {string} galleryImage.location Resource location - * - * @param {object} [galleryImage.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImage} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImage} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImage} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Retrieves information about a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves information about a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImage} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImage} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImage} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List gallery images under a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listGalleryImagesByGalleryWithHttpOperationResponse(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List gallery images under a gallery. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, callback: ServiceCallback): void; - listGalleryImagesByGallery(resourceGroupName: string, galleryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Create or update a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} galleryImage Parameters supplied to the create or update - * gallery image operation. - * - * @param {string} [galleryImage.description] The description of this gallery - * image resource. - * - * @param {string} [galleryImage.eula] The Eula agreement for the gallery - * image. - * - * @param {string} [galleryImage.privacyStatementUri] The privacy statement - * uri. - * - * @param {string} [galleryImage.releaseNoteUri] The release note uri. - * - * @param {string} [galleryImage.osType] This property allows you to specify - * the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD.

Possible values are:

- * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} [galleryImage.osState] The OS State. Possible values - * include: 'Generalized', 'Specialized' - * - * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery - * image. - * - * @param {object} [galleryImage.identifier] - * - * @param {string} [galleryImage.identifier.publisher] The gallery image - * publisher name. - * - * @param {string} [galleryImage.identifier.offer] The gallery image offer - * name. - * - * @param {string} [galleryImage.identifier.sku] The gallery image sku name. - * - * @param {object} [galleryImage.recommended] - * - * @param {object} [galleryImage.recommended.vCPUs] - * - * @param {object} [galleryImage.recommended.memory] - * - * @param {number} [galleryImage.recommended.memory.min] The minimum number of - * the resource. - * - * @param {number} [galleryImage.recommended.memory.max] The maximum number of - * the resource. - * - * @param {object} [galleryImage.disallowed] - * - * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. - * - * @param {object} [galleryImage.purchasePlan] - * - * @param {string} [galleryImage.purchasePlan.name] The plan ID. - * - * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. - * - * @param {string} [galleryImage.purchasePlan.product] The product ID. - * - * @param {string} galleryImage.location Resource location - * - * @param {object} [galleryImage.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} galleryImage Parameters supplied to the create or update - * gallery image operation. - * - * @param {string} [galleryImage.description] The description of this gallery - * image resource. - * - * @param {string} [galleryImage.eula] The Eula agreement for the gallery - * image. - * - * @param {string} [galleryImage.privacyStatementUri] The privacy statement - * uri. - * - * @param {string} [galleryImage.releaseNoteUri] The release note uri. - * - * @param {string} [galleryImage.osType] This property allows you to specify - * the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD.

Possible values are:

- * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} [galleryImage.osState] The OS State. Possible values - * include: 'Generalized', 'Specialized' - * - * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery - * image. - * - * @param {object} [galleryImage.identifier] - * - * @param {string} [galleryImage.identifier.publisher] The gallery image - * publisher name. - * - * @param {string} [galleryImage.identifier.offer] The gallery image offer - * name. - * - * @param {string} [galleryImage.identifier.sku] The gallery image sku name. - * - * @param {object} [galleryImage.recommended] - * - * @param {object} [galleryImage.recommended.vCPUs] - * - * @param {object} [galleryImage.recommended.memory] - * - * @param {number} [galleryImage.recommended.memory.min] The minimum number of - * the resource. - * - * @param {number} [galleryImage.recommended.memory.max] The maximum number of - * the resource. - * - * @param {object} [galleryImage.disallowed] - * - * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. - * - * @param {object} [galleryImage.purchasePlan] - * - * @param {string} [galleryImage.purchasePlan.name] The plan ID. - * - * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. - * - * @param {string} [galleryImage.purchasePlan.product] The product ID. - * - * @param {string} galleryImage.location Resource location - * - * @param {object} [galleryImage.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImage} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImage} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImage} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: models.GalleryImage, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List gallery images under a gallery. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listGalleryImagesByGalleryNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List gallery images under a gallery. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageList} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listGalleryImagesByGalleryNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImagesByGalleryNext(nextPageLink: string, callback: ServiceCallback): void; - listGalleryImagesByGalleryNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * GalleryImageVersions - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface GalleryImageVersions { - - - /** - * Create or update a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} galleryImageVersion Parameters supplied to the create or - * update gallery image version operation. - * - * @param {object} [galleryImageVersion.publishingProfile] - * - * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] - * The flag means that if it is set to true, people deploying VMs with 'latest' - * as version will not use this version. - * - * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end - * of life date of the gallery image version. - * - * @param {array} [galleryImageVersion.publishingProfile.regions] The regions - * where the artifact is going to be published. - * - * @param {object} [galleryImageVersion.publishingProfile.source] - * - * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] - * - * @param {string} - * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed - * artifact id. - * - * @param {object} [galleryImageVersion.storageProfile] - * - * @param {object} [galleryImageVersion.storageProfile.osDiskImage] - * - * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] - * It indicates the size of the VHD to create. - * - * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] - * The host caching of the disk. Valid values are 'None', 'ReadOnly', and - * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * - * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of - * data disk images. - * - * @param {object} [galleryImageVersion.replicationStatus] - * - * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This - * is the aggregated replication status based on the regional replication - * status. Possible values include: 'Unknown', 'InProgress', 'Completed', - * 'Failed' - * - * @param {array} [galleryImageVersion.replicationStatus.summary] This is a - * summary of replication status for each region. - * - * @param {string} galleryImageVersion.location Resource location - * - * @param {object} [galleryImageVersion.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} galleryImageVersion Parameters supplied to the create or - * update gallery image version operation. - * - * @param {object} [galleryImageVersion.publishingProfile] - * - * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] - * The flag means that if it is set to true, people deploying VMs with 'latest' - * as version will not use this version. - * - * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end - * of life date of the gallery image version. - * - * @param {array} [galleryImageVersion.publishingProfile.regions] The regions - * where the artifact is going to be published. - * - * @param {object} [galleryImageVersion.publishingProfile.source] - * - * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] - * - * @param {string} - * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed - * artifact id. - * - * @param {object} [galleryImageVersion.storageProfile] - * - * @param {object} [galleryImageVersion.storageProfile.osDiskImage] - * - * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] - * It indicates the size of the VHD to create. - * - * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] - * The host caching of the disk. Valid values are 'None', 'ReadOnly', and - * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * - * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of - * data disk images. - * - * @param {object} [galleryImageVersion.replicationStatus] - * - * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This - * is the aggregated replication status based on the regional replication - * status. Possible values include: 'Unknown', 'InProgress', 'Completed', - * 'Failed' - * - * @param {array} [galleryImageVersion.replicationStatus.summary] This is a - * summary of replication status for each region. - * - * @param {string} galleryImageVersion.location Resource location - * - * @param {object} [galleryImageVersion.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageVersion} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageVersion} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Retrieves information about a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'ReplicationStatus' - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves information about a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'ReplicationStatus' - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageVersion} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageVersion} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List gallery image versions under a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listGalleryImageVersionsByGalleryImageWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List gallery image versions under a gallery image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageVersionList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageVersionList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageVersionList} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, callback: ServiceCallback): void; - listGalleryImageVersionsByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Create or update a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} galleryImageVersion Parameters supplied to the create or - * update gallery image version operation. - * - * @param {object} [galleryImageVersion.publishingProfile] - * - * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] - * The flag means that if it is set to true, people deploying VMs with 'latest' - * as version will not use this version. - * - * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end - * of life date of the gallery image version. - * - * @param {array} [galleryImageVersion.publishingProfile.regions] The regions - * where the artifact is going to be published. - * - * @param {object} [galleryImageVersion.publishingProfile.source] - * - * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] - * - * @param {string} - * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed - * artifact id. - * - * @param {object} [galleryImageVersion.storageProfile] - * - * @param {object} [galleryImageVersion.storageProfile.osDiskImage] - * - * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] - * It indicates the size of the VHD to create. - * - * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] - * The host caching of the disk. Valid values are 'None', 'ReadOnly', and - * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * - * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of - * data disk images. - * - * @param {object} [galleryImageVersion.replicationStatus] - * - * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This - * is the aggregated replication status based on the regional replication - * status. Possible values include: 'Unknown', 'InProgress', 'Completed', - * 'Failed' - * - * @param {array} [galleryImageVersion.replicationStatus.summary] This is a - * summary of replication status for each region. - * - * @param {string} galleryImageVersion.location Resource location - * - * @param {object} [galleryImageVersion.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} galleryImageVersion Parameters supplied to the create or - * update gallery image version operation. - * - * @param {object} [galleryImageVersion.publishingProfile] - * - * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] - * The flag means that if it is set to true, people deploying VMs with 'latest' - * as version will not use this version. - * - * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end - * of life date of the gallery image version. - * - * @param {array} [galleryImageVersion.publishingProfile.regions] The regions - * where the artifact is going to be published. - * - * @param {object} [galleryImageVersion.publishingProfile.source] - * - * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] - * - * @param {string} - * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed - * artifact id. - * - * @param {object} [galleryImageVersion.storageProfile] - * - * @param {object} [galleryImageVersion.storageProfile.osDiskImage] - * - * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] - * It indicates the size of the VHD to create. - * - * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] - * The host caching of the disk. Valid values are 'None', 'ReadOnly', and - * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * - * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of - * data disk images. - * - * @param {object} [galleryImageVersion.replicationStatus] - * - * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This - * is the aggregated replication status based on the regional replication - * status. Possible values include: 'Unknown', 'InProgress', 'Completed', - * 'Failed' - * - * @param {array} [galleryImageVersion.replicationStatus.summary] This is a - * summary of replication status for each region. - * - * @param {string} galleryImageVersion.location Resource location - * - * @param {object} [galleryImageVersion.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageVersion} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageVersion} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageVersion} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: models.GalleryImageVersion, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete a gallery image version. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} galleryName The name of the gallery. - * - * @param {string} galleryImageName The name of the gallery image. - * - * @param {string} galleryImageVersionName The name of the gallery image - * version. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {OperationStatusResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List gallery image versions under a gallery image. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listGalleryImageVersionsByGalleryImageNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List gallery image versions under a gallery image. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {GalleryImageVersionList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {GalleryImageVersionList} [result] - The deserialized result object if an error did not occur. - * See {@link GalleryImageVersionList} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, callback: ServiceCallback): void; - listGalleryImageVersionsByGalleryImageNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - /** * @class * Operations @@ -2266,11 +310,11 @@ export interface AvailabilitySets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete an availability set. @@ -2291,7 +335,7 @@ export interface AvailabilitySets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2299,17 +343,15 @@ export interface AvailabilitySets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, availabilitySetName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, availabilitySetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3016,11 +1058,11 @@ export interface VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -3044,7 +1086,7 @@ export interface VirtualMachineExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3052,17 +1094,15 @@ export interface VirtualMachineExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3446,11 +1486,11 @@ export interface VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -3474,7 +1514,7 @@ export interface VirtualMachineExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3482,17 +1522,15 @@ export interface VirtualMachineExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3844,12 +1882,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -4241,12 +2280,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -4657,12 +2697,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -5052,12 +3093,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -5294,11 +3336,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete a virtual machine. @@ -5319,7 +3361,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5327,17 +3369,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5482,11 +3522,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Converts virtual machine disks from blob-based to managed disks. Virtual @@ -5508,7 +3548,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5516,17 +3556,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5544,11 +3582,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Shuts down the virtual machine and releases the compute resources. You are @@ -5570,7 +3608,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5578,17 +3616,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5605,11 +3641,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Sets the state of the virtual machine to generalized. @@ -5630,7 +3666,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5638,17 +3674,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5841,11 +3875,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to power off (stop) a virtual machine. The virtual machine can @@ -5868,7 +3902,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5876,17 +3910,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5903,11 +3935,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to restart a virtual machine. @@ -5928,7 +3960,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5936,17 +3968,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5963,11 +3993,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to start a virtual machine. @@ -5988,7 +4018,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5996,17 +4026,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6023,11 +4051,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to redeploy a virtual machine. @@ -6048,7 +4076,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6056,17 +4084,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6083,11 +4109,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to perform maintenance on a virtual machine. @@ -6108,7 +4134,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6116,17 +4142,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6153,11 +4177,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Run command on the VM. @@ -6188,7 +4212,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6196,16 +4220,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunCommandResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6480,12 +4503,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -6877,12 +4901,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -7293,12 +5318,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -7688,12 +5714,13 @@ export interface VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -7930,11 +5957,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete a virtual machine. @@ -7955,7 +5982,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7963,17 +5990,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7991,11 +6016,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Converts virtual machine disks from blob-based to managed disks. Virtual @@ -8017,7 +6042,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8025,17 +6050,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8053,11 +6076,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Shuts down the virtual machine and releases the compute resources. You are @@ -8079,7 +6102,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8087,17 +6110,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8116,11 +6137,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to power off (stop) a virtual machine. The virtual machine can @@ -8143,7 +6164,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8151,17 +6172,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8178,11 +6197,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to restart a virtual machine. @@ -8203,7 +6222,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8211,17 +6230,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8238,11 +6255,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to start a virtual machine. @@ -8263,7 +6280,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8271,17 +6288,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8298,11 +6313,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to redeploy a virtual machine. @@ -8323,7 +6338,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8331,17 +6346,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8358,11 +6371,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to perform maintenance on a virtual machine. @@ -8383,7 +6396,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8391,17 +6404,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8428,11 +6439,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Run command on the VM. @@ -8463,7 +6474,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8471,16 +6482,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunCommandResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9528,11 +7538,11 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes an Image. @@ -9553,7 +7563,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9561,17 +7571,15 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10129,11 +8137,11 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes an Image. @@ -10154,7 +8162,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10162,17 +8170,15 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10565,12 +8571,12 @@ export interface VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -10985,12 +8991,12 @@ export interface VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -11784,11 +9790,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VM scale set. @@ -11809,7 +9815,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11817,17 +9823,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -11911,11 +9915,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates specific virtual machines in a VM scale set. Shuts down the @@ -11943,7 +9947,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11951,17 +9955,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -11980,11 +9982,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes virtual machines in a VM scale set. @@ -12007,7 +10009,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12015,17 +10017,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12345,11 +10345,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) one or more virtual machines in a VM scale set. Note that @@ -12377,7 +10377,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12385,17 +10385,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12417,11 +10415,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts one or more virtual machines in a VM scale set. @@ -12447,7 +10445,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12455,17 +10453,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12487,11 +10483,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts one or more virtual machines in a VM scale set. @@ -12517,7 +10513,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12525,17 +10521,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12557,11 +10551,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploy one or more virtual machines in a VM scale set. @@ -12587,7 +10581,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12595,17 +10589,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12627,11 +10619,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Perform maintenance on one or more virtual machines in a VM scale set. @@ -12657,7 +10649,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12665,17 +10657,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12695,11 +10685,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale @@ -12723,7 +10713,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12731,17 +10721,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12764,11 +10752,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) one or more virtual machines in a VM @@ -12795,7 +10783,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12803,17 +10791,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - reimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - reimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + reimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12836,11 +10822,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages all the disks ( including data disks ) in the virtual machines in a @@ -12867,7 +10853,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12875,17 +10861,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - reimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - reimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + reimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13218,12 +11202,12 @@ export interface VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -13638,12 +11622,12 @@ export interface VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -14437,11 +12421,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VM scale set. @@ -14462,7 +12446,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14470,17 +12454,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14504,11 +12486,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates specific virtual machines in a VM scale set. Shuts down the @@ -14536,7 +12518,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14544,17 +12526,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14573,11 +12553,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes virtual machines in a VM scale set. @@ -14600,7 +12580,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14608,17 +12588,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14642,11 +12620,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) one or more virtual machines in a VM scale set. Note that @@ -14674,7 +12652,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14682,17 +12660,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14714,11 +12690,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts one or more virtual machines in a VM scale set. @@ -14744,7 +12720,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14752,17 +12728,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14784,11 +12758,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts one or more virtual machines in a VM scale set. @@ -14814,7 +12788,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14822,17 +12796,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14854,11 +12826,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploy one or more virtual machines in a VM scale set. @@ -14884,7 +12856,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14892,17 +12864,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14924,11 +12894,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Perform maintenance on one or more virtual machines in a VM scale set. @@ -14954,7 +12924,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14962,17 +12932,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14992,11 +12960,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale @@ -15020,7 +12988,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15028,17 +12996,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15061,11 +13027,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) one or more virtual machines in a VM @@ -15092,7 +13058,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15100,17 +13066,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginReimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15133,11 +13097,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages all the disks ( including data disks ) in the virtual machines in a @@ -15164,7 +13128,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15172,17 +13136,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15577,11 +13539,11 @@ export interface VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -15605,7 +13567,7 @@ export interface VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15613,17 +13575,15 @@ export interface VirtualMachineScaleSetExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15903,11 +13863,11 @@ export interface VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -15931,7 +13891,7 @@ export interface VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15939,17 +13899,15 @@ export interface VirtualMachineScaleSetExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16033,11 +13991,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - cancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Cancels the current virtual machine scale set rolling upgrade. @@ -16058,7 +14016,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16066,17 +14024,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - cancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + cancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16095,11 +14051,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a rolling upgrade to move all virtual machine scale set instances to @@ -16122,7 +14078,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16130,17 +14086,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16217,11 +14171,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Cancels the current virtual machine scale set rolling upgrade. @@ -16242,7 +14196,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16250,17 +14204,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginCancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginCancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16279,11 +14231,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a rolling upgrade to move all virtual machine scale set instances to @@ -16306,7 +14258,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16314,17 +14266,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -16353,11 +14303,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) a specific virtual machine in a VM @@ -16381,7 +14331,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16389,17 +14339,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16419,11 +14367,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Allows you to re-image all the disks ( including data disks ) in the a VM @@ -16447,7 +14395,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16455,17 +14403,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16487,11 +14433,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates a specific virtual machine in a VM scale set. Shuts down the @@ -16517,7 +14463,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16525,17 +14471,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16709,12 +14653,13 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -17092,12 +15037,13 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -17340,11 +15286,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual machine from a VM scale set. @@ -17367,7 +15313,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17375,17 +15321,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17608,11 +15552,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) a virtual machine in a VM scale set. Note that resources @@ -17637,7 +15581,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17645,17 +15589,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17674,11 +15616,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts a virtual machine in a VM scale set. @@ -17701,7 +15643,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17709,17 +15651,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17738,11 +15678,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a virtual machine in a VM scale set. @@ -17765,7 +15705,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17773,17 +15713,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17802,11 +15740,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploys a virtual machine in a VM scale set. @@ -17829,7 +15767,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17837,17 +15775,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17866,11 +15802,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Performs maintenance on a virtual machine in a VM scale set. @@ -17893,7 +15829,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17901,17 +15837,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17931,11 +15865,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) a specific virtual machine in a VM @@ -17959,7 +15893,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17967,17 +15901,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17997,11 +15929,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Allows you to re-image all the disks ( including data disks ) in the a VM @@ -18025,7 +15957,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18033,17 +15965,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -18065,11 +15995,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates a specific virtual machine in a VM scale set. Shuts down the @@ -18095,7 +16025,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18103,17 +16033,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -18287,12 +16215,13 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -18670,12 +16599,13 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -18918,11 +16848,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual machine from a VM scale set. @@ -18945,7 +16875,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18953,17 +16883,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -18984,11 +16912,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) a virtual machine in a VM scale set. Note that resources @@ -19013,7 +16941,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19021,17 +16949,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19050,11 +16976,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts a virtual machine in a VM scale set. @@ -19077,7 +17003,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19085,17 +17011,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19114,11 +17038,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a virtual machine in a VM scale set. @@ -19141,7 +17065,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19149,17 +17073,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19178,11 +17100,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploys a virtual machine in a VM scale set. @@ -19205,7 +17127,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19213,17 +17135,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19242,11 +17162,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Performs maintenance on a virtual machine in a VM scale set. @@ -19269,7 +17189,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19277,17 +17197,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/computeManagement2/lib/operations/index.js b/lib/services/computeManagement2/lib/operations/index.js index 1c278cc621..c6c01da729 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -14,9 +14,6 @@ 'use strict'; -exports.Galleries = require('./galleries'); -exports.GalleryImages = require('./galleryImages'); -exports.GalleryImageVersions = require('./galleryImageVersions'); exports.Operations = require('./operations'); exports.AvailabilitySets = require('./availabilitySets'); exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages'); diff --git a/lib/services/computeManagement2/lib/operations/logAnalytics.js b/lib/services/computeManagement2/lib/operations/logAnalytics.js index 8fa32eb27b..8de8e7f622 100644 --- a/lib/services/computeManagement2/lib/operations/logAnalytics.js +++ b/lib/services/computeManagement2/lib/operations/logAnalytics.js @@ -273,7 +273,7 @@ function _beginExportRequestRateByInterval(parameters, location, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (parameters === null || parameters === undefined) { @@ -455,7 +455,7 @@ function _beginExportThrottledRequests(parameters, location, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/operations.js b/lib/services/computeManagement2/lib/operations/operations.js index bdb52b2e71..5d4cbb803d 100644 --- a/lib/services/computeManagement2/lib/operations/operations.js +++ b/lib/services/computeManagement2/lib/operations/operations.js @@ -46,7 +46,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/usageOperations.js b/lib/services/computeManagement2/lib/operations/usageOperations.js index a6a356e1f3..93f3871d63 100644 --- a/lib/services/computeManagement2/lib/operations/usageOperations.js +++ b/lib/services/computeManagement2/lib/operations/usageOperations.js @@ -49,7 +49,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js b/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js index fc9e07d629..bdd70c1f88 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js @@ -54,7 +54,7 @@ function _get(location, publisherName, type, version, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -204,7 +204,7 @@ function _listTypes(location, publisherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -371,7 +371,7 @@ function _listVersions(location, publisherName, type, options, callback) { let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js index 669cd7f9c8..0e115ea392 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js @@ -280,9 +280,7 @@ function _update(resourceGroupName, vmName, vmExtensionName, extensionParameters * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -320,20 +318,6 @@ function _deleteMethod(resourceGroupName, vmName, vmExtensionName, options, call if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -383,7 +367,7 @@ function _get(resourceGroupName, vmName, vmExtensionName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -590,7 +574,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, extens if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -805,7 +789,7 @@ function _beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParam if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -955,9 +939,7 @@ function _beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParam * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -973,7 +955,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1063,23 +1045,6 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1465,7 +1430,7 @@ class VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1505,7 +1470,7 @@ class VirtualMachineExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1513,9 +1478,7 @@ class VirtualMachineExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2003,7 +1966,7 @@ class VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2043,7 +2006,7 @@ class VirtualMachineExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2051,9 +2014,7 @@ class VirtualMachineExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineImages.js b/lib/services/computeManagement2/lib/operations/virtualMachineImages.js index 236d37b95f..62ac8088fe 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineImages.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineImages.js @@ -55,7 +55,7 @@ function _get(location, publisherName, offer, skus, version, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -223,7 +223,7 @@ function _list(location, publisherName, offer, skus, options, callback) { let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -406,7 +406,7 @@ function _listOffers(location, publisherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -561,7 +561,7 @@ function _listPublishers(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -716,7 +716,7 @@ function _listSkus(location, publisherName, offer, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js b/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js index b5a3b434bb..fbe399a62b 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js @@ -47,7 +47,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -192,7 +192,7 @@ function _get(location, commandId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js index 591b99d1ab..7ab2174393 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js @@ -148,9 +148,7 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, e * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -188,20 +186,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName, opt if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -251,7 +235,7 @@ function _get(resourceGroupName, vmScaleSetName, vmssExtensionName, options, cal throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -406,7 +390,7 @@ function _list(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -583,7 +567,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionNa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -750,9 +734,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionNa * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -768,7 +750,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -858,23 +840,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1195,7 +1160,7 @@ class VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1235,7 +1200,7 @@ class VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1243,9 +1208,7 @@ class VirtualMachineScaleSetExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1629,7 +1592,7 @@ class VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1669,7 +1632,7 @@ class VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1677,9 +1640,7 @@ class VirtualMachineScaleSetExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js index 920f0cb874..1f175a47d3 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js @@ -33,9 +33,7 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -73,20 +71,6 @@ function _cancel(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -114,9 +98,7 @@ function _cancel(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -154,20 +136,6 @@ function _startOSUpgrade(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -210,7 +178,7 @@ function _getLatest(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -336,9 +304,7 @@ function _getLatest(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -354,7 +320,7 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -440,23 +406,6 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -482,9 +431,7 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -500,7 +447,7 @@ function _beginStartOSUpgrade(resourceGroupName, vmScaleSetName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -586,23 +533,6 @@ function _beginStartOSUpgrade(resourceGroupName, vmScaleSetName, options, callba // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -637,7 +567,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -674,7 +604,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -682,9 +612,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -726,7 +654,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -765,7 +693,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -773,9 +701,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -902,7 +828,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -939,7 +865,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -947,9 +873,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -991,7 +915,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1030,7 +954,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1038,9 +962,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js index 031bf00588..db69534fb1 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js @@ -36,9 +36,7 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -76,20 +74,6 @@ function _reimage(resourceGroupName, vmScaleSetName, instanceId, options, callba if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -118,9 +102,7 @@ function _reimage(resourceGroupName, vmScaleSetName, instanceId, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -158,20 +140,6 @@ function _reimageAll(resourceGroupName, vmScaleSetName, instanceId, options, cal if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -202,9 +170,7 @@ function _reimageAll(resourceGroupName, vmScaleSetName, instanceId, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -242,20 +208,6 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -434,12 +386,13 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -725,9 +678,7 @@ function _update(resourceGroupName, vmScaleSetName, instanceId, parameters, opti * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -765,20 +716,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, instanceId, options, c if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -823,7 +760,7 @@ function _get(resourceGroupName, vmScaleSetName, instanceId, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -973,7 +910,7 @@ function _getInstanceView(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1131,7 +1068,7 @@ function _list(resourceGroupName, virtualMachineScaleSetName, options, callback) let filter = (options && options.filter !== undefined) ? options.filter : undefined; let select = (options && options.select !== undefined) ? options.select : undefined; let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1280,9 +1217,7 @@ function _list(resourceGroupName, virtualMachineScaleSetName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1320,20 +1255,6 @@ function _powerOff(resourceGroupName, vmScaleSetName, instanceId, options, callb if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1361,9 +1282,7 @@ function _powerOff(resourceGroupName, vmScaleSetName, instanceId, options, callb * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1401,20 +1320,6 @@ function _restart(resourceGroupName, vmScaleSetName, instanceId, options, callba if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1442,9 +1347,7 @@ function _restart(resourceGroupName, vmScaleSetName, instanceId, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1482,20 +1385,6 @@ function _start(resourceGroupName, vmScaleSetName, instanceId, options, callback if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1523,9 +1412,7 @@ function _start(resourceGroupName, vmScaleSetName, instanceId, options, callback * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1563,20 +1450,6 @@ function _redeploy(resourceGroupName, vmScaleSetName, instanceId, options, callb if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1604,9 +1477,7 @@ function _redeploy(resourceGroupName, vmScaleSetName, instanceId, options, callb * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1644,20 +1515,6 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, instanceId, opti if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1685,9 +1542,7 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, instanceId, opti * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1703,7 +1558,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1793,23 +1648,6 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1836,9 +1674,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1854,7 +1690,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1944,23 +1780,6 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1989,9 +1808,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2007,7 +1824,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2097,23 +1914,6 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2290,12 +2090,13 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -2518,7 +2319,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, instanceId, parameters, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2684,9 +2485,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, instanceId, parameters, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2702,7 +2501,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2792,23 +2591,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2836,9 +2618,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2854,7 +2634,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2944,23 +2724,6 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2986,9 +2749,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3004,7 +2765,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3094,23 +2855,6 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3136,9 +2880,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3154,7 +2896,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3244,23 +2986,6 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3286,9 +3011,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3304,7 +3027,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3394,23 +3117,6 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3436,9 +3142,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3454,7 +3158,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3544,23 +3248,6 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3745,7 +3432,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3785,7 +3472,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3793,9 +3480,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3838,7 +3523,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3878,7 +3563,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3886,9 +3571,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3933,7 +3616,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3975,7 +3658,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3983,9 +3666,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4182,12 +3863,13 @@ class VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -4577,12 +4259,13 @@ class VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -4840,7 +4523,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -4879,7 +4562,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4887,9 +4570,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5216,7 +4897,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5257,7 +4938,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5265,9 +4946,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5309,7 +4988,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5348,7 +5027,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5356,9 +5035,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5400,7 +5077,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5439,7 +5116,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5447,9 +5124,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5491,7 +5166,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5530,7 +5205,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5538,9 +5213,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5582,7 +5255,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5621,7 +5294,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5629,9 +5302,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5674,7 +5345,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5714,7 +5385,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5722,9 +5393,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5767,7 +5436,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5807,7 +5476,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5815,9 +5484,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5862,7 +5529,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5904,7 +5571,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5912,9 +5579,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6111,12 +5776,13 @@ class VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -6506,12 +6172,13 @@ class VirtualMachineScaleSetVMs { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -6769,7 +6436,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6808,7 +6475,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6816,9 +6483,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6862,7 +6527,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6903,7 +6568,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6911,9 +6576,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6955,7 +6618,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6994,7 +6657,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7002,9 +6665,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7046,7 +6707,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7085,7 +6746,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7093,9 +6754,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7137,7 +6796,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7176,7 +6835,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7184,9 +6843,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7228,7 +6885,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7267,7 +6924,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7275,9 +6932,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js index c3c95455ec..73f3d46a7f 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js @@ -278,12 +278,12 @@ const WebResource = msRest.WebResource; * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -865,9 +865,7 @@ function _update(resourceGroupName, vmScaleSetName, parameters, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -905,20 +903,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -961,7 +945,7 @@ function _get(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1095,9 +1079,7 @@ function _get(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1135,20 +1117,6 @@ function _deallocate(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1176,9 +1144,7 @@ function _deallocate(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1216,20 +1182,6 @@ function _deleteInstances(resourceGroupName, vmScaleSetName, instanceIds, option if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1272,7 +1224,7 @@ function _getInstanceView(resourceGroupName, vmScaleSetName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1414,7 +1366,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1553,7 +1505,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1690,7 +1642,7 @@ function _listSkus(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1834,7 +1786,7 @@ function _getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1968,9 +1920,7 @@ function _getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2008,20 +1958,6 @@ function _powerOff(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2052,9 +1988,7 @@ function _powerOff(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2092,20 +2026,6 @@ function _restart(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2136,9 +2056,7 @@ function _restart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2176,20 +2094,6 @@ function _start(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2220,9 +2124,7 @@ function _start(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2260,20 +2162,6 @@ function _redeploy(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2304,9 +2192,7 @@ function _redeploy(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2344,20 +2230,6 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, options, callbac if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2386,9 +2258,7 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2426,20 +2296,6 @@ function _updateInstances(resourceGroupName, vmScaleSetName, instanceIds, option if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2471,9 +2327,7 @@ function _updateInstances(resourceGroupName, vmScaleSetName, instanceIds, option * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2511,20 +2365,6 @@ function _reimage(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2556,9 +2396,7 @@ function _reimage(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2596,20 +2434,6 @@ function _reimageAll(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2655,7 +2479,7 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3030,12 +2854,12 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -3203,7 +3027,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3655,7 +3479,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3798,9 +3622,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, parameters, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3816,7 +3638,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3902,23 +3724,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3949,9 +3754,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3968,7 +3771,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4080,23 +3883,6 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4122,9 +3908,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4140,7 +3924,7 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4253,23 +4037,6 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4300,9 +4067,7 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4319,7 +4084,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4431,23 +4196,6 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4476,9 +4224,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4495,7 +4241,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4607,23 +4353,6 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4652,9 +4381,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4671,7 +4398,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4783,23 +4510,6 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4828,9 +4538,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4847,7 +4555,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4959,23 +4667,6 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5004,9 +4695,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5023,7 +4712,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5135,23 +4824,6 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5178,9 +4850,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5196,7 +4866,7 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5309,23 +4979,6 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5355,9 +5008,7 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5374,7 +5025,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5486,23 +5137,6 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5532,9 +5166,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5551,7 +5183,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, options, callback) throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5663,23 +5295,6 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -6511,12 +6126,12 @@ class VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -6943,12 +6558,12 @@ class VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -7784,7 +7399,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7821,7 +7436,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7829,9 +7444,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7965,7 +7578,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8009,7 +7622,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8017,9 +7630,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8061,7 +7672,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8100,7 +7711,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8108,9 +7719,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8588,7 +8197,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8632,7 +8241,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8640,9 +8249,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8687,7 +8294,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8729,7 +8336,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8737,9 +8344,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8784,7 +8389,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8826,7 +8431,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8834,9 +8439,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8881,7 +8484,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8923,7 +8526,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8931,9 +8534,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8978,7 +8579,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -9020,7 +8621,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -9028,9 +8629,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9073,7 +8672,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -9113,7 +8712,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -9121,9 +8720,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9169,7 +8766,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -9212,7 +8809,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -9220,9 +8817,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9268,7 +8863,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -9311,7 +8906,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -9319,9 +8914,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9704,12 +9297,12 @@ class VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -10136,12 +9729,12 @@ class VirtualMachineScaleSets { * @param {string} * parameters.virtualMachineProfile.storageProfile.osDisk.createOption * Specifies how the virtual machines in the scale set should be - * created.

The only allowed value is: **FromImage** This value is - * used when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element described - * above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach' + * created.

The only allowed value is: **FromImage** \u2013 This value + * is used when you are using an image to create the virtual machine. If you + * are using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach' * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This @@ -10977,7 +10570,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11014,7 +10607,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11022,9 +10615,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11071,7 +10662,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11115,7 +10706,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11123,9 +10714,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11167,7 +10756,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11206,7 +10795,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11214,9 +10803,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11263,7 +10850,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11307,7 +10894,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11315,9 +10902,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11362,7 +10947,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11404,7 +10989,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11412,9 +10997,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11459,7 +11042,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11501,7 +11084,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11509,9 +11092,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11556,7 +11137,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11598,7 +11179,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11606,9 +11187,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11653,7 +11232,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11695,7 +11274,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11703,9 +11282,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11748,7 +11325,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11788,7 +11365,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11796,9 +11373,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11844,7 +11419,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11887,7 +11462,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11895,9 +11470,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11943,7 +11516,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11986,7 +11559,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11994,9 +11567,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js b/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js index f56a070623..f764b34d57 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js @@ -49,7 +49,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachines.js b/lib/services/computeManagement2/lib/operations/virtualMachines.js index a09e9ec9c6..d60cae5a48 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachines.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachines.js @@ -55,7 +55,7 @@ function _getExtensions(resourceGroupName, vmName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -448,12 +448,13 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -903,12 +904,13 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -1188,9 +1190,7 @@ function _update(resourceGroupName, vmName, parameters, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1228,20 +1228,6 @@ function _deleteMethod(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1288,7 +1274,7 @@ function _get(resourceGroupName, vmName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1441,7 +1427,7 @@ function _instanceView(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1569,9 +1555,7 @@ function _instanceView(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1609,20 +1593,6 @@ function _convertToManagedDisks(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1649,9 +1619,7 @@ function _convertToManagedDisks(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1689,20 +1657,6 @@ function _deallocate(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1727,9 +1681,7 @@ function _deallocate(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1745,7 +1697,7 @@ function _generalize(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1831,23 +1783,6 @@ function _generalize(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1888,7 +1823,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2025,7 +1960,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -2162,7 +2097,7 @@ function _listAvailableSizes(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2291,9 +2226,7 @@ function _listAvailableSizes(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2331,20 +2264,6 @@ function _powerOff(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2370,9 +2289,7 @@ function _powerOff(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2410,20 +2327,6 @@ function _restart(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2449,9 +2352,7 @@ function _restart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2489,20 +2390,6 @@ function _start(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2528,9 +2415,7 @@ function _start(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2568,20 +2453,6 @@ function _redeploy(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2607,9 +2478,7 @@ function _redeploy(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2647,20 +2516,6 @@ function _performMaintenance(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2696,8 +2551,7 @@ function _performMaintenance(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2740,7 +2594,21 @@ function _runCommand(resourceGroupName, vmName, parameters, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['RunCommandResult']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'InstanceViewStatusElementType', + type: { + name: 'Composite', + className: 'InstanceViewStatus' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2804,7 +2672,7 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3115,12 +2983,13 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -3341,7 +3210,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3669,12 +3538,13 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -3893,7 +3763,7 @@ function _beginUpdate(resourceGroupName, vmName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4053,9 +3923,7 @@ function _beginUpdate(resourceGroupName, vmName, parameters, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4071,7 +3939,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4157,23 +4025,6 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4198,9 +4049,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4216,7 +4065,7 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4302,23 +4151,6 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4343,9 +4175,7 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4361,7 +4191,7 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4447,23 +4277,6 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4489,9 +4302,7 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4507,7 +4318,7 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4593,23 +4404,6 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4633,9 +4427,7 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4651,7 +4443,7 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4737,23 +4529,6 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4777,9 +4552,7 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4795,7 +4568,7 @@ function _beginStart(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4881,23 +4654,6 @@ function _beginStart(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4921,9 +4677,7 @@ function _beginStart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4939,7 +4693,7 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5025,23 +4779,6 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5065,9 +4802,7 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5083,7 +4818,7 @@ function _beginPerformMaintenance(resourceGroupName, vmName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5169,23 +4904,6 @@ function _beginPerformMaintenance(resourceGroupName, vmName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5219,8 +4937,7 @@ function _beginPerformMaintenance(resourceGroupName, vmName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5236,7 +4953,7 @@ function _beginRunCommand(resourceGroupName, vmName, parameters, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-04-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5346,7 +5063,21 @@ function _beginRunCommand(resourceGroupName, vmName, parameters, options, callba parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['RunCommandResult']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'InstanceViewStatusElementType', + type: { + name: 'Composite', + className: 'InstanceViewStatus' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6056,12 +5787,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -6465,12 +6197,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -6896,12 +6629,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -7303,12 +7037,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -7560,7 +7295,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7597,7 +7332,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7605,9 +7340,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7829,7 +7562,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7867,7 +7600,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7875,9 +7608,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7918,7 +7649,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7956,7 +7687,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7964,9 +7695,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8006,7 +7735,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8043,7 +7772,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8051,9 +7780,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8350,7 +8077,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8389,7 +8116,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8397,9 +8124,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8439,7 +8164,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8476,7 +8201,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8484,9 +8209,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8526,7 +8249,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8563,7 +8286,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8571,9 +8294,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8613,7 +8334,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8650,7 +8371,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8658,9 +8379,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8700,7 +8419,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8737,7 +8456,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8745,9 +8464,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8797,7 +8514,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8844,7 +8561,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8852,8 +8569,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9178,12 +8894,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -9587,12 +9304,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -10018,12 +9736,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -10425,12 +10144,13 @@ class VirtualMachines { * * @param {string} parameters.storageProfile.osDisk.createOption Specifies how * the virtual machine should be created.

Possible values are:

- * **Attach** This value is used when you are using a specialized disk to - * create the virtual machine.

**FromImage** This value is used when - * you are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. If - * you are using a marketplace image, you also use the plan element previously - * described. Possible values include: 'FromImage', 'Empty', 'Attach' + * **Attach** \u2013 This value is used when you are using a specialized disk + * to create the virtual machine.

**FromImage** \u2013 This value is + * used when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element described + * above. If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach' * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the * size of an empty data disk in gigabytes. This element can be used to @@ -10682,7 +10402,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10719,7 +10439,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10727,9 +10447,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10770,7 +10488,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10808,7 +10526,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10816,9 +10534,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10859,7 +10575,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10897,7 +10613,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10905,9 +10621,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10949,7 +10663,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10988,7 +10702,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10996,9 +10710,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11038,7 +10750,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11075,7 +10787,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11083,9 +10795,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11125,7 +10835,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11162,7 +10872,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11170,9 +10880,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11212,7 +10920,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11249,7 +10957,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11257,9 +10965,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11299,7 +11005,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11336,7 +11042,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11344,9 +11050,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11396,7 +11100,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11443,7 +11147,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11451,8 +11155,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. *