diff --git a/lib/services/apimanagement/package.json b/lib/services/apimanagement/package.json index 9660a86619..7826c8cf04 100644 --- a/lib/services/apimanagement/package.json +++ b/lib/services/apimanagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/apiManagementClient.js", "types": "./lib/apiManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/apimanagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/computeManagement2/lib/models/additionalCapabilities.js b/lib/services/computeManagement2/lib/models/additionalCapabilities.js new file mode 100644 index 0000000000..2d17444bf7 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/additionalCapabilities.js @@ -0,0 +1,57 @@ +/* + * 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'; + +/** + * Enables or disables a capability on the virtual machine or virtual machine + * scale set + * + */ +class AdditionalCapabilities { + /** + * Create a AdditionalCapabilities. + * @member {boolean} [ultraSSDEnabled] Enables or disables a capability to + * have 1 or more managed data disks with UltraSSD_LRS storage account on the + * VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be + * added to a virtual machine or virtual machine scale set only if this + * property is enabled. + */ + constructor() { + } + + /** + * Defines the metadata of AdditionalCapabilities + * + * @returns {object} metadata of AdditionalCapabilities + * + */ + mapper() { + return { + required: false, + serializedName: 'AdditionalCapabilities', + type: { + name: 'Composite', + className: 'AdditionalCapabilities', + modelProperties: { + ultraSSDEnabled: { + required: false, + serializedName: 'ultraSSDEnabled', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = AdditionalCapabilities; diff --git a/lib/services/computeManagement2/lib/models/dataDisk.js b/lib/services/computeManagement2/lib/models/dataDisk.js index e19030cf6e..cfa8ef3332 100644 --- a/lib/services/computeManagement2/lib/models/dataDisk.js +++ b/lib/services/computeManagement2/lib/models/dataDisk.js @@ -48,9 +48,9 @@ class DataDisk { * virtual machine image.

This value cannot be larger than 1023 GB * @member {object} [managedDisk] The managed disk parameters. * @member {string} [managedDisk.storageAccountType] Specifies the storage - * account type for the managed disk. Possible values are: Standard_LRS, - * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * account type for the managed disk. UltraSSD_LRS can only be used for data + * disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/disk.js b/lib/services/computeManagement2/lib/models/disk.js index 23236931f5..f3f418f9b9 100644 --- a/lib/services/computeManagement2/lib/models/disk.js +++ b/lib/services/computeManagement2/lib/models/disk.js @@ -24,7 +24,7 @@ class Disk extends models['Resource'] { * that has the disk attached. * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [sku.tier] The sku tier. * @member {array} [zones] The Logical zone list for Disk. * @member {date} [timeCreated] The time when the disk was created. @@ -78,6 +78,12 @@ class Disk extends models['Resource'] { * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault * @member {string} [provisioningState] The disk provisioning state. + * @member {number} [diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * @member {number} [diskMBpsReadWrite] The bandwidth allowed for this disk; + * only settable for UltraSSD disks. MBps means millions of bytes per second + * - MB here uses the ISO notation, of powers of 10. */ constructor() { super(); @@ -218,6 +224,20 @@ class Disk extends models['Resource'] { type: { name: 'String' } + }, + diskIOPSReadWrite: { + required: false, + serializedName: 'properties.diskIOPSReadWrite', + type: { + name: 'Number' + } + }, + diskMBpsReadWrite: { + required: false, + serializedName: 'properties.diskMBpsReadWrite', + type: { + name: 'Number' + } } } } diff --git a/lib/services/computeManagement2/lib/models/diskSku.js b/lib/services/computeManagement2/lib/models/diskSku.js index d6f7c27c4c..bbe7a171ba 100644 --- a/lib/services/computeManagement2/lib/models/diskSku.js +++ b/lib/services/computeManagement2/lib/models/diskSku.js @@ -11,14 +11,15 @@ 'use strict'; /** - * The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + * UltraSSD_LRS. * */ class DiskSku { /** * Create a DiskSku. * @member {string} [name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [tier] The sku tier. Default value: 'Standard' . */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/diskUpdate.js b/lib/services/computeManagement2/lib/models/diskUpdate.js index 68818a04b2..8e023d33a8 100644 --- a/lib/services/computeManagement2/lib/models/diskUpdate.js +++ b/lib/services/computeManagement2/lib/models/diskUpdate.js @@ -47,10 +47,16 @@ class DiskUpdate { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {number} [diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * @member {number} [diskMBpsReadWrite] The bandwidth allowed for this disk; + * only settable for UltraSSD disks. MBps means millions of bytes per second + * - MB here uses the ISO notation, of powers of 10. * @member {object} [tags] Resource tags * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [sku.tier] The sku tier. */ constructor() { @@ -93,6 +99,20 @@ class DiskUpdate { className: 'EncryptionSettings' } }, + diskIOPSReadWrite: { + required: false, + serializedName: 'properties.diskIOPSReadWrite', + type: { + name: 'Number' + } + }, + diskMBpsReadWrite: { + required: false, + serializedName: 'properties.diskMBpsReadWrite', + type: { + name: 'Number' + } + }, tags: { required: false, serializedName: 'tags', diff --git a/lib/services/computeManagement2/lib/models/image.js b/lib/services/computeManagement2/lib/models/image.js index db72791ed9..7e85ab48e3 100644 --- a/lib/services/computeManagement2/lib/models/image.js +++ b/lib/services/computeManagement2/lib/models/image.js @@ -54,7 +54,7 @@ class Image extends models['Resource'] { * @member {string} [storageProfile.osDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/imageDataDisk.js b/lib/services/computeManagement2/lib/models/imageDataDisk.js index f79608afe8..dc4ddaa01c 100644 --- a/lib/services/computeManagement2/lib/models/imageDataDisk.js +++ b/lib/services/computeManagement2/lib/models/imageDataDisk.js @@ -36,7 +36,7 @@ class ImageDataDisk { * @member {string} [storageAccountType] Specifies the storage account type * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/imageOSDisk.js b/lib/services/computeManagement2/lib/models/imageOSDisk.js index 72db90564c..3f96689c21 100644 --- a/lib/services/computeManagement2/lib/models/imageOSDisk.js +++ b/lib/services/computeManagement2/lib/models/imageOSDisk.js @@ -39,7 +39,7 @@ class ImageOSDisk { * @member {string} [storageAccountType] Specifies the storage account type * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/imageStorageProfile.js b/lib/services/computeManagement2/lib/models/imageStorageProfile.js index 1c819ec4eb..142cdae3bb 100644 --- a/lib/services/computeManagement2/lib/models/imageStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/imageStorageProfile.js @@ -44,7 +44,7 @@ class ImageStorageProfile { * @member {string} [osDisk.storageAccountType] Specifies the storage account * type for the managed disk. Possible values are: Standard_LRS, Premium_LRS, * and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * a data disk to a virtual machine.

For more information about * disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/imageUpdate.js b/lib/services/computeManagement2/lib/models/imageUpdate.js index 9ddd1afd4d..4b140fad8b 100644 --- a/lib/services/computeManagement2/lib/models/imageUpdate.js +++ b/lib/services/computeManagement2/lib/models/imageUpdate.js @@ -52,7 +52,7 @@ class ImageUpdate extends models['UpdateResource'] { * @member {string} [storageProfile.osDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index 54e09a3aca..463eb8eee8 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -708,9 +708,9 @@ export interface VirtualHardDisk { * The parameters of a managed disk. * * @member {string} [storageAccountType] Specifies the storage account type for - * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and - * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * the managed disk. UltraSSD_LRS can only be used for data disks. Possible + * values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', + * 'UltraSSD_LRS' */ export interface ManagedDiskParameters extends SubResource { storageAccountType?: string; @@ -776,9 +776,9 @@ export interface ManagedDiskParameters extends SubResource { * virtual machine image.

This value cannot be larger than 1023 GB * @member {object} [managedDisk] The managed disk parameters. * @member {string} [managedDisk.storageAccountType] Specifies the storage - * account type for the managed disk. Possible values are: Standard_LRS, - * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * account type for the managed disk. UltraSSD_LRS can only be used for data + * disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface OSDisk { osType?: string; @@ -829,9 +829,9 @@ export interface OSDisk { * virtual machine image.

This value cannot be larger than 1023 GB * @member {object} [managedDisk] The managed disk parameters. * @member {string} [managedDisk.storageAccountType] Specifies the storage - * account type for the managed disk. Possible values are: Standard_LRS, - * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * account type for the managed disk. UltraSSD_LRS can only be used for data + * disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface DataDisk { lun: number; @@ -924,9 +924,9 @@ export interface DataDisk { * 1023 GB * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the - * storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * storage account type for the managed disk. UltraSSD_LRS can only be used for + * data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add a * data disk to a virtual machine.

For more information about disks, * see [About disks and VHDs for Azure virtual @@ -938,6 +938,23 @@ export interface StorageProfile { dataDisks?: DataDisk[]; } +/** + * @class + * Initializes a new instance of the AdditionalCapabilities class. + * @constructor + * Enables or disables a capability on the virtual machine or virtual machine + * scale set + * + * @member {boolean} [ultraSSDEnabled] Enables or disables a capability to have + * 1 or more managed data disks with UltraSSD_LRS storage account on the VM or + * VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a + * virtual machine or virtual machine scale set only if this property is + * enabled. + */ +export interface AdditionalCapabilities { + ultraSSDEnabled?: boolean; +} + /** * @class * Initializes a new instance of the AdditionalUnattendContent class. @@ -1686,13 +1703,22 @@ export interface VirtualMachineInstanceView { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional capabilities + * enabled or disabled on the virtual machine. For instance: whether the + * virtual machine has the capability to support attaching managed data disks + * with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with UltraSSD_LRS + * storage account on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set + * only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for the * virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of the @@ -1903,6 +1929,7 @@ export interface VirtualMachine extends Resource { plan?: Plan; hardwareProfile?: HardwareProfile; storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; osProfile?: OSProfile; networkProfile?: NetworkProfile; diagnosticsProfile?: DiagnosticsProfile; @@ -2082,13 +2109,22 @@ export interface VirtualMachine extends Resource { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional capabilities + * enabled or disabled on the virtual machine. For instance: whether the + * virtual machine has the capability to support attaching managed data disks + * with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with UltraSSD_LRS + * storage account on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set + * only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for the * virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of the @@ -2298,6 +2334,7 @@ export interface VirtualMachineUpdate extends UpdateResource { plan?: Plan; hardwareProfile?: HardwareProfile; storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; osProfile?: OSProfile; networkProfile?: NetworkProfile; diagnosticsProfile?: DiagnosticsProfile; @@ -2436,7 +2473,7 @@ export interface UpgradePolicy { * @member {string} [storageAccountType] Specifies the storage account type for * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface ImageOSDisk { osType: string; @@ -2473,7 +2510,7 @@ export interface ImageOSDisk { * @member {string} [storageAccountType] Specifies the storage account type for * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface ImageDataDisk { lun: number; @@ -2517,7 +2554,7 @@ export interface ImageDataDisk { * @member {string} [osDisk.storageAccountType] Specifies the storage account * type for the managed disk. Possible values are: Standard_LRS, Premium_LRS, * and StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add a * data disk to a virtual machine.

For more information about disks, * see [About disks and VHDs for Azure virtual @@ -2572,7 +2609,7 @@ export interface ImageStorageProfile { * @member {string} [storageProfile.osDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -2626,7 +2663,7 @@ export interface Image extends Resource { * @member {string} [storageProfile.osDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -2833,7 +2870,7 @@ export interface VirtualMachineScaleSetUpdateOSProfile { * @member {string} [storageAccountType] Specifies the storage account type for * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface VirtualMachineScaleSetManagedDiskParameters { storageAccountType?: string; @@ -2876,7 +2913,7 @@ export interface VirtualMachineScaleSetManagedDiskParameters { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface VirtualMachineScaleSetOSDisk { name?: string; @@ -2916,7 +2953,7 @@ export interface VirtualMachineScaleSetOSDisk { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface VirtualMachineScaleSetUpdateOSDisk { caching?: string; @@ -2952,7 +2989,7 @@ export interface VirtualMachineScaleSetUpdateOSDisk { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ export interface VirtualMachineScaleSetDataDisk { name?: string; @@ -3022,7 +3059,7 @@ export interface VirtualMachineScaleSetDataDisk { * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * data disks to the virtual machines in the scale set.

For more * information about disks, see [About disks and VHDs for Azure virtual @@ -3072,7 +3109,7 @@ export interface VirtualMachineScaleSetStorageProfile { * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] The data disks. */ export interface VirtualMachineScaleSetUpdateStorageProfile { @@ -3603,12 +3640,21 @@ export interface VirtualMachineScaleSetExtensionProfile { * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add data disks to the virtual machines in the scale set.

* For more information about disks, see [About disks and VHDs for Azure * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional capabilities + * enabled or disabled on the virtual machine in the scale set. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with UltraSSD_LRS + * storage account on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set + * only if this property is enabled. * @member {object} [networkProfile] Specifies properties of the network * interfaces of the virtual machines in the scale set. * @member {object} [networkProfile.healthProbe] A reference to a load balancer @@ -3655,6 +3701,7 @@ export interface VirtualMachineScaleSetExtensionProfile { export interface VirtualMachineScaleSetVMProfile { osProfile?: VirtualMachineScaleSetOSProfile; storageProfile?: VirtualMachineScaleSetStorageProfile; + additionalCapabilities?: AdditionalCapabilities; networkProfile?: VirtualMachineScaleSetNetworkProfile; diagnosticsProfile?: DiagnosticsProfile; extensionProfile?: VirtualMachineScaleSetExtensionProfile; @@ -3744,7 +3791,7 @@ export interface VirtualMachineScaleSetVMProfile { * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] The data disks. * @member {object} [networkProfile] The virtual machine scale set network * profile. @@ -4009,12 +4056,22 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * [virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] Specifies * the parameters that are used to add data disks to the virtual machines in * the scale set.

For more information about disks, see [About disks * and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [virtualMachineProfile.additionalCapabilities] Specifies + * additional capabilities enabled or disabled on the virtual machine in the + * scale set. For instance: whether the virtual machine has the capability to + * support attaching managed data disks with UltraSSD_LRS storage account type. + * @member {boolean} + * [virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with UltraSSD_LRS + * storage account on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set + * only if this property is enabled. * @member {object} [virtualMachineProfile.networkProfile] Specifies properties * of the network interfaces of the virtual machines in the scale set. * @member {object} [virtualMachineProfile.networkProfile.healthProbe] A @@ -4267,7 +4324,7 @@ export interface VirtualMachineScaleSet extends Resource { * [virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] The data * disks. * @member {object} [virtualMachineProfile.networkProfile] The virtual machine @@ -5064,13 +5121,22 @@ export interface VirtualMachineScaleSetVMInstanceView { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional capabilities + * enabled or disabled on the virtual machine in the scale set. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with UltraSSD_LRS + * storage account on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set + * only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for the * virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of the @@ -5220,6 +5286,7 @@ export interface VirtualMachineScaleSetVM extends Resource { readonly instanceView?: VirtualMachineScaleSetVMInstanceView; hardwareProfile?: HardwareProfile; storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; osProfile?: OSProfile; networkProfile?: NetworkProfile; diagnosticsProfile?: DiagnosticsProfile; @@ -5659,10 +5726,11 @@ export interface ResourceSku { * @class * Initializes a new instance of the DiskSku class. * @constructor - * The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + * UltraSSD_LRS. * * @member {string} [name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [tier] The sku tier. Default value: 'Standard' . */ export interface DiskSku { @@ -5806,7 +5874,7 @@ export interface EncryptionSettings { * has the disk attached. * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [sku.tier] The sku tier. * @member {array} [zones] The Logical zone list for Disk. * @member {date} [timeCreated] The time when the disk was created. @@ -5860,6 +5928,12 @@ export interface EncryptionSettings { * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault * @member {string} [provisioningState] The disk provisioning state. + * @member {number} [diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * @member {number} [diskMBpsReadWrite] The bandwidth allowed for this disk; + * only settable for UltraSSD disks. MBps means millions of bytes per second - + * MB here uses the ISO notation, of powers of 10. */ export interface Disk extends Resource { readonly managedBy?: string; @@ -5871,6 +5945,8 @@ export interface Disk extends Resource { diskSizeGB?: number; encryptionSettings?: EncryptionSettings; readonly provisioningState?: string; + diskIOPSReadWrite?: number; + diskMBpsReadWrite?: number; } /** @@ -5909,16 +5985,24 @@ export interface Disk extends Resource { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {number} [diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * @member {number} [diskMBpsReadWrite] The bandwidth allowed for this disk; + * only settable for UltraSSD disks. MBps means millions of bytes per second - + * MB here uses the ISO notation, of powers of 10. * @member {object} [tags] Resource tags * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {string} [sku.tier] The sku tier. */ export interface DiskUpdate { osType?: string; diskSizeGB?: number; encryptionSettings?: EncryptionSettings; + diskIOPSReadWrite?: number; + diskMBpsReadWrite?: number; tags?: { [propertyName: string]: string }; sku?: DiskSku; } diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index 792d56d379..15279e3a30 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -52,6 +52,7 @@ exports.ManagedDiskParameters = require('./managedDiskParameters'); exports.OSDisk = require('./oSDisk'); exports.DataDisk = require('./dataDisk'); exports.StorageProfile = require('./storageProfile'); +exports.AdditionalCapabilities = require('./additionalCapabilities'); exports.AdditionalUnattendContent = require('./additionalUnattendContent'); exports.WinRMListener = require('./winRMListener'); exports.WinRMConfiguration = require('./winRMConfiguration'); diff --git a/lib/services/computeManagement2/lib/models/managedDiskParameters.js b/lib/services/computeManagement2/lib/models/managedDiskParameters.js index 68d7404f03..cef33f19d6 100644 --- a/lib/services/computeManagement2/lib/models/managedDiskParameters.js +++ b/lib/services/computeManagement2/lib/models/managedDiskParameters.js @@ -21,9 +21,9 @@ class ManagedDiskParameters extends models['SubResource'] { /** * Create a ManagedDiskParameters. * @member {string} [storageAccountType] Specifies the storage account type - * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and - * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * for the managed disk. UltraSSD_LRS can only be used for data disks. + * Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', + * 'UltraSSD_LRS' */ constructor() { super(); diff --git a/lib/services/computeManagement2/lib/models/oSDisk.js b/lib/services/computeManagement2/lib/models/oSDisk.js index 985daf15ec..1e2355e148 100644 --- a/lib/services/computeManagement2/lib/models/oSDisk.js +++ b/lib/services/computeManagement2/lib/models/oSDisk.js @@ -72,9 +72,9 @@ class OSDisk { * virtual machine image.

This value cannot be larger than 1023 GB * @member {object} [managedDisk] The managed disk parameters. * @member {string} [managedDisk.storageAccountType] Specifies the storage - * account type for the managed disk. Possible values are: Standard_LRS, - * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * account type for the managed disk. UltraSSD_LRS can only be used for data + * disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/storageProfile.js b/lib/services/computeManagement2/lib/models/storageProfile.js index 4075f58e29..82af386abb 100644 --- a/lib/services/computeManagement2/lib/models/storageProfile.js +++ b/lib/services/computeManagement2/lib/models/storageProfile.js @@ -92,9 +92,9 @@ class StorageProfile { * 1023 GB * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the - * storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * a data disk to a virtual machine.

For more information about * disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/virtualMachine.js b/lib/services/computeManagement2/lib/models/virtualMachine.js index 1e86ad9f99..174d3a8a93 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachine.js +++ b/lib/services/computeManagement2/lib/models/virtualMachine.js @@ -186,13 +186,22 @@ class VirtualMachine extends models['Resource'] { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching + * managed data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for * the virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of @@ -492,6 +501,14 @@ class VirtualMachine extends models['Resource'] { className: 'StorageProfile' } }, + additionalCapabilities: { + required: false, + serializedName: 'properties.additionalCapabilities', + type: { + name: 'Composite', + className: 'AdditionalCapabilities' + } + }, osProfile: { required: false, serializedName: 'properties.osProfile', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js index fea0ed48e7..a65db044d8 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js @@ -253,12 +253,23 @@ class VirtualMachineScaleSet extends models['Resource'] { * [virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] Specifies * the parameters that are used to add data disks to the virtual machines in * the scale set.

For more information about disks, see [About disks * and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [virtualMachineProfile.additionalCapabilities] Specifies + * additional capabilities enabled or disabled on the virtual machine in the + * scale set. For instance: whether the virtual machine has the capability to + * support attaching managed data disks with UltraSSD_LRS storage account + * type. + * @member {boolean} + * [virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. * @member {object} [virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js index 0ed7bb5261..44c837e279 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js @@ -37,7 +37,7 @@ class VirtualMachineScaleSetDataDisk { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js index aeb0c452f0..ddaa3ace60 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js @@ -20,7 +20,7 @@ class VirtualMachineScaleSetManagedDiskParameters { * @member {string} [storageAccountType] Specifies the storage account type * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - * 'StandardSSD_LRS' + * 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js index f72c6c0bb8..3197f288f5 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js @@ -49,7 +49,7 @@ class VirtualMachineScaleSetOSDisk { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js index 4c0b81de04..f59c9d4f53 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js @@ -70,7 +70,7 @@ class VirtualMachineScaleSetStorageProfile { * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * data disks to the virtual machines in the scale set.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js index c43ab504ac..81768dcaee 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js @@ -177,7 +177,7 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * [virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] The data * disks. * @member {object} [virtualMachineProfile.networkProfile] The virtual diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js index 7302df893f..398cfe5bb3 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js @@ -37,7 +37,7 @@ class VirtualMachineScaleSetUpdateOSDisk { * @member {string} [managedDisk.storageAccountType] Specifies the storage * account type for the managed disk. Possible values are: Standard_LRS, * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS' + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js index 11055e0402..c2098f7ddb 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js @@ -49,7 +49,7 @@ class VirtualMachineScaleSetUpdateStorageProfile { * @member {string} [osDisk.managedDisk.storageAccountType] Specifies the * storage account type for the managed disk. Possible values are: * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [dataDisks] The data disks. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js index 0626b85606..51e675a4bd 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js @@ -96,7 +96,7 @@ class VirtualMachineScaleSetUpdateVMProfile { * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] The data disks. * @member {object} [networkProfile] The virtual machine scale set network * profile. diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js index 4f2a074739..649d6fcbf8 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js @@ -250,13 +250,22 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for * the virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of @@ -524,6 +533,14 @@ class VirtualMachineScaleSetVM extends models['Resource'] { className: 'StorageProfile' } }, + additionalCapabilities: { + required: false, + serializedName: 'properties.additionalCapabilities', + type: { + name: 'Composite', + className: 'AdditionalCapabilities' + } + }, osProfile: { required: false, serializedName: 'properties.osProfile', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js index c701443c3f..c85fe6ed8b 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js @@ -162,12 +162,21 @@ class VirtualMachineScaleSetVMProfile { * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add data disks to the virtual machines in the scale set. *

For more information about disks, see [About disks and VHDs for * Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. * @member {object} [networkProfile] Specifies properties of the network * interfaces of the virtual machines in the scale set. * @member {object} [networkProfile.healthProbe] A reference to a load @@ -244,6 +253,14 @@ class VirtualMachineScaleSetVMProfile { className: 'VirtualMachineScaleSetStorageProfile' } }, + additionalCapabilities: { + required: false, + serializedName: 'additionalCapabilities', + type: { + name: 'Composite', + className: 'AdditionalCapabilities' + } + }, networkProfile: { required: false, serializedName: 'networkProfile', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js index 48de6572cc..0efb7d1e0f 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js @@ -186,13 +186,22 @@ class VirtualMachineUpdate extends models['UpdateResource'] { * @member {object} [storageProfile.osDisk.managedDisk] The managed disk * parameters. * @member {string} [storageProfile.osDisk.managedDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * Specifies the storage account type for the managed disk. UltraSSD_LRS can + * only be used for data disks. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @member {object} [additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching + * managed data disks with UltraSSD_LRS storage account type. + * @member {boolean} [additionalCapabilities.ultraSSDEnabled] Enables or + * disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. * @member {object} [osProfile] Specifies the operating system settings for * the virtual machine. * @member {string} [osProfile.computerName] Specifies the host OS name of @@ -460,6 +469,14 @@ class VirtualMachineUpdate extends models['UpdateResource'] { className: 'StorageProfile' } }, + additionalCapabilities: { + required: false, + serializedName: 'properties.additionalCapabilities', + type: { + name: 'Composite', + className: 'AdditionalCapabilities' + } + }, osProfile: { required: false, serializedName: 'properties.osProfile', diff --git a/lib/services/computeManagement2/lib/operations/disks.js b/lib/services/computeManagement2/lib/operations/disks.js index 0650e9ba33..a0ef686b1f 100644 --- a/lib/services/computeManagement2/lib/operations/disks.js +++ b/lib/services/computeManagement2/lib/operations/disks.js @@ -31,7 +31,7 @@ const WebResource = msRest.WebResource; * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -101,6 +101,14 @@ const WebResource = msRest.WebResource; * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -228,12 +236,20 @@ function _createOrUpdate(resourceGroupName, diskName, disk, options, callback) { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -343,7 +359,7 @@ function _get(resourceGroupName, diskName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -550,7 +566,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -685,7 +701,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -957,7 +973,7 @@ function _revokeAccess(resourceGroupName, diskName, options, callback) { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -1027,6 +1043,14 @@ function _revokeAccess(resourceGroupName, diskName, options, callback) { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -1059,7 +1083,7 @@ function _beginCreateOrUpdate(resourceGroupName, diskName, disk, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1253,12 +1277,20 @@ function _beginCreateOrUpdate(resourceGroupName, diskName, disk, options, callba * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -1288,7 +1320,7 @@ function _beginUpdate(resourceGroupName, diskName, disk, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1467,7 +1499,7 @@ function _beginDeleteMethod(resourceGroupName, diskName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1605,7 +1637,7 @@ function _beginGrantAccess(resourceGroupName, diskName, grantAccessData, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1767,7 +1799,7 @@ function _beginRevokeAccess(resourceGroupName, diskName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -2153,7 +2185,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -2223,6 +2255,14 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -2268,7 +2308,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -2338,6 +2378,14 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -2441,12 +2489,20 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -2525,12 +2581,20 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -3139,7 +3203,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -3209,6 +3273,14 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -3254,7 +3326,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -3324,6 +3396,14 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -3427,12 +3507,20 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -3511,12 +3599,20 @@ class Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/computeManagement2/lib/operations/images.js b/lib/services/computeManagement2/lib/operations/images.js index 536aac6b3f..e5de0f9930 100644 --- a/lib/services/computeManagement2/lib/operations/images.js +++ b/lib/services/computeManagement2/lib/operations/images.js @@ -69,7 +69,7 @@ const WebResource = msRest.WebResource; * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -210,7 +210,7 @@ function _createOrUpdate(resourceGroupName, imageName, parameters, options, call * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -834,7 +834,7 @@ function _list(options, callback) { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1074,7 +1074,7 @@ function _beginCreateOrUpdate(resourceGroupName, imageName, parameters, options, * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1714,7 +1714,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1809,7 +1809,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1926,7 +1926,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2019,7 +2019,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2475,7 +2475,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2570,7 +2570,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2687,7 +2687,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2780,7 +2780,7 @@ class Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index 6653ff210c..3af85719c1 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -2370,7 +2370,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2453,7 +2453,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2555,7 +2555,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2636,7 +2636,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2969,7 +2969,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -3052,7 +3052,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -3154,7 +3154,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -3235,7 +3235,7 @@ export interface Images { * @param {string} [parameters.storageProfile.osDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -3756,9 +3756,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -3769,6 +3769,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -4165,9 +4176,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4178,6 +4189,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -4593,9 +4615,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4606,6 +4628,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -5000,9 +5033,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -5013,6 +5046,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6422,9 +6466,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6435,6 +6479,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6831,9 +6886,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6844,6 +6899,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -7259,9 +7325,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -7272,6 +7338,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -7666,9 +7743,9 @@ export interface VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -7679,6 +7756,17 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -8879,7 +8967,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -8887,6 +8975,19 @@ export interface VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -9312,7 +9413,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9320,6 +9421,19 @@ export interface VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -9683,7 +9797,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -9990,7 +10104,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -11568,7 +11682,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -11576,6 +11690,19 @@ export interface VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -12001,7 +12128,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -12009,6 +12136,19 @@ export interface VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -12372,7 +12512,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -12679,7 +12819,7 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -15171,9 +15311,9 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -15184,6 +15324,17 @@ export interface VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -15566,9 +15717,9 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -15579,6 +15730,17 @@ export interface VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -16838,9 +17000,9 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -16851,6 +17013,17 @@ export interface VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -17233,9 +17406,9 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -17246,6 +17419,17 @@ export interface VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -18715,7 +18899,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18785,6 +18969,14 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -18818,7 +19010,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18888,6 +19080,14 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -18976,12 +19176,20 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -19048,12 +19256,20 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -19485,7 +19701,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -19555,6 +19771,14 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -19588,7 +19812,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -19658,6 +19882,14 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {string} disk.location Resource location * * @param {object} [disk.tags] Resource tags @@ -19746,12 +19978,20 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -19818,12 +20058,20 @@ export interface Disks { * @param {string} disk.encryptionSettings.keyEncryptionKey.keyUrl Url pointing * to a key or secret in KeyVault * + * @param {number} [disk.diskIOPSReadWrite] The number of IOPS allowed for this + * disk; only settable for UltraSSD disks. One operation can transfer between + * 4k and 256k bytes. + * + * @param {number} [disk.diskMBpsReadWrite] The bandwidth allowed for this + * disk; only settable for UltraSSD disks. MBps means millions of bytes per + * second - MB here uses the ISO notation, of powers of 10. + * * @param {object} [disk.tags] Resource tags * * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/computeManagement2/lib/operations/snapshots.js b/lib/services/computeManagement2/lib/operations/snapshots.js index 988a1eeefc..1452182062 100644 --- a/lib/services/computeManagement2/lib/operations/snapshots.js +++ b/lib/services/computeManagement2/lib/operations/snapshots.js @@ -342,7 +342,7 @@ function _get(resourceGroupName, snapshotName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -549,7 +549,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -684,7 +684,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1057,7 +1057,7 @@ function _beginCreateOrUpdate(resourceGroupName, snapshotName, snapshot, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1286,7 +1286,7 @@ function _beginUpdate(resourceGroupName, snapshotName, snapshot, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1465,7 +1465,7 @@ function _beginDeleteMethod(resourceGroupName, snapshotName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1603,7 +1603,7 @@ function _beginGrantAccess(resourceGroupName, snapshotName, grantAccessData, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1765,7 +1765,7 @@ function _beginRevokeAccess(resourceGroupName, snapshotName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-04-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js index 67fd414083..08927fd0fb 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js @@ -404,9 +404,9 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -417,6 +417,17 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -2209,9 +2220,9 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -2222,6 +2233,17 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -4171,9 +4193,9 @@ class VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4184,6 +4206,17 @@ class VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -4578,9 +4611,9 @@ class VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4591,6 +4624,17 @@ class VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6216,9 +6260,9 @@ class VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6229,6 +6273,17 @@ class VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6623,9 +6678,9 @@ class VirtualMachineScaleSetVMs { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6636,6 +6691,17 @@ class VirtualMachineScaleSetVMs { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine in the scale set. + * For instance: whether the virtual machine has the capability to support + * attaching managed data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js index b873fc9ba0..35c8c9cb5e 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js @@ -326,7 +326,7 @@ const WebResource = msRest.WebResource; * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -334,6 +334,19 @@ const WebResource = msRest.WebResource; * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -736,7 +749,7 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -2931,7 +2944,7 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -2939,6 +2952,19 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -3440,7 +3466,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -6232,7 +6258,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -6240,6 +6266,19 @@ class VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -6677,7 +6716,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -6685,6 +6724,19 @@ class VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -7063,7 +7115,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -7382,7 +7434,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -9461,7 +9513,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9469,6 +9521,19 @@ class VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -9906,7 +9971,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9914,6 +9979,19 @@ class VirtualMachineScaleSets { * [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.virtualMachineProfile.additionalCapabilities] + * Specifies additional capabilities enabled or disabled on the virtual machine + * in the scale set. For instance: whether the virtual machine has the + * capability to support attaching managed data disks with UltraSSD_LRS storage + * account type. + * + * @param {boolean} + * [parameters.virtualMachineProfile.additionalCapabilities.ultraSSDEnabled] + * Enables or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. @@ -10292,7 +10370,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -10611,7 +10689,7 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.storageProfile.osDisk.managedDisk.storageAccountType] * Specifies the storage account type for the managed disk. Possible values * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. diff --git a/lib/services/computeManagement2/lib/operations/virtualMachines.js b/lib/services/computeManagement2/lib/operations/virtualMachines.js index 02e0d95180..7f3c1faa44 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachines.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachines.js @@ -311,9 +311,9 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -324,6 +324,17 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -778,9 +789,9 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -791,6 +802,17 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -2855,9 +2877,9 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -2868,6 +2890,17 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -3421,9 +3454,9 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -3434,6 +3467,17 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -5572,9 +5616,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -5585,6 +5629,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -5993,9 +6048,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6006,6 +6061,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6436,9 +6502,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6449,6 +6515,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -6855,9 +6932,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6868,6 +6945,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -8724,9 +8812,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -8737,6 +8825,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -9145,9 +9244,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -9158,6 +9257,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -9588,9 +9698,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -9601,6 +9711,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * @@ -10007,9 +10128,9 @@ class VirtualMachines { * * @param {string} * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: - * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * the storage account type for the managed disk. UltraSSD_LRS can only be used + * for data disks. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -10020,6 +10141,17 @@ class VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. For instance: + * whether the virtual machine has the capability to support attaching managed + * data disks with UltraSSD_LRS storage account type. + * + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] Enables + * or disables a capability to have 1 or more managed data disks with + * UltraSSD_LRS storage account on the VM or VMSS. Managed disks with storage + * account type UltraSSD_LRS can be added to a virtual machine or virtual + * machine scale set only if this property is enabled. + * * @param {object} [parameters.osProfile] Specifies the operating system * settings for the virtual machine. * diff --git a/lib/services/computeManagement2/package.json b/lib/services/computeManagement2/package.json index e7a4ae1913..01c5160040 100644 --- a/lib/services/computeManagement2/package.json +++ b/lib/services/computeManagement2/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/computeManagementClient.js", "types": "./lib/computeManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/computeManagement2", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/containerservicesManagement/lib/models/index.d.ts b/lib/services/containerservicesManagement/lib/models/index.d.ts index 7d28bf1287..eb5ede5f15 100644 --- a/lib/services/containerservicesManagement/lib/models/index.d.ts +++ b/lib/services/containerservicesManagement/lib/models/index.d.ts @@ -708,14 +708,14 @@ export interface ManagedClusterAddonProfile { * * @member {string} clientAppID The client AAD application ID. * @member {string} serverAppID The server AAD application ID. - * @member {string} serverAppSecret The server AAD application secret. + * @member {string} [serverAppSecret] The server AAD application secret. * @member {string} [tenantID] The AAD tenant ID to use for authentication. If * not specified, will use the tenant of the deployment subscription. */ export interface ManagedClusterAADProfile { clientAppID: string; serverAppID: string; - serverAppSecret: string; + serverAppSecret?: string; tenantID?: string; } diff --git a/lib/services/containerservicesManagement/lib/models/managedClusterAADProfile.js b/lib/services/containerservicesManagement/lib/models/managedClusterAADProfile.js index 8f76641400..6647d93681 100644 --- a/lib/services/containerservicesManagement/lib/models/managedClusterAADProfile.js +++ b/lib/services/containerservicesManagement/lib/models/managedClusterAADProfile.js @@ -19,7 +19,7 @@ class ManagedClusterAADProfile { * Create a ManagedClusterAADProfile. * @member {string} clientAppID The client AAD application ID. * @member {string} serverAppID The server AAD application ID. - * @member {string} serverAppSecret The server AAD application secret. + * @member {string} [serverAppSecret] The server AAD application secret. * @member {string} [tenantID] The AAD tenant ID to use for authentication. * If not specified, will use the tenant of the deployment subscription. */ @@ -55,7 +55,7 @@ class ManagedClusterAADProfile { } }, serverAppSecret: { - required: true, + required: false, serializedName: 'serverAppSecret', type: { name: 'String' diff --git a/lib/services/containerservicesManagement/lib/operations/index.d.ts b/lib/services/containerservicesManagement/lib/operations/index.d.ts index f36a293984..0692619e57 100644 --- a/lib/services/containerservicesManagement/lib/operations/index.d.ts +++ b/lib/services/containerservicesManagement/lib/operations/index.d.ts @@ -1951,7 +1951,7 @@ export interface ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -2060,7 +2060,7 @@ export interface ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -2323,7 +2323,7 @@ export interface ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -2432,7 +2432,7 @@ export interface ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use diff --git a/lib/services/containerservicesManagement/lib/operations/managedClusters.js b/lib/services/containerservicesManagement/lib/operations/managedClusters.js index 56ba4b8d4a..fa9d0c11ea 100644 --- a/lib/services/containerservicesManagement/lib/operations/managedClusters.js +++ b/lib/services/containerservicesManagement/lib/operations/managedClusters.js @@ -1116,7 +1116,7 @@ function _get(resourceGroupName, resourceName, options, callback) { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -1432,7 +1432,7 @@ function _deleteMethod(resourceGroupName, resourceName, options, callback) { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -2924,7 +2924,7 @@ class ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -3045,7 +3045,7 @@ class ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -3377,7 +3377,7 @@ class ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use @@ -3498,7 +3498,7 @@ class ManagedClusters { * @param {string} parameters.aadProfile.serverAppID The server AAD application * ID. * - * @param {string} parameters.aadProfile.serverAppSecret The server AAD + * @param {string} [parameters.aadProfile.serverAppSecret] The server AAD * application secret. * * @param {string} [parameters.aadProfile.tenantID] The AAD tenant ID to use diff --git a/lib/services/containerservicesManagement/package.json b/lib/services/containerservicesManagement/package.json index 9a78b4d520..0577ed179e 100644 --- a/lib/services/containerservicesManagement/package.json +++ b/lib/services/containerservicesManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/containerServiceClient.js", "types": "./lib/containerServiceClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/containerservicesManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/databoxManagement/LICENSE.txt b/lib/services/databoxManagement/LICENSE.txt new file mode 100644 index 0000000000..5431ba98b9 --- /dev/null +++ b/lib/services/databoxManagement/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/databoxManagement/lib/dataBoxManagementClient.d.ts b/lib/services/databoxManagement/lib/dataBoxManagementClient.d.ts new file mode 100644 index 0000000000..be7c0f4b6c --- /dev/null +++ b/lib/services/databoxManagement/lib/dataBoxManagementClient.d.ts @@ -0,0 +1,64 @@ +/* + * 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. + */ + +import { ServiceClientCredentials } from 'ms-rest'; +import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; +import * as operations from "./operations"; + +export default class DataBoxManagementClient extends AzureServiceClient { + /** + * Initializes a new instance of the DataBoxManagementClient class. + * @constructor + * + * @class + * @param {credentials} credentials - Credentials needed for the client to connect to Azure. + * + * @param {string} subscriptionId - The Subscription Id + * + * @param {string} [baseUri] - The base URI of the service. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + */ + constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); + + credentials: ServiceClientCredentials; + + apiVersion: string; + + subscriptionId: string; + + acceptLanguage: string; + + longRunningOperationRetryTimeout: number; + + generateClientRequestId: boolean; + + // Operation groups + operations: operations.Operations; + jobs: operations.Jobs; + service: operations.Service; +} + +export { DataBoxManagementClient, models as DataBoxManagementModels }; diff --git a/lib/services/databoxManagement/lib/dataBoxManagementClient.js b/lib/services/databoxManagement/lib/dataBoxManagementClient.js new file mode 100644 index 0000000000..0ecbe860ab --- /dev/null +++ b/lib/services/databoxManagement/lib/dataBoxManagementClient.js @@ -0,0 +1,87 @@ +/* + * 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. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const ServiceClient = msRestAzure.AzureServiceClient; + +const models = require('./models'); +const operations = require('./operations'); + + +/** Class representing a DataBoxManagementClient. */ +class DataBoxManagementClient extends ServiceClient { + /** + * Create a DataBoxManagementClient. + * @param {credentials} credentials - Credentials needed for the client to connect to Azure. + * @param {string} subscriptionId - The Subscription Id + * @param {string} [baseUri] - The base URI of the service. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + */ + constructor(credentials, subscriptionId, baseUri, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId === null || subscriptionId === undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.apiVersion = '2018-01-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.baseUri = baseUri; + if (!this.baseUri) { + this.baseUri = 'https://management.azure.com'; + } + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { + this.generateClientRequestId = options.generateClientRequestId; + } + this.operations = new operations.Operations(this); + this.jobs = new operations.Jobs(this); + this.service = new operations.Service(this); + this.models = models; + msRest.addSerializationMixin(this); + } + +} + +module.exports = DataBoxManagementClient; +module.exports['default'] = DataBoxManagementClient; +module.exports.DataBoxManagementClient = DataBoxManagementClient; +module.exports.DataBoxManagementModels = models; diff --git a/lib/services/databoxManagement/lib/models/accountCredentialDetails.js b/lib/services/databoxManagement/lib/models/accountCredentialDetails.js new file mode 100644 index 0000000000..2f4ef9fc31 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/accountCredentialDetails.js @@ -0,0 +1,81 @@ +/* + * 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'; + +/** + * Credential details of the account. + * + */ +class AccountCredentialDetails { + /** + * Create a AccountCredentialDetails. + * @member {string} [accountName] Name of the account. + * @member {string} [accountConnectionString] Connection string of the + * account endpoint to use the account as a storage endpoint on the device. + * @member {array} [shareCredentialDetails] Per share level unencrypted + * access credentials. + */ + constructor() { + } + + /** + * Defines the metadata of AccountCredentialDetails + * + * @returns {object} metadata of AccountCredentialDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'AccountCredentialDetails', + type: { + name: 'Composite', + className: 'AccountCredentialDetails', + modelProperties: { + accountName: { + required: false, + readOnly: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + accountConnectionString: { + required: false, + readOnly: true, + serializedName: 'accountConnectionString', + type: { + name: 'String' + } + }, + shareCredentialDetails: { + required: false, + readOnly: true, + serializedName: 'shareCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ShareCredentialDetailsElementType', + type: { + name: 'Composite', + className: 'ShareCredentialDetails' + } + } + } + } + } + } + }; + } +} + +module.exports = AccountCredentialDetails; diff --git a/lib/services/databoxManagement/lib/models/addressValidationOutput.js b/lib/services/databoxManagement/lib/models/addressValidationOutput.js new file mode 100644 index 0000000000..0c85263f23 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/addressValidationOutput.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'; + +/** + * Output of the address validation api. + * + */ +class AddressValidationOutput { + /** + * Create a AddressValidationOutput. + * @member {string} [validationStatus] The address validation status. + * Possible values include: 'Valid', 'Invalid', 'Ambiguous' + * @member {array} [alternateAddresses] List of alternate addresses. + */ + constructor() { + } + + /** + * Defines the metadata of AddressValidationOutput + * + * @returns {object} metadata of AddressValidationOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'AddressValidationOutput', + type: { + name: 'Composite', + className: 'AddressValidationOutput', + modelProperties: { + validationStatus: { + required: false, + readOnly: true, + serializedName: 'properties.validationStatus', + type: { + name: 'Enum', + allowedValues: [ 'Valid', 'Invalid', 'Ambiguous' ] + } + }, + alternateAddresses: { + required: false, + readOnly: true, + serializedName: 'properties.alternateAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ShippingAddressElementType', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + } + } + } + } + } + }; + } +} + +module.exports = AddressValidationOutput; diff --git a/lib/services/databoxManagement/lib/models/applianceNetworkConfiguration.js b/lib/services/databoxManagement/lib/models/applianceNetworkConfiguration.js new file mode 100644 index 0000000000..30f31f6f7e --- /dev/null +++ b/lib/services/databoxManagement/lib/models/applianceNetworkConfiguration.js @@ -0,0 +1,62 @@ +/* + * 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 Network Adapter configuration of a DataBox. + * + */ +class ApplianceNetworkConfiguration { + /** + * Create a ApplianceNetworkConfiguration. + * @member {string} [name] Name of the network. + * @member {string} [macAddress] Mac Address. + */ + constructor() { + } + + /** + * Defines the metadata of ApplianceNetworkConfiguration + * + * @returns {object} metadata of ApplianceNetworkConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplianceNetworkConfiguration', + type: { + name: 'Composite', + className: 'ApplianceNetworkConfiguration', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + macAddress: { + required: false, + readOnly: true, + serializedName: 'macAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplianceNetworkConfiguration; diff --git a/lib/services/databoxManagement/lib/models/armBaseObject.js b/lib/services/databoxManagement/lib/models/armBaseObject.js new file mode 100644 index 0000000000..a20f3e73cf --- /dev/null +++ b/lib/services/databoxManagement/lib/models/armBaseObject.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'; + +/** + * Base class for all objects under resource. + * + */ +class ArmBaseObject { + /** + * Create a ArmBaseObject. + * @member {string} [name] Name of the object. + * @member {string} [id] Id of the object. + * @member {string} [type] Type of the object. + */ + constructor() { + } + + /** + * Defines the metadata of ArmBaseObject + * + * @returns {object} metadata of ArmBaseObject + * + */ + mapper() { + return { + required: false, + serializedName: 'ArmBaseObject', + type: { + name: 'Composite', + className: 'ArmBaseObject', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ArmBaseObject; diff --git a/lib/services/databoxManagement/lib/models/availableSkuRequest.js b/lib/services/databoxManagement/lib/models/availableSkuRequest.js new file mode 100644 index 0000000000..ec7cab0b40 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/availableSkuRequest.js @@ -0,0 +1,88 @@ +/* + * 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 filters for showing the available skus. + * + */ +class AvailableSkuRequest { + /** + * Create a AvailableSkuRequest. + * @member {string} country ISO country code. Country for hardware shipment. + * For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * @member {string} location Location for data transfer. For locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * @member {array} [skuNames] Sku Names to filter for available skus + */ + constructor() { + } + + /** + * Defines the metadata of AvailableSkuRequest + * + * @returns {object} metadata of AvailableSkuRequest + * + */ + mapper() { + return { + required: false, + serializedName: 'AvailableSkuRequest', + type: { + name: 'Composite', + className: 'AvailableSkuRequest', + modelProperties: { + transferType: { + required: true, + isConstant: true, + serializedName: 'transferType', + defaultValue: 'ImportToAzure', + type: { + name: 'String' + } + }, + country: { + required: true, + serializedName: 'country', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + skuNames: { + required: false, + serializedName: 'skuNames', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SkuNameElementType', + type: { + name: 'Enum', + allowedValues: [ 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' ] + } + } + } + } + } + } + }; + } +} + +module.exports = AvailableSkuRequest; diff --git a/lib/services/databoxManagement/lib/models/availableSkusResult.js b/lib/services/databoxManagement/lib/models/availableSkusResult.js new file mode 100644 index 0000000000..47905503e7 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/availableSkusResult.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'; + +/** + * The available skus operation response. + */ +class AvailableSkusResult extends Array { + /** + * Create a AvailableSkusResult. + * @member {string} [nextLink] Link for the next set of skus. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AvailableSkusResult + * + * @returns {object} metadata of AvailableSkusResult + * + */ + mapper() { + return { + required: false, + serializedName: 'AvailableSkusResult', + type: { + name: 'Composite', + className: 'AvailableSkusResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SkuInformationElementType', + type: { + name: 'Composite', + className: 'SkuInformation' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AvailableSkusResult; diff --git a/lib/services/databoxManagement/lib/models/cancellationReason.js b/lib/services/databoxManagement/lib/models/cancellationReason.js new file mode 100644 index 0000000000..ad05bc05e3 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/cancellationReason.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'; + +/** + * Reason for cancellation. + * + */ +class CancellationReason { + /** + * Create a CancellationReason. + * @member {string} reason Reason for cancellation. + */ + constructor() { + } + + /** + * Defines the metadata of CancellationReason + * + * @returns {object} metadata of CancellationReason + * + */ + mapper() { + return { + required: false, + serializedName: 'CancellationReason', + type: { + name: 'Composite', + className: 'CancellationReason', + modelProperties: { + reason: { + required: true, + serializedName: 'reason', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CancellationReason; diff --git a/lib/services/databoxManagement/lib/models/contactDetails.js b/lib/services/databoxManagement/lib/models/contactDetails.js new file mode 100644 index 0000000000..f1a1a28e31 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/contactDetails.js @@ -0,0 +1,110 @@ +/* + * 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'; + +/** + * Contact Details. + * + */ +class ContactDetails { + /** + * Create a ContactDetails. + * @member {string} contactName Contact name of the person. + * @member {string} phone Phone number of the contact person. + * @member {string} [phoneExtension] Phone extension number of the contact + * person. + * @member {string} [mobile] Mobile number of the contact person. + * @member {array} emailList List of Email-ids to be notified about job + * progress. + * @member {array} [notificationPreference] Notification preference for a job + * stage. + */ + constructor() { + } + + /** + * Defines the metadata of ContactDetails + * + * @returns {object} metadata of ContactDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'ContactDetails', + type: { + name: 'Composite', + className: 'ContactDetails', + modelProperties: { + contactName: { + required: true, + serializedName: 'contactName', + type: { + name: 'String' + } + }, + phone: { + required: true, + serializedName: 'phone', + type: { + name: 'String' + } + }, + phoneExtension: { + required: false, + serializedName: 'phoneExtension', + type: { + name: 'String' + } + }, + mobile: { + required: false, + serializedName: 'mobile', + type: { + name: 'String' + } + }, + emailList: { + required: true, + serializedName: 'emailList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + notificationPreference: { + required: false, + serializedName: 'notificationPreference', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NotificationPreferenceElementType', + type: { + name: 'Composite', + className: 'NotificationPreference' + } + } + } + } + } + } + }; + } +} + +module.exports = ContactDetails; diff --git a/lib/services/databoxManagement/lib/models/copyLogDetails.js b/lib/services/databoxManagement/lib/models/copyLogDetails.js new file mode 100644 index 0000000000..0e75a970ff --- /dev/null +++ b/lib/services/databoxManagement/lib/models/copyLogDetails.js @@ -0,0 +1,58 @@ +/* + * 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'; + +/** + * Details for log generated during copy. + * + */ +class CopyLogDetails { + /** + * Create a CopyLogDetails. + * @member {string} copyLogDetailsType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of CopyLogDetails + * + * @returns {object} metadata of CopyLogDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'CopyLogDetails', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'CopyLogDetails', + modelProperties: { + copyLogDetailsType: { + required: true, + serializedName: 'copyLogDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CopyLogDetails; diff --git a/lib/services/databoxManagement/lib/models/copyProgress.js b/lib/services/databoxManagement/lib/models/copyProgress.js new file mode 100644 index 0000000000..4a7f340fec --- /dev/null +++ b/lib/services/databoxManagement/lib/models/copyProgress.js @@ -0,0 +1,84 @@ +/* + * 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'; + +/** + * Copy progress. + * + */ +class CopyProgress { + /** + * Create a CopyProgress. + * @member {string} [storageAccountName] Name of the storage account where + * the data needs to be uploaded. + * @member {string} [accountId] Id of the account where the data needs to be + * uploaded. + * @member {number} [bytesSentToCloud] Amount of data uploaded by the job as + * of now. + * @member {number} [totalBytesToProcess] Total amount of data to be + * processed by the job. + */ + constructor() { + } + + /** + * Defines the metadata of CopyProgress + * + * @returns {object} metadata of CopyProgress + * + */ + mapper() { + return { + required: false, + serializedName: 'CopyProgress', + type: { + name: 'Composite', + className: 'CopyProgress', + modelProperties: { + storageAccountName: { + required: false, + readOnly: true, + serializedName: 'storageAccountName', + type: { + name: 'String' + } + }, + accountId: { + required: false, + readOnly: true, + serializedName: 'accountId', + type: { + name: 'String' + } + }, + bytesSentToCloud: { + required: false, + readOnly: true, + serializedName: 'bytesSentToCloud', + type: { + name: 'Number' + } + }, + totalBytesToProcess: { + required: false, + readOnly: true, + serializedName: 'totalBytesToProcess', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = CopyProgress; diff --git a/lib/services/databoxManagement/lib/models/dataBoxAccountCopyLogDetails.js b/lib/services/databoxManagement/lib/models/dataBoxAccountCopyLogDetails.js new file mode 100644 index 0000000000..90f9b9360a --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxAccountCopyLogDetails.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'; + +const models = require('./index'); + +/** + * Copy log details for a storage account of a DataBox job + * + * @extends models['CopyLogDetails'] + */ +class DataBoxAccountCopyLogDetails extends models['CopyLogDetails'] { + /** + * Create a DataBoxAccountCopyLogDetails. + * @member {string} [accountName] Destination account name. + * @member {string} [copyLogLink] Link for copy logs. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxAccountCopyLogDetails + * + * @returns {object} metadata of DataBoxAccountCopyLogDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBox', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'DataBoxAccountCopyLogDetails', + modelProperties: { + copyLogDetailsType: { + required: true, + serializedName: 'copyLogDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + accountName: { + required: false, + readOnly: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + copyLogLink: { + required: false, + readOnly: true, + serializedName: 'copyLogLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataBoxAccountCopyLogDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxDiskCopyLogDetails.js b/lib/services/databoxManagement/lib/models/dataBoxDiskCopyLogDetails.js new file mode 100644 index 0000000000..b5b8c926aa --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxDiskCopyLogDetails.js @@ -0,0 +1,88 @@ +/* + * 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'); + +/** + * Copy Log Details for a disk + * + * @extends models['CopyLogDetails'] + */ +class DataBoxDiskCopyLogDetails extends models['CopyLogDetails'] { + /** + * Create a DataBoxDiskCopyLogDetails. + * @member {string} [diskSerialNumber] Disk Serial Number. + * @member {string} [errorLogLink] Link for copy error logs. + * @member {string} [verboseLogLink] Link for copy verbose logs. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxDiskCopyLogDetails + * + * @returns {object} metadata of DataBoxDiskCopyLogDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'DataBoxDiskCopyLogDetails', + modelProperties: { + copyLogDetailsType: { + required: true, + serializedName: 'copyLogDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + diskSerialNumber: { + required: false, + readOnly: true, + serializedName: 'diskSerialNumber', + type: { + name: 'String' + } + }, + errorLogLink: { + required: false, + readOnly: true, + serializedName: 'errorLogLink', + type: { + name: 'String' + } + }, + verboseLogLink: { + required: false, + readOnly: true, + serializedName: 'verboseLogLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataBoxDiskCopyLogDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxDiskCopyProgress.js b/lib/services/databoxManagement/lib/models/dataBoxDiskCopyProgress.js new file mode 100644 index 0000000000..5699bf139f --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxDiskCopyProgress.js @@ -0,0 +1,84 @@ +/* + * 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'; + +/** + * DataBox Disk Copy Progress + * + */ +class DataBoxDiskCopyProgress { + /** + * Create a DataBoxDiskCopyProgress. + * @member {string} [serialNumber] The serial number of the disk + * @member {number} [bytesCopied] Bytes copied during the copy of disk. + * @member {number} [percentComplete] Indicates the percentage completed for + * the copy of the disk. + * @member {string} [status] The Status of the copy. Possible values include: + * 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', + * 'NotReturned' + */ + constructor() { + } + + /** + * Defines the metadata of DataBoxDiskCopyProgress + * + * @returns {object} metadata of DataBoxDiskCopyProgress + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxDiskCopyProgress', + type: { + name: 'Composite', + className: 'DataBoxDiskCopyProgress', + modelProperties: { + serialNumber: { + required: false, + readOnly: true, + serializedName: 'serialNumber', + type: { + name: 'String' + } + }, + bytesCopied: { + required: false, + readOnly: true, + serializedName: 'bytesCopied', + type: { + name: 'Number' + } + }, + percentComplete: { + required: false, + readOnly: true, + serializedName: 'percentComplete', + type: { + name: 'Number' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'Enum', + allowedValues: [ 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', 'NotReturned' ] + } + } + } + } + }; + } +} + +module.exports = DataBoxDiskCopyProgress; diff --git a/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js new file mode 100644 index 0000000000..4db3d114e8 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxDiskJobDetails.js @@ -0,0 +1,255 @@ +/* + * 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'); + +/** + * DataBox Disk Job Details. + * + * @extends models['JobDetails'] + */ +class DataBoxDiskJobDetails extends models['JobDetails'] { + /** + * Create a DataBoxDiskJobDetails. + * @member {object} [preferredDisks] User preference on what size disks are + * needed for the job. The map is from the disk size in TB to the count. Eg. + * {2,5} means 5 disks of 2 TB size. Key is string but will be checked + * against an int. + * @member {array} [copyProgress] Copy progress per disk. + * @member {object} [disksAndSizeDetails] Contains the map of disk serial + * number to the disk size being used for the job. Is returned only after the + * disks are shipped to the customer. + * @member {string} [passkey] User entered passkey for DataBox Disk job. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxDiskJobDetails + * + * @returns {object} metadata of DataBoxDiskJobDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobDetailsType', + clientName: 'jobDetailsType' + }, + uberParent: 'JobDetails', + className: 'DataBoxDiskJobDetails', + modelProperties: { + expectedDataSizeInTeraBytes: { + required: false, + serializedName: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + jobStages: { + required: false, + readOnly: true, + serializedName: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobStagesElementType', + type: { + name: 'Composite', + className: 'JobStages' + } + } + } + }, + contactDetails: { + required: true, + serializedName: 'contactDetails', + type: { + name: 'Composite', + className: 'ContactDetails' + } + }, + shippingAddress: { + required: true, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + }, + deliveryPackage: { + required: false, + readOnly: true, + serializedName: 'deliveryPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + returnPackage: { + required: false, + readOnly: true, + serializedName: 'returnPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + destinationAccountDetails: { + required: true, + serializedName: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + className: 'DestinationAccountDetails' + } + } + } + }, + errorDetails: { + required: false, + readOnly: true, + serializedName: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + className: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serializedName: 'preferences', + type: { + name: 'Composite', + className: 'Preferences' + } + }, + copyLogDetails: { + required: false, + readOnly: true, + serializedName: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'CopyLogDetails' + } + } + } + }, + reverseShipmentLabelSasKey: { + required: false, + readOnly: true, + serializedName: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chainOfCustodySasKey: { + required: false, + readOnly: true, + serializedName: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serializedName: 'jobDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + preferredDisks: { + required: false, + serializedName: 'preferredDisks', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + copyProgress: { + required: false, + readOnly: true, + serializedName: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataBoxDiskCopyProgressElementType', + type: { + name: 'Composite', + className: 'DataBoxDiskCopyProgress' + } + } + } + }, + disksAndSizeDetails: { + required: false, + readOnly: true, + serializedName: 'disksAndSizeDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + passkey: { + required: false, + serializedName: 'passkey', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataBoxDiskJobDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxDiskJobSecrets.js b/lib/services/databoxManagement/lib/models/dataBoxDiskJobSecrets.js new file mode 100644 index 0000000000..06b013fafb --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxDiskJobSecrets.js @@ -0,0 +1,98 @@ +/* + * 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 secrets related to disk job. + * + * @extends models['JobSecrets'] + */ +class DataBoxDiskJobSecrets extends models['JobSecrets'] { + /** + * Create a DataBoxDiskJobSecrets. + * @member {array} [diskSecrets] Contains the list of secrets object for that + * device. + * @member {string} [passKey] PassKey for the disk Job. + * @member {boolean} [isPasskeyUserDefined] Whether passkey was provided by + * user. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxDiskJobSecrets + * + * @returns {object} metadata of DataBoxDiskJobSecrets + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobSecretsType', + clientName: 'jobSecretsType' + }, + uberParent: 'JobSecrets', + className: 'DataBoxDiskJobSecrets', + modelProperties: { + jobSecretsType: { + required: true, + serializedName: 'jobSecretsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + diskSecrets: { + required: false, + readOnly: true, + serializedName: 'diskSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DiskSecretElementType', + type: { + name: 'Composite', + className: 'DiskSecret' + } + } + } + }, + passKey: { + required: false, + readOnly: true, + serializedName: 'passKey', + type: { + name: 'String' + } + }, + isPasskeyUserDefined: { + required: false, + readOnly: true, + serializedName: 'isPasskeyUserDefined', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = DataBoxDiskJobSecrets; diff --git a/lib/services/databoxManagement/lib/models/dataBoxHeavyAccountCopyLogDetails.js b/lib/services/databoxManagement/lib/models/dataBoxHeavyAccountCopyLogDetails.js new file mode 100644 index 0000000000..3ef2c7939a --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxHeavyAccountCopyLogDetails.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Copy log details for a storage account for Databox heavy + * + * @extends models['CopyLogDetails'] + */ +class DataBoxHeavyAccountCopyLogDetails extends models['CopyLogDetails'] { + /** + * Create a DataBoxHeavyAccountCopyLogDetails. + * @member {string} [accountName] Destination account name. + * @member {array} [copyLogLink] Link for copy logs. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxHeavyAccountCopyLogDetails + * + * @returns {object} metadata of DataBoxHeavyAccountCopyLogDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxHeavy', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'DataBoxHeavyAccountCopyLogDetails', + modelProperties: { + copyLogDetailsType: { + required: true, + serializedName: 'copyLogDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + accountName: { + required: false, + readOnly: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + copyLogLink: { + required: false, + readOnly: true, + serializedName: 'copyLogLink', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxHeavyAccountCopyLogDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js new file mode 100644 index 0000000000..a8b80f2dc7 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobDetails.js @@ -0,0 +1,211 @@ +/* + * 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'); + +/** + * Databox Heavy Device Job Details + * + * @extends models['JobDetails'] + */ +class DataBoxHeavyJobDetails extends models['JobDetails'] { + /** + * Create a DataBoxHeavyJobDetails. + * @member {array} [copyProgress] Copy progress per account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxHeavyJobDetails + * + * @returns {object} metadata of DataBoxHeavyJobDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxHeavy', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobDetailsType', + clientName: 'jobDetailsType' + }, + uberParent: 'JobDetails', + className: 'DataBoxHeavyJobDetails', + modelProperties: { + expectedDataSizeInTeraBytes: { + required: false, + serializedName: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + jobStages: { + required: false, + readOnly: true, + serializedName: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobStagesElementType', + type: { + name: 'Composite', + className: 'JobStages' + } + } + } + }, + contactDetails: { + required: true, + serializedName: 'contactDetails', + type: { + name: 'Composite', + className: 'ContactDetails' + } + }, + shippingAddress: { + required: true, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + }, + deliveryPackage: { + required: false, + readOnly: true, + serializedName: 'deliveryPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + returnPackage: { + required: false, + readOnly: true, + serializedName: 'returnPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + destinationAccountDetails: { + required: true, + serializedName: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + className: 'DestinationAccountDetails' + } + } + } + }, + errorDetails: { + required: false, + readOnly: true, + serializedName: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + className: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serializedName: 'preferences', + type: { + name: 'Composite', + className: 'Preferences' + } + }, + copyLogDetails: { + required: false, + readOnly: true, + serializedName: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'CopyLogDetails' + } + } + } + }, + reverseShipmentLabelSasKey: { + required: false, + readOnly: true, + serializedName: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chainOfCustodySasKey: { + required: false, + readOnly: true, + serializedName: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serializedName: 'jobDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + copyProgress: { + required: false, + readOnly: true, + serializedName: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyProgressElementType', + type: { + name: 'Composite', + className: 'CopyProgress' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxHeavyJobDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxHeavyJobSecrets.js b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobSecrets.js new file mode 100644 index 0000000000..c91acbcf35 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxHeavyJobSecrets.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'; + +const models = require('./index'); + +/** + * The secrets related to a databox heavy job. + * + * @extends models['JobSecrets'] + */ +class DataBoxHeavyJobSecrets extends models['JobSecrets'] { + /** + * Create a DataBoxHeavyJobSecrets. + * @member {array} [cabinetPodSecrets] Contains the list of secret objects + * for a databox heavy job. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxHeavyJobSecrets + * + * @returns {object} metadata of DataBoxHeavyJobSecrets + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxHeavy', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobSecretsType', + clientName: 'jobSecretsType' + }, + uberParent: 'JobSecrets', + className: 'DataBoxHeavyJobSecrets', + modelProperties: { + jobSecretsType: { + required: true, + serializedName: 'jobSecretsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + cabinetPodSecrets: { + required: false, + readOnly: true, + serializedName: 'cabinetPodSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataBoxHeavySecretElementType', + type: { + name: 'Composite', + className: 'DataBoxHeavySecret' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxHeavyJobSecrets; diff --git a/lib/services/databoxManagement/lib/models/dataBoxHeavySecret.js b/lib/services/databoxManagement/lib/models/dataBoxHeavySecret.js new file mode 100644 index 0000000000..8b3e78c591 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxHeavySecret.js @@ -0,0 +1,110 @@ +/* + * 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 secrets related to a databox heavy. + * + */ +class DataBoxHeavySecret { + /** + * Create a DataBoxHeavySecret. + * @member {string} [deviceSerialNumber] Serial number of the assigned + * device. + * @member {string} [devicePassword] Password for out of the box experience + * on device. + * @member {array} [networkConfigurations] Network configuration of the + * appliance. + * @member {string} [encodedValidationCertPubKey] The base 64 encoded public + * key to authenticate with the device + * @member {array} [accountCredentialDetails] Per account level access + * credentials. + */ + constructor() { + } + + /** + * Defines the metadata of DataBoxHeavySecret + * + * @returns {object} metadata of DataBoxHeavySecret + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxHeavySecret', + type: { + name: 'Composite', + className: 'DataBoxHeavySecret', + modelProperties: { + deviceSerialNumber: { + required: false, + readOnly: true, + serializedName: 'deviceSerialNumber', + type: { + name: 'String' + } + }, + devicePassword: { + required: false, + readOnly: true, + serializedName: 'devicePassword', + type: { + name: 'String' + } + }, + networkConfigurations: { + required: false, + readOnly: true, + serializedName: 'networkConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplianceNetworkConfigurationElementType', + type: { + name: 'Composite', + className: 'ApplianceNetworkConfiguration' + } + } + } + }, + encodedValidationCertPubKey: { + required: false, + readOnly: true, + serializedName: 'encodedValidationCertPubKey', + type: { + name: 'String' + } + }, + accountCredentialDetails: { + required: false, + readOnly: true, + serializedName: 'accountCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccountCredentialDetailsElementType', + type: { + name: 'Composite', + className: 'AccountCredentialDetails' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxHeavySecret; diff --git a/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js b/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js new file mode 100644 index 0000000000..e19501f82c --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxJobDetails.js @@ -0,0 +1,211 @@ +/* + * 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'); + +/** + * Databox Job Details + * + * @extends models['JobDetails'] + */ +class DataBoxJobDetails extends models['JobDetails'] { + /** + * Create a DataBoxJobDetails. + * @member {array} [copyProgress] Copy progress per storage account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataBoxJobDetails + * + * @returns {object} metadata of DataBoxJobDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBox', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobDetailsType', + clientName: 'jobDetailsType' + }, + uberParent: 'JobDetails', + className: 'DataBoxJobDetails', + modelProperties: { + expectedDataSizeInTeraBytes: { + required: false, + serializedName: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + jobStages: { + required: false, + readOnly: true, + serializedName: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobStagesElementType', + type: { + name: 'Composite', + className: 'JobStages' + } + } + } + }, + contactDetails: { + required: true, + serializedName: 'contactDetails', + type: { + name: 'Composite', + className: 'ContactDetails' + } + }, + shippingAddress: { + required: true, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + }, + deliveryPackage: { + required: false, + readOnly: true, + serializedName: 'deliveryPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + returnPackage: { + required: false, + readOnly: true, + serializedName: 'returnPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + destinationAccountDetails: { + required: true, + serializedName: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + className: 'DestinationAccountDetails' + } + } + } + }, + errorDetails: { + required: false, + readOnly: true, + serializedName: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + className: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serializedName: 'preferences', + type: { + name: 'Composite', + className: 'Preferences' + } + }, + copyLogDetails: { + required: false, + readOnly: true, + serializedName: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'CopyLogDetails' + } + } + } + }, + reverseShipmentLabelSasKey: { + required: false, + readOnly: true, + serializedName: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chainOfCustodySasKey: { + required: false, + readOnly: true, + serializedName: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serializedName: 'jobDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + copyProgress: { + required: false, + readOnly: true, + serializedName: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyProgressElementType', + type: { + name: 'Composite', + className: 'CopyProgress' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxJobDetails; diff --git a/lib/services/databoxManagement/lib/models/dataBoxSecret.js b/lib/services/databoxManagement/lib/models/dataBoxSecret.js new file mode 100644 index 0000000000..d21d2c3a1d --- /dev/null +++ b/lib/services/databoxManagement/lib/models/dataBoxSecret.js @@ -0,0 +1,110 @@ +/* + * 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 secrets related to a DataBox. + * + */ +class DataBoxSecret { + /** + * Create a DataBoxSecret. + * @member {string} [deviceSerialNumber] Serial number of the assigned + * device. + * @member {string} [devicePassword] Password for out of the box experience + * on device. + * @member {array} [networkConfigurations] Network configuration of the + * appliance. + * @member {string} [encodedValidationCertPubKey] The base 64 encoded public + * key to authenticate with the device + * @member {array} [accountCredentialDetails] Per account level access + * credentials. + */ + constructor() { + } + + /** + * Defines the metadata of DataBoxSecret + * + * @returns {object} metadata of DataBoxSecret + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBoxSecret', + type: { + name: 'Composite', + className: 'DataBoxSecret', + modelProperties: { + deviceSerialNumber: { + required: false, + readOnly: true, + serializedName: 'deviceSerialNumber', + type: { + name: 'String' + } + }, + devicePassword: { + required: false, + readOnly: true, + serializedName: 'devicePassword', + type: { + name: 'String' + } + }, + networkConfigurations: { + required: false, + readOnly: true, + serializedName: 'networkConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplianceNetworkConfigurationElementType', + type: { + name: 'Composite', + className: 'ApplianceNetworkConfiguration' + } + } + } + }, + encodedValidationCertPubKey: { + required: false, + readOnly: true, + serializedName: 'encodedValidationCertPubKey', + type: { + name: 'String' + } + }, + accountCredentialDetails: { + required: false, + readOnly: true, + serializedName: 'accountCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccountCredentialDetailsElementType', + type: { + name: 'Composite', + className: 'AccountCredentialDetails' + } + } + } + } + } + } + }; + } +} + +module.exports = DataBoxSecret; diff --git a/lib/services/databoxManagement/lib/models/databoxJobSecrets.js b/lib/services/databoxManagement/lib/models/databoxJobSecrets.js new file mode 100644 index 0000000000..7abd8401c6 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/databoxJobSecrets.js @@ -0,0 +1,78 @@ +/* + * 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 secrets related to a databox job. + * + * @extends models['JobSecrets'] + */ +class DataboxJobSecrets extends models['JobSecrets'] { + /** + * Create a DataboxJobSecrets. + * @member {array} [podSecrets] Contains the list of secret objects for a + * job. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataboxJobSecrets + * + * @returns {object} metadata of DataboxJobSecrets + * + */ + mapper() { + return { + required: false, + serializedName: 'DataBox', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobSecretsType', + clientName: 'jobSecretsType' + }, + uberParent: 'JobSecrets', + className: 'DataboxJobSecrets', + modelProperties: { + jobSecretsType: { + required: true, + serializedName: 'jobSecretsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + podSecrets: { + required: false, + serializedName: 'podSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataBoxSecretElementType', + type: { + name: 'Composite', + className: 'DataBoxSecret' + } + } + } + } + } + } + }; + } +} + +module.exports = DataboxJobSecrets; diff --git a/lib/services/databoxManagement/lib/models/destinationAccountDetails.js b/lib/services/databoxManagement/lib/models/destinationAccountDetails.js new file mode 100644 index 0000000000..c1a7a7c680 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/destinationAccountDetails.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'; + +/** + * Details for the destination account. + * + */ +class DestinationAccountDetails { + /** + * Create a DestinationAccountDetails. + * @member {string} accountId Destination storage account id. + */ + constructor() { + } + + /** + * Defines the metadata of DestinationAccountDetails + * + * @returns {object} metadata of DestinationAccountDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'DestinationAccountDetails', + type: { + name: 'Composite', + className: 'DestinationAccountDetails', + modelProperties: { + accountId: { + required: true, + serializedName: 'accountId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DestinationAccountDetails; diff --git a/lib/services/databoxManagement/lib/models/destinationToServiceLocationMap.js b/lib/services/databoxManagement/lib/models/destinationToServiceLocationMap.js new file mode 100644 index 0000000000..22d264ea2b --- /dev/null +++ b/lib/services/databoxManagement/lib/models/destinationToServiceLocationMap.js @@ -0,0 +1,62 @@ +/* + * 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'; + +/** + * Map of destination location to service location + * + */ +class DestinationToServiceLocationMap { + /** + * Create a DestinationToServiceLocationMap. + * @member {string} [destinationLocation] Location of the destination. + * @member {string} [serviceLocation] Location of the service. + */ + constructor() { + } + + /** + * Defines the metadata of DestinationToServiceLocationMap + * + * @returns {object} metadata of DestinationToServiceLocationMap + * + */ + mapper() { + return { + required: false, + serializedName: 'DestinationToServiceLocationMap', + type: { + name: 'Composite', + className: 'DestinationToServiceLocationMap', + modelProperties: { + destinationLocation: { + required: false, + readOnly: true, + serializedName: 'destinationLocation', + type: { + name: 'String' + } + }, + serviceLocation: { + required: false, + readOnly: true, + serializedName: 'serviceLocation', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DestinationToServiceLocationMap; diff --git a/lib/services/databoxManagement/lib/models/diskSecret.js b/lib/services/databoxManagement/lib/models/diskSecret.js new file mode 100644 index 0000000000..deaef7f5d4 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/diskSecret.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'; + +/** + * Contains all the secrets of a Disk. + * + */ +class DiskSecret { + /** + * Create a DiskSecret. + * @member {string} [diskSerialNumber] Serial number of the assigned disk. + * @member {string} [bitLockerKey] Bit Locker key of the disk which can be + * used to unlock the disk to copy data. + */ + constructor() { + } + + /** + * Defines the metadata of DiskSecret + * + * @returns {object} metadata of DiskSecret + * + */ + mapper() { + return { + required: false, + serializedName: 'DiskSecret', + type: { + name: 'Composite', + className: 'DiskSecret', + modelProperties: { + diskSerialNumber: { + required: false, + readOnly: true, + serializedName: 'diskSerialNumber', + type: { + name: 'String' + } + }, + bitLockerKey: { + required: false, + readOnly: true, + serializedName: 'bitLockerKey', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DiskSecret; diff --git a/lib/services/databoxManagement/lib/models/errorModel.js b/lib/services/databoxManagement/lib/models/errorModel.js new file mode 100644 index 0000000000..8e415baa3b --- /dev/null +++ b/lib/services/databoxManagement/lib/models/errorModel.js @@ -0,0 +1,64 @@ +/* + * 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'; + +/** + * Top level error for the job. + * + */ +class ErrorModel { + /** + * Create a ErrorModel. + * @member {string} [code] Error code that can be used to programmatically + * identify the error. + * @member {string} [message] Describes the error in detail and provides + * debugging information. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorModel + * + * @returns {object} metadata of ErrorModel + * + */ + mapper() { + return { + required: false, + serializedName: 'Error', + type: { + name: 'Composite', + className: 'ErrorModel', + modelProperties: { + code: { + required: false, + readOnly: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + readOnly: true, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ErrorModel; diff --git a/lib/services/databoxManagement/lib/models/index.d.ts b/lib/services/databoxManagement/lib/models/index.d.ts new file mode 100644 index 0000000000..fee82c5576 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/index.d.ts @@ -0,0 +1,1126 @@ +/* + * 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. + */ + +import { BaseResource } from 'ms-rest-azure'; +import { CloudError } from 'ms-rest-azure'; +import * as moment from 'moment'; + +export { BaseResource } from 'ms-rest-azure'; +export { CloudError } from 'ms-rest-azure'; + + +/** + * @class + * Initializes a new instance of the ShareCredentialDetails class. + * @constructor + * Credential details of the shares in account. + * + * @member {string} [shareName] Name of the share. + * @member {string} [shareType] Type of the share. Possible values include: + * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' + * @member {string} [userName] User name for the share. + * @member {string} [password] Password for the share. + * @member {array} [supportedAccessProtocols] Access protocols supported on the + * device. + */ +export interface ShareCredentialDetails { + readonly shareName?: string; + readonly shareType?: string; + readonly userName?: string; + readonly password?: string; + readonly supportedAccessProtocols?: string[]; +} + +/** + * @class + * Initializes a new instance of the AccountCredentialDetails class. + * @constructor + * Credential details of the account. + * + * @member {string} [accountName] Name of the account. + * @member {string} [accountConnectionString] Connection string of the account + * endpoint to use the account as a storage endpoint on the device. + * @member {array} [shareCredentialDetails] Per share level unencrypted access + * credentials. + */ +export interface AccountCredentialDetails { + readonly accountName?: string; + readonly accountConnectionString?: string; + readonly shareCredentialDetails?: ShareCredentialDetails[]; +} + +/** + * @class + * Initializes a new instance of the ShippingAddress class. + * @constructor + * Shipping address where customer wishes to receive the device. + * + * @member {string} streetAddress1 Street Address line 1. + * @member {string} [streetAddress2] Street Address line 2. + * @member {string} [streetAddress3] Street Address line 3. + * @member {string} [city] Name of the City. + * @member {string} [stateOrProvince] Name of the State or Province. + * @member {string} country Name of the Country. + * @member {string} postalCode Postal code. + * @member {string} [zipExtendedCode] Extended Zip Code. + * @member {string} [companyName] Name of the company. + * @member {string} [addressType] Type of address. Possible values include: + * 'None', 'Residential', 'Commercial' + */ +export interface ShippingAddress { + streetAddress1: string; + streetAddress2?: string; + streetAddress3?: string; + city?: string; + stateOrProvince?: string; + country: string; + postalCode: string; + zipExtendedCode?: string; + companyName?: string; + addressType?: string; +} + +/** + * @class + * Initializes a new instance of the AddressValidationOutput class. + * @constructor + * Output of the address validation api. + * + * @member {string} [validationStatus] The address validation status. Possible + * values include: 'Valid', 'Invalid', 'Ambiguous' + * @member {array} [alternateAddresses] List of alternate addresses. + */ +export interface AddressValidationOutput { + readonly validationStatus?: string; + readonly alternateAddresses?: ShippingAddress[]; +} + +/** + * @class + * Initializes a new instance of the ApplianceNetworkConfiguration class. + * @constructor + * The Network Adapter configuration of a DataBox. + * + * @member {string} [name] Name of the network. + * @member {string} [macAddress] Mac Address. + */ +export interface ApplianceNetworkConfiguration { + readonly name?: string; + readonly macAddress?: string; +} + +/** + * @class + * Initializes a new instance of the ArmBaseObject class. + * @constructor + * Base class for all objects under resource. + * + * @member {string} [name] Name of the object. + * @member {string} [id] Id of the object. + * @member {string} [type] Type of the object. + */ +export interface ArmBaseObject { + readonly name?: string; + readonly id?: string; + readonly type?: string; +} + +/** + * @class + * Initializes a new instance of the AvailableSkuRequest class. + * @constructor + * The filters for showing the available skus. + * + * @member {string} country ISO country code. Country for hardware shipment. + * For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * @member {string} location Location for data transfer. For locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * @member {array} [skuNames] Sku Names to filter for available skus + */ +export interface AvailableSkuRequest { + country: string; + location: string; + skuNames?: string[]; +} + +/** + * @class + * Initializes a new instance of the Sku class. + * @constructor + * The Sku. + * + * @member {string} name The sku name. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [displayName] The display name of the sku. + * @member {string} [family] The sku family. + */ +export interface Sku { + name: string; + displayName?: string; + family?: string; +} + +/** + * @class + * Initializes a new instance of the DestinationToServiceLocationMap class. + * @constructor + * Map of destination location to service location + * + * @member {string} [destinationLocation] Location of the destination. + * @member {string} [serviceLocation] Location of the service. + */ +export interface DestinationToServiceLocationMap { + readonly destinationLocation?: string; + readonly serviceLocation?: string; +} + +/** + * @class + * Initializes a new instance of the SkuCapacity class. + * @constructor + * Capacity of the sku. + * + * @member {string} [usable] Usable capacity in TB. + * @member {string} [maximum] Maximum capacity in TB. + */ +export interface SkuCapacity { + readonly usable?: string; + readonly maximum?: string; +} + +/** + * @class + * Initializes a new instance of the SkuCost class. + * @constructor + * Describes metadata for retrieving price info. + * + * @member {string} [meterId] Meter id of the Sku. + * @member {string} [meterType] The type of the meter. + */ +export interface SkuCost { + readonly meterId?: string; + readonly meterType?: string; +} + +/** + * @class + * Initializes a new instance of the SkuInformation class. + * @constructor + * Information of the sku. + * + * @member {object} [sku] The Sku. + * @member {string} [sku.name] The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [sku.displayName] The display name of the sku. + * @member {string} [sku.family] The sku family. + * @member {boolean} [enabled] The sku is enabled or not. + * @member {array} [destinationToServiceLocationMap] The map of destination + * location to service location. + * @member {object} [capacity] Capacity of the Sku. + * @member {string} [capacity.usable] Usable capacity in TB. + * @member {string} [capacity.maximum] Maximum capacity in TB. + * @member {array} [costs] Cost of the Sku. + * @member {array} [apiVersions] Api versions that support this Sku. + * @member {string} [disabledReason] Reason why the Sku is disabled. Possible + * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType' + * @member {string} [disabledReasonMessage] Message for why the Sku is + * disabled. + * @member {string} [requiredFeature] Required feature to access the sku. + */ +export interface SkuInformation { + readonly sku?: Sku; + readonly enabled?: boolean; + readonly destinationToServiceLocationMap?: DestinationToServiceLocationMap[]; + readonly capacity?: SkuCapacity; + readonly costs?: SkuCost[]; + readonly apiVersions?: string[]; + readonly disabledReason?: string; + readonly disabledReasonMessage?: string; + readonly requiredFeature?: string; +} + +/** + * @class + * Initializes a new instance of the CancellationReason class. + * @constructor + * Reason for cancellation. + * + * @member {string} reason Reason for cancellation. + */ +export interface CancellationReason { + reason: string; +} + +/** + * @class + * Initializes a new instance of the NotificationPreference class. + * @constructor + * Notification preference for a job stage. + * + * @member {string} stageName Name of the stage. Possible values include: + * 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', + * 'DataCopy' + * @member {boolean} sendNotification Notification is required or not. + */ +export interface NotificationPreference { + stageName: string; + sendNotification: boolean; +} + +/** + * @class + * Initializes a new instance of the ContactDetails class. + * @constructor + * Contact Details. + * + * @member {string} contactName Contact name of the person. + * @member {string} phone Phone number of the contact person. + * @member {string} [phoneExtension] Phone extension number of the contact + * person. + * @member {string} [mobile] Mobile number of the contact person. + * @member {array} emailList List of Email-ids to be notified about job + * progress. + * @member {array} [notificationPreference] Notification preference for a job + * stage. + */ +export interface ContactDetails { + contactName: string; + phone: string; + phoneExtension?: string; + mobile?: string; + emailList: string[]; + notificationPreference?: NotificationPreference[]; +} + +/** + * @class + * Initializes a new instance of the CopyLogDetails class. + * @constructor + * Details for log generated during copy. + * + * @member {string} copyLogDetailsType Polymorphic Discriminator + */ +export interface CopyLogDetails { + copyLogDetailsType: string; +} + +/** + * @class + * Initializes a new instance of the CopyProgress class. + * @constructor + * Copy progress. + * + * @member {string} [storageAccountName] Name of the storage account where the + * data needs to be uploaded. + * @member {string} [accountId] Id of the account where the data needs to be + * uploaded. + * @member {number} [bytesSentToCloud] Amount of data uploaded by the job as of + * now. + * @member {number} [totalBytesToProcess] Total amount of data to be processed + * by the job. + */ +export interface CopyProgress { + readonly storageAccountName?: string; + readonly accountId?: string; + readonly bytesSentToCloud?: number; + readonly totalBytesToProcess?: number; +} + +/** + * @class + * Initializes a new instance of the DataBoxAccountCopyLogDetails class. + * @constructor + * Copy log details for a storage account of a DataBox job + * + * @member {string} [accountName] Destination account name. + * @member {string} [copyLogLink] Link for copy logs. + */ +export interface DataBoxAccountCopyLogDetails extends CopyLogDetails { + readonly accountName?: string; + readonly copyLogLink?: string; +} + +/** + * @class + * Initializes a new instance of the DataBoxDiskCopyLogDetails class. + * @constructor + * Copy Log Details for a disk + * + * @member {string} [diskSerialNumber] Disk Serial Number. + * @member {string} [errorLogLink] Link for copy error logs. + * @member {string} [verboseLogLink] Link for copy verbose logs. + */ +export interface DataBoxDiskCopyLogDetails extends CopyLogDetails { + readonly diskSerialNumber?: string; + readonly errorLogLink?: string; + readonly verboseLogLink?: string; +} + +/** + * @class + * Initializes a new instance of the DataBoxDiskCopyProgress class. + * @constructor + * DataBox Disk Copy Progress + * + * @member {string} [serialNumber] The serial number of the disk + * @member {number} [bytesCopied] Bytes copied during the copy of disk. + * @member {number} [percentComplete] Indicates the percentage completed for + * the copy of the disk. + * @member {string} [status] The Status of the copy. Possible values include: + * 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', + * 'NotReturned' + */ +export interface DataBoxDiskCopyProgress { + readonly serialNumber?: string; + readonly bytesCopied?: number; + readonly percentComplete?: number; + readonly status?: string; +} + +/** + * @class + * Initializes a new instance of the JobDetails class. + * @constructor + * Job details. + * + * @member {number} [expectedDataSizeInTeraBytes] The expected size of the + * data, which needs to be transfered in this job, in tera bytes. + * @member {array} [jobStages] List of stages that run in the job. + * @member {object} contactDetails Contact details for notification and + * shipping. + * @member {string} [contactDetails.contactName] Contact name of the person. + * @member {string} [contactDetails.phone] Phone number of the contact person. + * @member {string} [contactDetails.phoneExtension] Phone extension number of + * the contact person. + * @member {string} [contactDetails.mobile] Mobile number of the contact + * person. + * @member {array} [contactDetails.emailList] List of Email-ids to be notified + * about job progress. + * @member {array} [contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} shippingAddress Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * @member {object} [deliveryPackage] Delivery package shipping details. + * @member {string} [deliveryPackage.carrierName] Name of the carrier. + * @member {string} [deliveryPackage.trackingId] Tracking Id of shipment. + * @member {string} [deliveryPackage.trackingUrl] Url where shipment can be + * tracked. + * @member {object} [returnPackage] Return package shipping details. + * @member {string} [returnPackage.carrierName] Name of the carrier. + * @member {string} [returnPackage.trackingId] Tracking Id of shipment. + * @member {string} [returnPackage.trackingUrl] Url where shipment can be + * tracked. + * @member {array} destinationAccountDetails Destination account details. + * @member {array} [errorDetails] Error details for failure. This is optional. + * @member {object} [preferences] Preferences for the order. + * @member {array} [preferences.preferredDataCenterRegion] + * @member {array} [copyLogDetails] List of copy log details. + * @member {string} [reverseShipmentLabelSasKey] Shared access key to download + * the return shipment label + * @member {string} [chainOfCustodySasKey] Shared access key to download the + * chain of custody logs + * @member {string} jobDetailsType Polymorphic Discriminator + */ +export interface JobDetails { + expectedDataSizeInTeraBytes?: number; + readonly jobStages?: JobStages[]; + contactDetails: ContactDetails; + shippingAddress: ShippingAddress; + readonly deliveryPackage?: PackageShippingDetails; + readonly returnPackage?: PackageShippingDetails; + destinationAccountDetails: DestinationAccountDetails[]; + readonly errorDetails?: JobErrorDetails[]; + preferences?: Preferences; + readonly copyLogDetails?: CopyLogDetails[]; + readonly reverseShipmentLabelSasKey?: string; + readonly chainOfCustodySasKey?: string; + jobDetailsType: string; +} + +/** + * @class + * Initializes a new instance of the DataBoxDiskJobDetails class. + * @constructor + * DataBox Disk Job Details. + * + * @member {object} [preferredDisks] User preference on what size disks are + * needed for the job. The map is from the disk size in TB to the count. Eg. + * {2,5} means 5 disks of 2 TB size. Key is string but will be checked against + * an int. + * @member {array} [copyProgress] Copy progress per disk. + * @member {object} [disksAndSizeDetails] Contains the map of disk serial + * number to the disk size being used for the job. Is returned only after the + * disks are shipped to the customer. + * @member {string} [passkey] User entered passkey for DataBox Disk job. + */ +export interface DataBoxDiskJobDetails extends JobDetails { + preferredDisks?: { [propertyName: string]: number }; + readonly copyProgress?: DataBoxDiskCopyProgress[]; + readonly disksAndSizeDetails?: { [propertyName: string]: number }; + passkey?: string; +} + +/** + * @class + * Initializes a new instance of the DiskSecret class. + * @constructor + * Contains all the secrets of a Disk. + * + * @member {string} [diskSerialNumber] Serial number of the assigned disk. + * @member {string} [bitLockerKey] Bit Locker key of the disk which can be used + * to unlock the disk to copy data. + */ +export interface DiskSecret { + readonly diskSerialNumber?: string; + readonly bitLockerKey?: string; +} + +/** + * @class + * Initializes a new instance of the JobSecrets class. + * @constructor + * The base class for the secrets + * + * @member {string} jobSecretsType Polymorphic Discriminator + */ +export interface JobSecrets { + jobSecretsType: string; +} + +/** + * @class + * Initializes a new instance of the DataBoxDiskJobSecrets class. + * @constructor + * The secrets related to disk job. + * + * @member {array} [diskSecrets] Contains the list of secrets object for that + * device. + * @member {string} [passKey] PassKey for the disk Job. + * @member {boolean} [isPasskeyUserDefined] Whether passkey was provided by + * user. + */ +export interface DataBoxDiskJobSecrets extends JobSecrets { + readonly diskSecrets?: DiskSecret[]; + readonly passKey?: string; + readonly isPasskeyUserDefined?: boolean; +} + +/** + * @class + * Initializes a new instance of the DataBoxHeavyAccountCopyLogDetails class. + * @constructor + * Copy log details for a storage account for Databox heavy + * + * @member {string} [accountName] Destination account name. + * @member {array} [copyLogLink] Link for copy logs. + */ +export interface DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { + readonly accountName?: string; + readonly copyLogLink?: string[]; +} + +/** + * @class + * Initializes a new instance of the DataBoxHeavyJobDetails class. + * @constructor + * Databox Heavy Device Job Details + * + * @member {array} [copyProgress] Copy progress per account. + */ +export interface DataBoxHeavyJobDetails extends JobDetails { + readonly copyProgress?: CopyProgress[]; +} + +/** + * @class + * Initializes a new instance of the DataBoxHeavySecret class. + * @constructor + * The secrets related to a databox heavy. + * + * @member {string} [deviceSerialNumber] Serial number of the assigned device. + * @member {string} [devicePassword] Password for out of the box experience on + * device. + * @member {array} [networkConfigurations] Network configuration of the + * appliance. + * @member {string} [encodedValidationCertPubKey] The base 64 encoded public + * key to authenticate with the device + * @member {array} [accountCredentialDetails] Per account level access + * credentials. + */ +export interface DataBoxHeavySecret { + readonly deviceSerialNumber?: string; + readonly devicePassword?: string; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; + readonly encodedValidationCertPubKey?: string; + readonly accountCredentialDetails?: AccountCredentialDetails[]; +} + +/** + * @class + * Initializes a new instance of the DataBoxHeavyJobSecrets class. + * @constructor + * The secrets related to a databox heavy job. + * + * @member {array} [cabinetPodSecrets] Contains the list of secret objects for + * a databox heavy job. + */ +export interface DataBoxHeavyJobSecrets extends JobSecrets { + readonly cabinetPodSecrets?: DataBoxHeavySecret[]; +} + +/** + * @class + * Initializes a new instance of the DataBoxJobDetails class. + * @constructor + * Databox Job Details + * + * @member {array} [copyProgress] Copy progress per storage account. + */ +export interface DataBoxJobDetails extends JobDetails { + readonly copyProgress?: CopyProgress[]; +} + +/** + * @class + * Initializes a new instance of the DataBoxSecret class. + * @constructor + * The secrets related to a DataBox. + * + * @member {string} [deviceSerialNumber] Serial number of the assigned device. + * @member {string} [devicePassword] Password for out of the box experience on + * device. + * @member {array} [networkConfigurations] Network configuration of the + * appliance. + * @member {string} [encodedValidationCertPubKey] The base 64 encoded public + * key to authenticate with the device + * @member {array} [accountCredentialDetails] Per account level access + * credentials. + */ +export interface DataBoxSecret { + readonly deviceSerialNumber?: string; + readonly devicePassword?: string; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; + readonly encodedValidationCertPubKey?: string; + readonly accountCredentialDetails?: AccountCredentialDetails[]; +} + +/** + * @class + * Initializes a new instance of the DataboxJobSecrets class. + * @constructor + * The secrets related to a databox job. + * + * @member {array} [podSecrets] Contains the list of secret objects for a job. + */ +export interface DataboxJobSecrets extends JobSecrets { + podSecrets?: DataBoxSecret[]; +} + +/** + * @class + * Initializes a new instance of the DestinationAccountDetails class. + * @constructor + * Details for the destination account. + * + * @member {string} accountId Destination storage account id. + */ +export interface DestinationAccountDetails { + accountId: string; +} + +/** + * @class + * Initializes a new instance of the ErrorModel class. + * @constructor + * Top level error for the job. + * + * @member {string} [code] Error code that can be used to programmatically + * identify the error. + * @member {string} [message] Describes the error in detail and provides + * debugging information. + */ +export interface ErrorModel { + readonly code?: string; + readonly message?: string; +} + +/** + * @class + * Initializes a new instance of the JobErrorDetails class. + * @constructor + * Job Error Details for providing the information and recommended action. + * + * @member {string} [errorMessage] Message for the error. + * @member {number} [errorCode] Code for the error. + * @member {string} [recommendedAction] Recommended action for the error. + * @member {string} [exceptionMessage] Contains the non localized exception + * message + */ +export interface JobErrorDetails { + readonly errorMessage?: string; + readonly errorCode?: number; + readonly recommendedAction?: string; + readonly exceptionMessage?: string; +} + +/** + * @class + * Initializes a new instance of the JobStages class. + * @constructor + * Job stages. + * + * @member {string} [stageName] Name of the job stage. Possible values include: + * 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', + * 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', + * 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted' + * @member {string} [displayName] Display name of the job stage. + * @member {string} [stageStatus] Status of the job stage. Possible values + * include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', + * 'Cancelling', 'SucceededWithErrors' + * @member {date} [stageTime] Time for the job stage in UTC ISO 8601 format. + * @member {object} [jobStageDetails] Job Stage Details + * @member {array} [errorDetails] Error details for the stage. + */ +export interface JobStages { + readonly stageName?: string; + readonly displayName?: string; + readonly stageStatus?: string; + readonly stageTime?: Date; + readonly jobStageDetails?: any; + readonly errorDetails?: JobErrorDetails[]; +} + +/** + * @class + * Initializes a new instance of the PackageShippingDetails class. + * @constructor + * Shipping details. + * + * @member {string} [carrierName] Name of the carrier. + * @member {string} [trackingId] Tracking Id of shipment. + * @member {string} [trackingUrl] Url where shipment can be tracked. + */ +export interface PackageShippingDetails { + readonly carrierName?: string; + readonly trackingId?: string; + readonly trackingUrl?: string; +} + +/** + * @class + * Initializes a new instance of the Preferences class. + * @constructor + * Preferences related to the order + * + * @member {array} [preferredDataCenterRegion] + */ +export interface Preferences { + preferredDataCenterRegion?: string[]; +} + +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * Model of the Resource. + * + * @member {string} location The location of the resource. This will be one of + * the supported and registered Azure Regions (e.g. West US, East US, Southeast + * Asia, etc.). The region of a resource cannot be changed once it is created, + * but if an identical region is specified on update the request will succeed. + * @member {object} [tags] The list of key value pairs that describe the + * resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * @member {object} sku The sku type. + * @member {string} [sku.name] The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [sku.displayName] The display name of the sku. + * @member {string} [sku.family] The sku family. + */ +export interface Resource extends BaseResource { + location: string; + tags?: { [propertyName: string]: string }; + sku: Sku; +} + +/** + * @class + * Initializes a new instance of the JobResource class. + * @constructor + * Job Resource. + * + * @member {boolean} [isCancellable] Describes whether the job is cancellable + * or not. + * @member {boolean} [isDeletable] Describes whether the job is deletable or + * not. + * @member {boolean} [isShippingAddressEditable] Describes whether the shipping + * address is editable or not. + * @member {string} [status] Name of the stage which is in progress. Possible + * values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', + * 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', + * 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', + * 'Failed_IssueDetectedAtAzureDC', 'Aborted' + * @member {date} [startTime] Time at which the job was started in UTC ISO 8601 + * format. + * @member {object} [error] Top level error for the job. + * @member {string} [error.code] Error code that can be used to + * programmatically identify the error. + * @member {string} [error.message] Describes the error in detail and provides + * debugging information. + * @member {object} [details] Details of a job run. This field will only be + * sent for expand details filter. + * @member {number} [details.expectedDataSizeInTeraBytes] The expected size of + * the data, which needs to be transfered in this job, in tera bytes. + * @member {array} [details.jobStages] List of stages that run in the job. + * @member {object} [details.contactDetails] Contact details for notification + * and shipping. + * @member {string} [details.contactDetails.contactName] Contact name of the + * person. + * @member {string} [details.contactDetails.phone] Phone number of the contact + * person. + * @member {string} [details.contactDetails.phoneExtension] Phone extension + * number of the contact person. + * @member {string} [details.contactDetails.mobile] Mobile number of the + * contact person. + * @member {array} [details.contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [details.contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} [details.shippingAddress] Shipping address of the customer. + * @member {string} [details.shippingAddress.streetAddress1] Street Address + * line 1. + * @member {string} [details.shippingAddress.streetAddress2] Street Address + * line 2. + * @member {string} [details.shippingAddress.streetAddress3] Street Address + * line 3. + * @member {string} [details.shippingAddress.city] Name of the City. + * @member {string} [details.shippingAddress.stateOrProvince] Name of the State + * or Province. + * @member {string} [details.shippingAddress.country] Name of the Country. + * @member {string} [details.shippingAddress.postalCode] Postal code. + * @member {string} [details.shippingAddress.zipExtendedCode] Extended Zip + * Code. + * @member {string} [details.shippingAddress.companyName] Name of the company. + * @member {string} [details.shippingAddress.addressType] Type of address. + * Possible values include: 'None', 'Residential', 'Commercial' + * @member {object} [details.deliveryPackage] Delivery package shipping + * details. + * @member {string} [details.deliveryPackage.carrierName] Name of the carrier. + * @member {string} [details.deliveryPackage.trackingId] Tracking Id of + * shipment. + * @member {string} [details.deliveryPackage.trackingUrl] Url where shipment + * can be tracked. + * @member {object} [details.returnPackage] Return package shipping details. + * @member {string} [details.returnPackage.carrierName] Name of the carrier. + * @member {string} [details.returnPackage.trackingId] Tracking Id of shipment. + * @member {string} [details.returnPackage.trackingUrl] Url where shipment can + * be tracked. + * @member {array} [details.destinationAccountDetails] Destination account + * details. + * @member {array} [details.errorDetails] Error details for failure. This is + * optional. + * @member {object} [details.preferences] Preferences for the order. + * @member {array} [details.preferences.preferredDataCenterRegion] + * @member {array} [details.copyLogDetails] List of copy log details. + * @member {string} [details.reverseShipmentLabelSasKey] Shared access key to + * download the return shipment label + * @member {string} [details.chainOfCustodySasKey] Shared access key to + * download the chain of custody logs + * @member {string} [details.jobDetailsType] Polymorphic Discriminator + * @member {string} [cancellationReason] Reason for cancellation. + * @member {string} [name] Name of the object. + * @member {string} [id] Id of the object. + * @member {string} [type] Type of the object. + */ +export interface JobResource extends Resource { + readonly isCancellable?: boolean; + readonly isDeletable?: boolean; + readonly isShippingAddressEditable?: boolean; + readonly status?: string; + readonly startTime?: Date; + readonly error?: ErrorModel; + details?: JobDetails; + readonly cancellationReason?: string; + readonly name?: string; + readonly id?: string; + readonly type?: string; +} + +/** + * @class + * Initializes a new instance of the UpdateJobDetails class. + * @constructor + * Job details for update. + * + * @member {object} [contactDetails] Contact details for notification and + * shipping. + * @member {string} [contactDetails.contactName] Contact name of the person. + * @member {string} [contactDetails.phone] Phone number of the contact person. + * @member {string} [contactDetails.phoneExtension] Phone extension number of + * the contact person. + * @member {string} [contactDetails.mobile] Mobile number of the contact + * person. + * @member {array} [contactDetails.emailList] List of Email-ids to be notified + * about job progress. + * @member {array} [contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} [shippingAddress] Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + */ +export interface UpdateJobDetails { + contactDetails?: ContactDetails; + shippingAddress?: ShippingAddress; +} + +/** + * @class + * Initializes a new instance of the JobResourceUpdateParameter class. + * @constructor + * The JobResourceUpdateParameter. + * + * @member {object} [details] Details of a job to be updated. + * @member {object} [details.contactDetails] Contact details for notification + * and shipping. + * @member {string} [details.contactDetails.contactName] Contact name of the + * person. + * @member {string} [details.contactDetails.phone] Phone number of the contact + * person. + * @member {string} [details.contactDetails.phoneExtension] Phone extension + * number of the contact person. + * @member {string} [details.contactDetails.mobile] Mobile number of the + * contact person. + * @member {array} [details.contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [details.contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} [details.shippingAddress] Shipping address of the customer. + * @member {string} [details.shippingAddress.streetAddress1] Street Address + * line 1. + * @member {string} [details.shippingAddress.streetAddress2] Street Address + * line 2. + * @member {string} [details.shippingAddress.streetAddress3] Street Address + * line 3. + * @member {string} [details.shippingAddress.city] Name of the City. + * @member {string} [details.shippingAddress.stateOrProvince] Name of the State + * or Province. + * @member {string} [details.shippingAddress.country] Name of the Country. + * @member {string} [details.shippingAddress.postalCode] Postal code. + * @member {string} [details.shippingAddress.zipExtendedCode] Extended Zip + * Code. + * @member {string} [details.shippingAddress.companyName] Name of the company. + * @member {string} [details.shippingAddress.addressType] Type of address. + * Possible values include: 'None', 'Residential', 'Commercial' + * @member {array} [destinationAccountDetails] Destination account details. + * @member {object} [tags] The list of key value pairs that describe the + * resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + */ +export interface JobResourceUpdateParameter { + details?: UpdateJobDetails; + destinationAccountDetails?: DestinationAccountDetails[]; + tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the OperationDisplay class. + * @constructor + * Operation display + * + * @member {string} [provider] Provider name. + * @member {string} [resource] Resource name. + * @member {string} [operation] Localized name of the operation for display + * purpose. + * @member {string} [description] Localized description of the operation for + * display purpose. + */ +export interface OperationDisplay { + provider?: string; + resource?: string; + operation?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the Operation class. + * @constructor + * Operation entity. + * + * @member {string} [name] Name of the operation. Format: + * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + * @member {object} [display] Operation display values. + * @member {string} [display.provider] Provider name. + * @member {string} [display.resource] Resource name. + * @member {string} [display.operation] Localized name of the operation for + * display purpose. + * @member {string} [display.description] Localized description of the + * operation for display purpose. + * @member {object} [properties] Operation properties. + * @member {string} [origin] Origin of the operation. Can be : + * user|system|user,system + */ +export interface Operation { + readonly name?: string; + readonly display?: OperationDisplay; + readonly properties?: any; + readonly origin?: string; +} + +/** + * @class + * Initializes a new instance of the ShipmentPickUpRequest class. + * @constructor + * Shipment pick up request details. + * + * @member {date} startTime Minimum date after which the pick up should + * commence, this must be in local time of pick up area. + * @member {date} endTime Maximum date before which the pick up should + * commence, this must be in local time of pick up area. + * @member {string} shipmentLocation Shipment Location in the pickup place. + * Eg.front desk + */ +export interface ShipmentPickUpRequest { + startTime: Date; + endTime: Date; + shipmentLocation: string; +} + +/** + * @class + * Initializes a new instance of the ShipmentPickUpResponse class. + * @constructor + * Shipment pick up response. + * + * @member {string} [confirmationNumber] Confirmation number for the pick up + * request. + * @member {date} [readyByTime] Time by which shipment should be ready for pick + * up, this is in local time of pick up area. + */ +export interface ShipmentPickUpResponse { + readonly confirmationNumber?: string; + readonly readyByTime?: Date; +} + +/** + * @class + * Initializes a new instance of the UnencryptedCredentials class. + * @constructor + * Unencrypted credentials for accessing device. + * + * @member {string} [jobName] Name of the job. + * @member {object} [jobSecrets] Secrets related to this job. + * @member {string} [jobSecrets.jobSecretsType] Polymorphic Discriminator + */ +export interface UnencryptedCredentials { + readonly jobName?: string; + readonly jobSecrets?: JobSecrets; +} + +/** + * @class + * Initializes a new instance of the ValidateAddress class. + * @constructor + * The requirements to validate customer address where the device needs to be + * shipped. + * + * @member {object} shippingAddress Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * @member {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + */ +export interface ValidateAddress { + shippingAddress: ShippingAddress; + deviceType: string; +} + + +/** + * @class + * Initializes a new instance of the OperationList class. + * @constructor + * Operation Collection. + * + * @member {string} [nextLink] Link for the next set of operations. + */ +export interface OperationList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the JobResourceList class. + * @constructor + * Job Resource Collection + * + * @member {string} [nextLink] Link for the next set of job resources. + */ +export interface JobResourceList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the UnencryptedCredentialsList class. + * @constructor + * List of unencrypted credentials for accessing device. + * + * @member {string} [nextLink] Link for the next set of unencrypted + * credentials. + */ +export interface UnencryptedCredentialsList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the AvailableSkusResult class. + * @constructor + * The available skus operation response. + * + * @member {string} [nextLink] Link for the next set of skus. + */ +export interface AvailableSkusResult extends Array { + nextLink?: string; +} diff --git a/lib/services/databoxManagement/lib/models/index.js b/lib/services/databoxManagement/lib/models/index.js new file mode 100644 index 0000000000..726f31c4a6 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/index.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +var msRestAzure = require('ms-rest-azure'); + +exports.BaseResource = msRestAzure.BaseResource; +exports.CloudError = msRestAzure.CloudError; +exports.ShareCredentialDetails = require('./shareCredentialDetails'); +exports.AccountCredentialDetails = require('./accountCredentialDetails'); +exports.ShippingAddress = require('./shippingAddress'); +exports.AddressValidationOutput = require('./addressValidationOutput'); +exports.ApplianceNetworkConfiguration = require('./applianceNetworkConfiguration'); +exports.ArmBaseObject = require('./armBaseObject'); +exports.AvailableSkuRequest = require('./availableSkuRequest'); +exports.Sku = require('./sku'); +exports.DestinationToServiceLocationMap = require('./destinationToServiceLocationMap'); +exports.SkuCapacity = require('./skuCapacity'); +exports.SkuCost = require('./skuCost'); +exports.SkuInformation = require('./skuInformation'); +exports.CancellationReason = require('./cancellationReason'); +exports.NotificationPreference = require('./notificationPreference'); +exports.ContactDetails = require('./contactDetails'); +exports.CopyLogDetails = require('./copyLogDetails'); +exports.CopyProgress = require('./copyProgress'); +exports.DataBoxAccountCopyLogDetails = require('./dataBoxAccountCopyLogDetails'); +exports.DataBoxDiskCopyLogDetails = require('./dataBoxDiskCopyLogDetails'); +exports.DataBoxDiskCopyProgress = require('./dataBoxDiskCopyProgress'); +exports.JobDetails = require('./jobDetails'); +exports.DataBoxDiskJobDetails = require('./dataBoxDiskJobDetails'); +exports.DiskSecret = require('./diskSecret'); +exports.JobSecrets = require('./jobSecrets'); +exports.DataBoxDiskJobSecrets = require('./dataBoxDiskJobSecrets'); +exports.DataBoxHeavyAccountCopyLogDetails = require('./dataBoxHeavyAccountCopyLogDetails'); +exports.DataBoxHeavyJobDetails = require('./dataBoxHeavyJobDetails'); +exports.DataBoxHeavySecret = require('./dataBoxHeavySecret'); +exports.DataBoxHeavyJobSecrets = require('./dataBoxHeavyJobSecrets'); +exports.DataBoxJobDetails = require('./dataBoxJobDetails'); +exports.DataBoxSecret = require('./dataBoxSecret'); +exports.DataboxJobSecrets = require('./databoxJobSecrets'); +exports.DestinationAccountDetails = require('./destinationAccountDetails'); +exports.ErrorModel = require('./errorModel'); +exports.JobErrorDetails = require('./jobErrorDetails'); +exports.JobStages = require('./jobStages'); +exports.PackageShippingDetails = require('./packageShippingDetails'); +exports.Preferences = require('./preferences'); +exports.Resource = require('./resource'); +exports.JobResource = require('./jobResource'); +exports.UpdateJobDetails = require('./updateJobDetails'); +exports.JobResourceUpdateParameter = require('./jobResourceUpdateParameter'); +exports.OperationDisplay = require('./operationDisplay'); +exports.Operation = require('./operation'); +exports.ShipmentPickUpRequest = require('./shipmentPickUpRequest'); +exports.ShipmentPickUpResponse = require('./shipmentPickUpResponse'); +exports.UnencryptedCredentials = require('./unencryptedCredentials'); +exports.ValidateAddress = require('./validateAddress'); +exports.OperationList = require('./operationList'); +exports.JobResourceList = require('./jobResourceList'); +exports.UnencryptedCredentialsList = require('./unencryptedCredentialsList'); +exports.AvailableSkusResult = require('./availableSkusResult'); +exports.discriminators = { + 'CopyLogDetails' : exports.CopyLogDetails, + 'CopyLogDetails.DataBox' : exports.DataBoxAccountCopyLogDetails, + 'CopyLogDetails.DataBoxDisk' : exports.DataBoxDiskCopyLogDetails, + 'JobDetails.DataBoxDisk' : exports.DataBoxDiskJobDetails, + 'JobSecrets.DataBoxDisk' : exports.DataBoxDiskJobSecrets, + 'CopyLogDetails.DataBoxHeavy' : exports.DataBoxHeavyAccountCopyLogDetails, + 'JobDetails.DataBoxHeavy' : exports.DataBoxHeavyJobDetails, + 'JobSecrets.DataBoxHeavy' : exports.DataBoxHeavyJobSecrets, + 'JobDetails.DataBox' : exports.DataBoxJobDetails, + 'JobSecrets.DataBox' : exports.DataboxJobSecrets, + 'JobDetails' : exports.JobDetails, + 'JobSecrets' : exports.JobSecrets +}; diff --git a/lib/services/databoxManagement/lib/models/jobDetails.js b/lib/services/databoxManagement/lib/models/jobDetails.js new file mode 100644 index 0000000000..c9a50e2889 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobDetails.js @@ -0,0 +1,240 @@ +/* + * 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'; + +/** + * Job details. + * + */ +class JobDetails { + /** + * Create a JobDetails. + * @member {number} [expectedDataSizeInTeraBytes] The expected size of the + * data, which needs to be transfered in this job, in tera bytes. + * @member {array} [jobStages] List of stages that run in the job. + * @member {object} contactDetails Contact details for notification and + * shipping. + * @member {string} [contactDetails.contactName] Contact name of the person. + * @member {string} [contactDetails.phone] Phone number of the contact + * person. + * @member {string} [contactDetails.phoneExtension] Phone extension number of + * the contact person. + * @member {string} [contactDetails.mobile] Mobile number of the contact + * person. + * @member {array} [contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} shippingAddress Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * @member {object} [deliveryPackage] Delivery package shipping details. + * @member {string} [deliveryPackage.carrierName] Name of the carrier. + * @member {string} [deliveryPackage.trackingId] Tracking Id of shipment. + * @member {string} [deliveryPackage.trackingUrl] Url where shipment can be + * tracked. + * @member {object} [returnPackage] Return package shipping details. + * @member {string} [returnPackage.carrierName] Name of the carrier. + * @member {string} [returnPackage.trackingId] Tracking Id of shipment. + * @member {string} [returnPackage.trackingUrl] Url where shipment can be + * tracked. + * @member {array} destinationAccountDetails Destination account details. + * @member {array} [errorDetails] Error details for failure. This is + * optional. + * @member {object} [preferences] Preferences for the order. + * @member {array} [preferences.preferredDataCenterRegion] + * @member {array} [copyLogDetails] List of copy log details. + * @member {string} [reverseShipmentLabelSasKey] Shared access key to + * download the return shipment label + * @member {string} [chainOfCustodySasKey] Shared access key to download the + * chain of custody logs + * @member {string} jobDetailsType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of JobDetails + * + * @returns {object} metadata of JobDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'JobDetails', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobDetailsType', + clientName: 'jobDetailsType' + }, + uberParent: 'JobDetails', + className: 'JobDetails', + modelProperties: { + expectedDataSizeInTeraBytes: { + required: false, + serializedName: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + jobStages: { + required: false, + readOnly: true, + serializedName: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobStagesElementType', + type: { + name: 'Composite', + className: 'JobStages' + } + } + } + }, + contactDetails: { + required: true, + serializedName: 'contactDetails', + type: { + name: 'Composite', + className: 'ContactDetails' + } + }, + shippingAddress: { + required: true, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + }, + deliveryPackage: { + required: false, + readOnly: true, + serializedName: 'deliveryPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + returnPackage: { + required: false, + readOnly: true, + serializedName: 'returnPackage', + type: { + name: 'Composite', + className: 'PackageShippingDetails' + } + }, + destinationAccountDetails: { + required: true, + serializedName: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + className: 'DestinationAccountDetails' + } + } + } + }, + errorDetails: { + required: false, + readOnly: true, + serializedName: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + className: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serializedName: 'preferences', + type: { + name: 'Composite', + className: 'Preferences' + } + }, + copyLogDetails: { + required: false, + readOnly: true, + serializedName: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'copyLogDetailsType', + clientName: 'copyLogDetailsType' + }, + uberParent: 'CopyLogDetails', + className: 'CopyLogDetails' + } + } + } + }, + reverseShipmentLabelSasKey: { + required: false, + readOnly: true, + serializedName: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chainOfCustodySasKey: { + required: false, + readOnly: true, + serializedName: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serializedName: 'jobDetailsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobDetails; diff --git a/lib/services/databoxManagement/lib/models/jobErrorDetails.js b/lib/services/databoxManagement/lib/models/jobErrorDetails.js new file mode 100644 index 0000000000..88693f272a --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobErrorDetails.js @@ -0,0 +1,81 @@ +/* + * 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'; + +/** + * Job Error Details for providing the information and recommended action. + * + */ +class JobErrorDetails { + /** + * Create a JobErrorDetails. + * @member {string} [errorMessage] Message for the error. + * @member {number} [errorCode] Code for the error. + * @member {string} [recommendedAction] Recommended action for the error. + * @member {string} [exceptionMessage] Contains the non localized exception + * message + */ + constructor() { + } + + /** + * Defines the metadata of JobErrorDetails + * + * @returns {object} metadata of JobErrorDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'JobErrorDetails', + type: { + name: 'Composite', + className: 'JobErrorDetails', + modelProperties: { + errorMessage: { + required: false, + readOnly: true, + serializedName: 'errorMessage', + type: { + name: 'String' + } + }, + errorCode: { + required: false, + readOnly: true, + serializedName: 'errorCode', + type: { + name: 'Number' + } + }, + recommendedAction: { + required: false, + readOnly: true, + serializedName: 'recommendedAction', + type: { + name: 'String' + } + }, + exceptionMessage: { + required: false, + readOnly: true, + serializedName: 'exceptionMessage', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobErrorDetails; diff --git a/lib/services/databoxManagement/lib/models/jobResource.js b/lib/services/databoxManagement/lib/models/jobResource.js new file mode 100644 index 0000000000..adcad744a6 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobResource.js @@ -0,0 +1,258 @@ +/* + * 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'); + +/** + * Job Resource. + * + * @extends models['Resource'] + */ +class JobResource extends models['Resource'] { + /** + * Create a JobResource. + * @member {boolean} [isCancellable] Describes whether the job is cancellable + * or not. + * @member {boolean} [isDeletable] Describes whether the job is deletable or + * not. + * @member {boolean} [isShippingAddressEditable] Describes whether the + * shipping address is editable or not. + * @member {string} [status] Name of the stage which is in progress. Possible + * values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', + * 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', + * 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', + * 'Failed_IssueDetectedAtAzureDC', 'Aborted' + * @member {date} [startTime] Time at which the job was started in UTC ISO + * 8601 format. + * @member {object} [error] Top level error for the job. + * @member {string} [error.code] Error code that can be used to + * programmatically identify the error. + * @member {string} [error.message] Describes the error in detail and + * provides debugging information. + * @member {object} [details] Details of a job run. This field will only be + * sent for expand details filter. + * @member {number} [details.expectedDataSizeInTeraBytes] The expected size + * of the data, which needs to be transfered in this job, in tera bytes. + * @member {array} [details.jobStages] List of stages that run in the job. + * @member {object} [details.contactDetails] Contact details for notification + * and shipping. + * @member {string} [details.contactDetails.contactName] Contact name of the + * person. + * @member {string} [details.contactDetails.phone] Phone number of the + * contact person. + * @member {string} [details.contactDetails.phoneExtension] Phone extension + * number of the contact person. + * @member {string} [details.contactDetails.mobile] Mobile number of the + * contact person. + * @member {array} [details.contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * @member {object} [details.shippingAddress] Shipping address of the + * customer. + * @member {string} [details.shippingAddress.streetAddress1] Street Address + * line 1. + * @member {string} [details.shippingAddress.streetAddress2] Street Address + * line 2. + * @member {string} [details.shippingAddress.streetAddress3] Street Address + * line 3. + * @member {string} [details.shippingAddress.city] Name of the City. + * @member {string} [details.shippingAddress.stateOrProvince] Name of the + * State or Province. + * @member {string} [details.shippingAddress.country] Name of the Country. + * @member {string} [details.shippingAddress.postalCode] Postal code. + * @member {string} [details.shippingAddress.zipExtendedCode] Extended Zip + * Code. + * @member {string} [details.shippingAddress.companyName] Name of the + * company. + * @member {string} [details.shippingAddress.addressType] Type of address. + * Possible values include: 'None', 'Residential', 'Commercial' + * @member {object} [details.deliveryPackage] Delivery package shipping + * details. + * @member {string} [details.deliveryPackage.carrierName] Name of the + * carrier. + * @member {string} [details.deliveryPackage.trackingId] Tracking Id of + * shipment. + * @member {string} [details.deliveryPackage.trackingUrl] Url where shipment + * can be tracked. + * @member {object} [details.returnPackage] Return package shipping details. + * @member {string} [details.returnPackage.carrierName] Name of the carrier. + * @member {string} [details.returnPackage.trackingId] Tracking Id of + * shipment. + * @member {string} [details.returnPackage.trackingUrl] Url where shipment + * can be tracked. + * @member {array} [details.destinationAccountDetails] Destination account + * details. + * @member {array} [details.errorDetails] Error details for failure. This is + * optional. + * @member {object} [details.preferences] Preferences for the order. + * @member {array} [details.preferences.preferredDataCenterRegion] + * @member {array} [details.copyLogDetails] List of copy log details. + * @member {string} [details.reverseShipmentLabelSasKey] Shared access key to + * download the return shipment label + * @member {string} [details.chainOfCustodySasKey] Shared access key to + * download the chain of custody logs + * @member {string} [details.jobDetailsType] Polymorphic Discriminator + * @member {string} [cancellationReason] Reason for cancellation. + * @member {string} [name] Name of the object. + * @member {string} [id] Id of the object. + * @member {string} [type] Type of the object. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of JobResource + * + * @returns {object} metadata of JobResource + * + */ + mapper() { + return { + required: false, + serializedName: 'JobResource', + type: { + name: 'Composite', + className: 'JobResource', + modelProperties: { + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: true, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'Sku' + } + }, + isCancellable: { + required: false, + readOnly: true, + serializedName: 'properties.isCancellable', + type: { + name: 'Boolean' + } + }, + isDeletable: { + required: false, + readOnly: true, + serializedName: 'properties.isDeletable', + type: { + name: 'Boolean' + } + }, + isShippingAddressEditable: { + required: false, + readOnly: true, + serializedName: 'properties.isShippingAddressEditable', + type: { + name: 'Boolean' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'Enum', + allowedValues: [ 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted' ] + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + error: { + required: false, + readOnly: true, + serializedName: 'properties.error', + type: { + name: 'Composite', + className: 'ErrorModel' + } + }, + details: { + required: false, + serializedName: 'properties.details', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobDetailsType', + clientName: 'jobDetailsType' + }, + uberParent: 'JobDetails', + className: 'JobDetails' + } + }, + cancellationReason: { + required: false, + readOnly: true, + serializedName: 'properties.cancellationReason', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobResource; diff --git a/lib/services/databoxManagement/lib/models/jobResourceList.js b/lib/services/databoxManagement/lib/models/jobResourceList.js new file mode 100644 index 0000000000..bed4718392 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobResourceList.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * Job Resource Collection + */ +class JobResourceList extends Array { + /** + * Create a JobResourceList. + * @member {string} [nextLink] Link for the next set of job resources. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of JobResourceList + * + * @returns {object} metadata of JobResourceList + * + */ + mapper() { + return { + required: false, + serializedName: 'JobResourceList', + type: { + name: 'Composite', + className: 'JobResourceList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobResourceElementType', + type: { + name: 'Composite', + className: 'JobResource' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobResourceList; diff --git a/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js b/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js new file mode 100644 index 0000000000..d4d85a55b0 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobResourceUpdateParameter.js @@ -0,0 +1,119 @@ +/* + * 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 JobResourceUpdateParameter. + * + */ +class JobResourceUpdateParameter { + /** + * Create a JobResourceUpdateParameter. + * @member {object} [details] Details of a job to be updated. + * @member {object} [details.contactDetails] Contact details for notification + * and shipping. + * @member {string} [details.contactDetails.contactName] Contact name of the + * person. + * @member {string} [details.contactDetails.phone] Phone number of the + * contact person. + * @member {string} [details.contactDetails.phoneExtension] Phone extension + * number of the contact person. + * @member {string} [details.contactDetails.mobile] Mobile number of the + * contact person. + * @member {array} [details.contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * @member {object} [details.shippingAddress] Shipping address of the + * customer. + * @member {string} [details.shippingAddress.streetAddress1] Street Address + * line 1. + * @member {string} [details.shippingAddress.streetAddress2] Street Address + * line 2. + * @member {string} [details.shippingAddress.streetAddress3] Street Address + * line 3. + * @member {string} [details.shippingAddress.city] Name of the City. + * @member {string} [details.shippingAddress.stateOrProvince] Name of the + * State or Province. + * @member {string} [details.shippingAddress.country] Name of the Country. + * @member {string} [details.shippingAddress.postalCode] Postal code. + * @member {string} [details.shippingAddress.zipExtendedCode] Extended Zip + * Code. + * @member {string} [details.shippingAddress.companyName] Name of the + * company. + * @member {string} [details.shippingAddress.addressType] Type of address. + * Possible values include: 'None', 'Residential', 'Commercial' + * @member {array} [destinationAccountDetails] Destination account details. + * @member {object} [tags] The list of key value pairs that describe the + * resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + */ + constructor() { + } + + /** + * Defines the metadata of JobResourceUpdateParameter + * + * @returns {object} metadata of JobResourceUpdateParameter + * + */ + mapper() { + return { + required: false, + serializedName: 'JobResourceUpdateParameter', + type: { + name: 'Composite', + className: 'JobResourceUpdateParameter', + modelProperties: { + details: { + required: false, + serializedName: 'properties.details', + type: { + name: 'Composite', + className: 'UpdateJobDetails' + } + }, + destinationAccountDetails: { + required: false, + serializedName: 'properties.destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + className: 'DestinationAccountDetails' + } + } + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = JobResourceUpdateParameter; diff --git a/lib/services/databoxManagement/lib/models/jobSecrets.js b/lib/services/databoxManagement/lib/models/jobSecrets.js new file mode 100644 index 0000000000..9ef614fc2e --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobSecrets.js @@ -0,0 +1,58 @@ +/* + * 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 base class for the secrets + * + */ +class JobSecrets { + /** + * Create a JobSecrets. + * @member {string} jobSecretsType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of JobSecrets + * + * @returns {object} metadata of JobSecrets + * + */ + mapper() { + return { + required: false, + serializedName: 'JobSecrets', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobSecretsType', + clientName: 'jobSecretsType' + }, + uberParent: 'JobSecrets', + className: 'JobSecrets', + modelProperties: { + jobSecretsType: { + required: true, + serializedName: 'jobSecretsType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobSecrets; diff --git a/lib/services/databoxManagement/lib/models/jobStages.js b/lib/services/databoxManagement/lib/models/jobStages.js new file mode 100644 index 0000000000..939fb5caa7 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/jobStages.js @@ -0,0 +1,114 @@ +/* + * 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'; + +/** + * Job stages. + * + */ +class JobStages { + /** + * Create a JobStages. + * @member {string} [stageName] Name of the job stage. Possible values + * include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', + * 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', + * 'Cancelled', 'Failed_IssueReportedAtCustomer', + * 'Failed_IssueDetectedAtAzureDC', 'Aborted' + * @member {string} [displayName] Display name of the job stage. + * @member {string} [stageStatus] Status of the job stage. Possible values + * include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', + * 'Cancelling', 'SucceededWithErrors' + * @member {date} [stageTime] Time for the job stage in UTC ISO 8601 format. + * @member {object} [jobStageDetails] Job Stage Details + * @member {array} [errorDetails] Error details for the stage. + */ + constructor() { + } + + /** + * Defines the metadata of JobStages + * + * @returns {object} metadata of JobStages + * + */ + mapper() { + return { + required: false, + serializedName: 'JobStages', + type: { + name: 'Composite', + className: 'JobStages', + modelProperties: { + stageName: { + required: false, + readOnly: true, + serializedName: 'stageName', + type: { + name: 'Enum', + allowedValues: [ 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted' ] + } + }, + displayName: { + required: false, + readOnly: true, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + stageStatus: { + required: false, + readOnly: true, + serializedName: 'stageStatus', + type: { + name: 'Enum', + allowedValues: [ 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', 'SucceededWithErrors' ] + } + }, + stageTime: { + required: false, + readOnly: true, + serializedName: 'stageTime', + type: { + name: 'DateTime' + } + }, + jobStageDetails: { + required: false, + readOnly: true, + serializedName: 'jobStageDetails', + type: { + name: 'Object' + } + }, + errorDetails: { + required: false, + readOnly: true, + serializedName: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + className: 'JobErrorDetails' + } + } + } + } + } + } + }; + } +} + +module.exports = JobStages; diff --git a/lib/services/databoxManagement/lib/models/notificationPreference.js b/lib/services/databoxManagement/lib/models/notificationPreference.js new file mode 100644 index 0000000000..b9dbc4de65 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/notificationPreference.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'; + +/** + * Notification preference for a job stage. + * + */ +class NotificationPreference { + /** + * Create a NotificationPreference. + * @member {string} stageName Name of the stage. Possible values include: + * 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', + * 'DataCopy' + * @member {boolean} sendNotification Notification is required or not. + */ + constructor() { + } + + /** + * Defines the metadata of NotificationPreference + * + * @returns {object} metadata of NotificationPreference + * + */ + mapper() { + return { + required: false, + serializedName: 'NotificationPreference', + type: { + name: 'Composite', + className: 'NotificationPreference', + modelProperties: { + stageName: { + required: true, + serializedName: 'stageName', + type: { + name: 'Enum', + allowedValues: [ 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy' ] + } + }, + sendNotification: { + required: true, + serializedName: 'sendNotification', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = NotificationPreference; diff --git a/lib/services/databoxManagement/lib/models/operation.js b/lib/services/databoxManagement/lib/models/operation.js new file mode 100644 index 0000000000..ba7df8da23 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/operation.js @@ -0,0 +1,89 @@ +/* + * 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'; + +/** + * Operation entity. + * + */ +class Operation { + /** + * Create a Operation. + * @member {string} [name] Name of the operation. Format: + * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + * @member {object} [display] Operation display values. + * @member {string} [display.provider] Provider name. + * @member {string} [display.resource] Resource name. + * @member {string} [display.operation] Localized name of the operation for + * display purpose. + * @member {string} [display.description] Localized description of the + * operation for display purpose. + * @member {object} [properties] Operation properties. + * @member {string} [origin] Origin of the operation. Can be : + * user|system|user,system + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + readOnly: true, + serializedName: 'display', + type: { + name: 'Composite', + className: 'OperationDisplay' + } + }, + properties: { + required: false, + readOnly: true, + serializedName: 'properties', + type: { + name: 'Object' + } + }, + origin: { + required: false, + readOnly: true, + serializedName: 'origin', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/databoxManagement/lib/models/operationDisplay.js b/lib/services/databoxManagement/lib/models/operationDisplay.js new file mode 100644 index 0000000000..878daf0e9b --- /dev/null +++ b/lib/services/databoxManagement/lib/models/operationDisplay.js @@ -0,0 +1,78 @@ +/* + * 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'; + +/** + * Operation display + * + */ +class OperationDisplay { + /** + * Create a OperationDisplay. + * @member {string} [provider] Provider name. + * @member {string} [resource] Resource name. + * @member {string} [operation] Localized name of the operation for display + * purpose. + * @member {string} [description] Localized description of the operation for + * display purpose. + */ + constructor() { + } + + /** + * Defines the metadata of OperationDisplay + * + * @returns {object} metadata of OperationDisplay + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationDisplay', + type: { + name: 'Composite', + className: 'OperationDisplay', + modelProperties: { + provider: { + required: false, + serializedName: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serializedName: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serializedName: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationDisplay; diff --git a/lib/services/databoxManagement/lib/models/operationList.js b/lib/services/databoxManagement/lib/models/operationList.js new file mode 100644 index 0000000000..1a3e057a27 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/operationList.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'; + +/** + * Operation Collection. + */ +class OperationList extends Array { + /** + * Create a OperationList. + * @member {string} [nextLink] Link for the next set of operations. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of OperationList + * + * @returns {object} metadata of OperationList + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationList', + type: { + name: 'Composite', + className: 'OperationList', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationElementType', + type: { + name: 'Composite', + className: 'Operation' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationList; diff --git a/lib/services/databoxManagement/lib/models/packageShippingDetails.js b/lib/services/databoxManagement/lib/models/packageShippingDetails.js new file mode 100644 index 0000000000..e4a3ecf10d --- /dev/null +++ b/lib/services/databoxManagement/lib/models/packageShippingDetails.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'; + +/** + * Shipping details. + * + */ +class PackageShippingDetails { + /** + * Create a PackageShippingDetails. + * @member {string} [carrierName] Name of the carrier. + * @member {string} [trackingId] Tracking Id of shipment. + * @member {string} [trackingUrl] Url where shipment can be tracked. + */ + constructor() { + } + + /** + * Defines the metadata of PackageShippingDetails + * + * @returns {object} metadata of PackageShippingDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'PackageShippingDetails', + type: { + name: 'Composite', + className: 'PackageShippingDetails', + modelProperties: { + carrierName: { + required: false, + readOnly: true, + serializedName: 'carrierName', + type: { + name: 'String' + } + }, + trackingId: { + required: false, + readOnly: true, + serializedName: 'trackingId', + type: { + name: 'String' + } + }, + trackingUrl: { + required: false, + readOnly: true, + serializedName: 'trackingUrl', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PackageShippingDetails; diff --git a/lib/services/databoxManagement/lib/models/preferences.js b/lib/services/databoxManagement/lib/models/preferences.js new file mode 100644 index 0000000000..ba452eef71 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/preferences.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'; + +/** + * Preferences related to the order + * + */ +class Preferences { + /** + * Create a Preferences. + * @member {array} [preferredDataCenterRegion] + */ + constructor() { + } + + /** + * Defines the metadata of Preferences + * + * @returns {object} metadata of Preferences + * + */ + mapper() { + return { + required: false, + serializedName: 'Preferences', + type: { + name: 'Composite', + className: 'Preferences', + modelProperties: { + preferredDataCenterRegion: { + required: false, + serializedName: 'preferredDataCenterRegion', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = Preferences; diff --git a/lib/services/databoxManagement/lib/models/resource.js b/lib/services/databoxManagement/lib/models/resource.js new file mode 100644 index 0000000000..88c250a7a3 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/resource.js @@ -0,0 +1,90 @@ +/* + * 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'); + +/** + * Model of the Resource. + * + * @extends models['BaseResource'] + */ +class Resource extends models['BaseResource'] { + /** + * Create a Resource. + * @member {string} location The location of the resource. This will be one + * of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it + * is created, but if an identical region is specified on update the request + * will succeed. + * @member {object} [tags] The list of key value pairs that describe the + * resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * @member {object} sku The sku type. + * @member {string} [sku.name] The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [sku.displayName] The display name of the sku. + * @member {string} [sku.family] The sku family. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Resource + * + * @returns {object} metadata of Resource + * + */ + mapper() { + return { + required: false, + serializedName: 'Resource', + type: { + name: 'Composite', + className: 'Resource', + modelProperties: { + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: true, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'Sku' + } + } + } + } + }; + } +} + +module.exports = Resource; diff --git a/lib/services/databoxManagement/lib/models/shareCredentialDetails.js b/lib/services/databoxManagement/lib/models/shareCredentialDetails.js new file mode 100644 index 0000000000..1987c2df08 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/shareCredentialDetails.js @@ -0,0 +1,100 @@ +/* + * 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'; + +/** + * Credential details of the shares in account. + * + */ +class ShareCredentialDetails { + /** + * Create a ShareCredentialDetails. + * @member {string} [shareName] Name of the share. + * @member {string} [shareType] Type of the share. Possible values include: + * 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' + * @member {string} [userName] User name for the share. + * @member {string} [password] Password for the share. + * @member {array} [supportedAccessProtocols] Access protocols supported on + * the device. + */ + constructor() { + } + + /** + * Defines the metadata of ShareCredentialDetails + * + * @returns {object} metadata of ShareCredentialDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'ShareCredentialDetails', + type: { + name: 'Composite', + className: 'ShareCredentialDetails', + modelProperties: { + shareName: { + required: false, + readOnly: true, + serializedName: 'shareName', + type: { + name: 'String' + } + }, + shareType: { + required: false, + readOnly: true, + serializedName: 'shareType', + type: { + name: 'Enum', + allowedValues: [ 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' ] + } + }, + userName: { + required: false, + readOnly: true, + serializedName: 'userName', + type: { + name: 'String' + } + }, + password: { + required: false, + readOnly: true, + serializedName: 'password', + type: { + name: 'String' + } + }, + supportedAccessProtocols: { + required: false, + readOnly: true, + serializedName: 'supportedAccessProtocols', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccessProtocolElementType', + type: { + name: 'Enum', + allowedValues: [ 'SMB', 'NFS' ] + } + } + } + } + } + } + }; + } +} + +module.exports = ShareCredentialDetails; diff --git a/lib/services/databoxManagement/lib/models/shipmentPickUpRequest.js b/lib/services/databoxManagement/lib/models/shipmentPickUpRequest.js new file mode 100644 index 0000000000..63c7edecf1 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/shipmentPickUpRequest.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'; + +/** + * Shipment pick up request details. + * + */ +class ShipmentPickUpRequest { + /** + * Create a ShipmentPickUpRequest. + * @member {date} startTime Minimum date after which the pick up should + * commence, this must be in local time of pick up area. + * @member {date} endTime Maximum date before which the pick up should + * commence, this must be in local time of pick up area. + * @member {string} shipmentLocation Shipment Location in the pickup place. + * Eg.front desk + */ + constructor() { + } + + /** + * Defines the metadata of ShipmentPickUpRequest + * + * @returns {object} metadata of ShipmentPickUpRequest + * + */ + mapper() { + return { + required: false, + serializedName: 'ShipmentPickUpRequest', + type: { + name: 'Composite', + className: 'ShipmentPickUpRequest', + modelProperties: { + startTime: { + required: true, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: true, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + shipmentLocation: { + required: true, + serializedName: 'shipmentLocation', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ShipmentPickUpRequest; diff --git a/lib/services/databoxManagement/lib/models/shipmentPickUpResponse.js b/lib/services/databoxManagement/lib/models/shipmentPickUpResponse.js new file mode 100644 index 0000000000..4e46ef66df --- /dev/null +++ b/lib/services/databoxManagement/lib/models/shipmentPickUpResponse.js @@ -0,0 +1,64 @@ +/* + * 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'; + +/** + * Shipment pick up response. + * + */ +class ShipmentPickUpResponse { + /** + * Create a ShipmentPickUpResponse. + * @member {string} [confirmationNumber] Confirmation number for the pick up + * request. + * @member {date} [readyByTime] Time by which shipment should be ready for + * pick up, this is in local time of pick up area. + */ + constructor() { + } + + /** + * Defines the metadata of ShipmentPickUpResponse + * + * @returns {object} metadata of ShipmentPickUpResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ShipmentPickUpResponse', + type: { + name: 'Composite', + className: 'ShipmentPickUpResponse', + modelProperties: { + confirmationNumber: { + required: false, + readOnly: true, + serializedName: 'confirmationNumber', + type: { + name: 'String' + } + }, + readyByTime: { + required: false, + readOnly: true, + serializedName: 'readyByTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ShipmentPickUpResponse; diff --git a/lib/services/databoxManagement/lib/models/shippingAddress.js b/lib/services/databoxManagement/lib/models/shippingAddress.js new file mode 100644 index 0000000000..6c9265af63 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/shippingAddress.js @@ -0,0 +1,126 @@ +/* + * 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'; + +/** + * Shipping address where customer wishes to receive the device. + * + */ +class ShippingAddress { + /** + * Create a ShippingAddress. + * @member {string} streetAddress1 Street Address line 1. + * @member {string} [streetAddress2] Street Address line 2. + * @member {string} [streetAddress3] Street Address line 3. + * @member {string} [city] Name of the City. + * @member {string} [stateOrProvince] Name of the State or Province. + * @member {string} country Name of the Country. + * @member {string} postalCode Postal code. + * @member {string} [zipExtendedCode] Extended Zip Code. + * @member {string} [companyName] Name of the company. + * @member {string} [addressType] Type of address. Possible values include: + * 'None', 'Residential', 'Commercial' + */ + constructor() { + } + + /** + * Defines the metadata of ShippingAddress + * + * @returns {object} metadata of ShippingAddress + * + */ + mapper() { + return { + required: false, + serializedName: 'ShippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress', + modelProperties: { + streetAddress1: { + required: true, + serializedName: 'streetAddress1', + type: { + name: 'String' + } + }, + streetAddress2: { + required: false, + serializedName: 'streetAddress2', + type: { + name: 'String' + } + }, + streetAddress3: { + required: false, + serializedName: 'streetAddress3', + type: { + name: 'String' + } + }, + city: { + required: false, + serializedName: 'city', + type: { + name: 'String' + } + }, + stateOrProvince: { + required: false, + serializedName: 'stateOrProvince', + type: { + name: 'String' + } + }, + country: { + required: true, + serializedName: 'country', + type: { + name: 'String' + } + }, + postalCode: { + required: true, + serializedName: 'postalCode', + type: { + name: 'String' + } + }, + zipExtendedCode: { + required: false, + serializedName: 'zipExtendedCode', + type: { + name: 'String' + } + }, + companyName: { + required: false, + serializedName: 'companyName', + type: { + name: 'String' + } + }, + addressType: { + required: false, + serializedName: 'addressType', + type: { + name: 'Enum', + allowedValues: [ 'None', 'Residential', 'Commercial' ] + } + } + } + } + }; + } +} + +module.exports = ShippingAddress; diff --git a/lib/services/databoxManagement/lib/models/sku.js b/lib/services/databoxManagement/lib/models/sku.js new file mode 100644 index 0000000000..ea07b1ef49 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/sku.js @@ -0,0 +1,70 @@ +/* + * 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 Sku. + * + */ +class Sku { + /** + * Create a Sku. + * @member {string} name The sku name. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [displayName] The display name of the sku. + * @member {string} [family] The sku family. + */ + constructor() { + } + + /** + * Defines the metadata of Sku + * + * @returns {object} metadata of Sku + * + */ + mapper() { + return { + required: false, + serializedName: 'Sku', + type: { + name: 'Composite', + className: 'Sku', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'Enum', + allowedValues: [ 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' ] + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + family: { + required: false, + serializedName: 'family', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Sku; diff --git a/lib/services/databoxManagement/lib/models/skuCapacity.js b/lib/services/databoxManagement/lib/models/skuCapacity.js new file mode 100644 index 0000000000..d870c9baad --- /dev/null +++ b/lib/services/databoxManagement/lib/models/skuCapacity.js @@ -0,0 +1,62 @@ +/* + * 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'; + +/** + * Capacity of the sku. + * + */ +class SkuCapacity { + /** + * Create a SkuCapacity. + * @member {string} [usable] Usable capacity in TB. + * @member {string} [maximum] Maximum capacity in TB. + */ + constructor() { + } + + /** + * Defines the metadata of SkuCapacity + * + * @returns {object} metadata of SkuCapacity + * + */ + mapper() { + return { + required: false, + serializedName: 'SkuCapacity', + type: { + name: 'Composite', + className: 'SkuCapacity', + modelProperties: { + usable: { + required: false, + readOnly: true, + serializedName: 'usable', + type: { + name: 'String' + } + }, + maximum: { + required: false, + readOnly: true, + serializedName: 'maximum', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SkuCapacity; diff --git a/lib/services/databoxManagement/lib/models/skuCost.js b/lib/services/databoxManagement/lib/models/skuCost.js new file mode 100644 index 0000000000..2c3912a07a --- /dev/null +++ b/lib/services/databoxManagement/lib/models/skuCost.js @@ -0,0 +1,62 @@ +/* + * 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 metadata for retrieving price info. + * + */ +class SkuCost { + /** + * Create a SkuCost. + * @member {string} [meterId] Meter id of the Sku. + * @member {string} [meterType] The type of the meter. + */ + constructor() { + } + + /** + * Defines the metadata of SkuCost + * + * @returns {object} metadata of SkuCost + * + */ + mapper() { + return { + required: false, + serializedName: 'SkuCost', + type: { + name: 'Composite', + className: 'SkuCost', + modelProperties: { + meterId: { + required: false, + readOnly: true, + serializedName: 'meterId', + type: { + name: 'String' + } + }, + meterType: { + required: false, + readOnly: true, + serializedName: 'meterType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SkuCost; diff --git a/lib/services/databoxManagement/lib/models/skuInformation.js b/lib/services/databoxManagement/lib/models/skuInformation.js new file mode 100644 index 0000000000..4f3e072e54 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/skuInformation.js @@ -0,0 +1,160 @@ +/* + * 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'; + +/** + * Information of the sku. + * + */ +class SkuInformation { + /** + * Create a SkuInformation. + * @member {object} [sku] The Sku. + * @member {string} [sku.name] The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * @member {string} [sku.displayName] The display name of the sku. + * @member {string} [sku.family] The sku family. + * @member {boolean} [enabled] The sku is enabled or not. + * @member {array} [destinationToServiceLocationMap] The map of destination + * location to service location. + * @member {object} [capacity] Capacity of the Sku. + * @member {string} [capacity.usable] Usable capacity in TB. + * @member {string} [capacity.maximum] Maximum capacity in TB. + * @member {array} [costs] Cost of the Sku. + * @member {array} [apiVersions] Api versions that support this Sku. + * @member {string} [disabledReason] Reason why the Sku is disabled. Possible + * values include: 'None', 'Country', 'Region', 'Feature', 'OfferType' + * @member {string} [disabledReasonMessage] Message for why the Sku is + * disabled. + * @member {string} [requiredFeature] Required feature to access the sku. + */ + constructor() { + } + + /** + * Defines the metadata of SkuInformation + * + * @returns {object} metadata of SkuInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'SkuInformation', + type: { + name: 'Composite', + className: 'SkuInformation', + modelProperties: { + sku: { + required: false, + readOnly: true, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'Sku' + } + }, + enabled: { + required: false, + readOnly: true, + serializedName: 'enabled', + type: { + name: 'Boolean' + } + }, + destinationToServiceLocationMap: { + required: false, + readOnly: true, + serializedName: 'properties.destinationToServiceLocationMap', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DestinationToServiceLocationMapElementType', + type: { + name: 'Composite', + className: 'DestinationToServiceLocationMap' + } + } + } + }, + capacity: { + required: false, + readOnly: true, + serializedName: 'properties.capacity', + type: { + name: 'Composite', + className: 'SkuCapacity' + } + }, + costs: { + required: false, + readOnly: true, + serializedName: 'properties.costs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SkuCostElementType', + type: { + name: 'Composite', + className: 'SkuCost' + } + } + } + }, + apiVersions: { + required: false, + readOnly: true, + serializedName: 'properties.apiVersions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + disabledReason: { + required: false, + readOnly: true, + serializedName: 'properties.disabledReason', + type: { + name: 'Enum', + allowedValues: [ 'None', 'Country', 'Region', 'Feature', 'OfferType' ] + } + }, + disabledReasonMessage: { + required: false, + readOnly: true, + serializedName: 'properties.disabledReasonMessage', + type: { + name: 'String' + } + }, + requiredFeature: { + required: false, + readOnly: true, + serializedName: 'properties.requiredFeature', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SkuInformation; diff --git a/lib/services/databoxManagement/lib/models/unencryptedCredentials.js b/lib/services/databoxManagement/lib/models/unencryptedCredentials.js new file mode 100644 index 0000000000..bf2a70d33c --- /dev/null +++ b/lib/services/databoxManagement/lib/models/unencryptedCredentials.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'; + +/** + * Unencrypted credentials for accessing device. + * + */ +class UnencryptedCredentials { + /** + * Create a UnencryptedCredentials. + * @member {string} [jobName] Name of the job. + * @member {object} [jobSecrets] Secrets related to this job. + * @member {string} [jobSecrets.jobSecretsType] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of UnencryptedCredentials + * + * @returns {object} metadata of UnencryptedCredentials + * + */ + mapper() { + return { + required: false, + serializedName: 'UnencryptedCredentials', + type: { + name: 'Composite', + className: 'UnencryptedCredentials', + modelProperties: { + jobName: { + required: false, + readOnly: true, + serializedName: 'jobName', + type: { + name: 'String' + } + }, + jobSecrets: { + required: false, + readOnly: true, + serializedName: 'jobSecrets', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'jobSecretsType', + clientName: 'jobSecretsType' + }, + uberParent: 'JobSecrets', + className: 'JobSecrets' + } + } + } + } + }; + } +} + +module.exports = UnencryptedCredentials; diff --git a/lib/services/databoxManagement/lib/models/unencryptedCredentialsList.js b/lib/services/databoxManagement/lib/models/unencryptedCredentialsList.js new file mode 100644 index 0000000000..19e7c6d3f0 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/unencryptedCredentialsList.js @@ -0,0 +1,61 @@ +/* + * 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'; + +/** + * List of unencrypted credentials for accessing device. + */ +class UnencryptedCredentialsList extends Array { + /** + * Create a UnencryptedCredentialsList. + * @member {string} [nextLink] Link for the next set of unencrypted + * credentials. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UnencryptedCredentialsList + * + * @returns {object} metadata of UnencryptedCredentialsList + * + */ + mapper() { + return { + required: false, + serializedName: 'UnencryptedCredentialsList', + type: { + name: 'Composite', + className: 'UnencryptedCredentialsList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UnencryptedCredentialsElementType', + type: { + name: 'Composite', + className: 'UnencryptedCredentials' + } + } + } + } + } + } + }; + } +} + +module.exports = UnencryptedCredentialsList; diff --git a/lib/services/databoxManagement/lib/models/updateJobDetails.js b/lib/services/databoxManagement/lib/models/updateJobDetails.js new file mode 100644 index 0000000000..459db7f456 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/updateJobDetails.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Job details for update. + * + */ +class UpdateJobDetails { + /** + * Create a UpdateJobDetails. + * @member {object} [contactDetails] Contact details for notification and + * shipping. + * @member {string} [contactDetails.contactName] Contact name of the person. + * @member {string} [contactDetails.phone] Phone number of the contact + * person. + * @member {string} [contactDetails.phoneExtension] Phone extension number of + * the contact person. + * @member {string} [contactDetails.mobile] Mobile number of the contact + * person. + * @member {array} [contactDetails.emailList] List of Email-ids to be + * notified about job progress. + * @member {array} [contactDetails.notificationPreference] Notification + * preference for a job stage. + * @member {object} [shippingAddress] Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + */ + constructor() { + } + + /** + * Defines the metadata of UpdateJobDetails + * + * @returns {object} metadata of UpdateJobDetails + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateJobDetails', + type: { + name: 'Composite', + className: 'UpdateJobDetails', + modelProperties: { + contactDetails: { + required: false, + serializedName: 'contactDetails', + type: { + name: 'Composite', + className: 'ContactDetails' + } + }, + shippingAddress: { + required: false, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + } + } + } + }; + } +} + +module.exports = UpdateJobDetails; diff --git a/lib/services/databoxManagement/lib/models/validateAddress.js b/lib/services/databoxManagement/lib/models/validateAddress.js new file mode 100644 index 0000000000..d712f95a61 --- /dev/null +++ b/lib/services/databoxManagement/lib/models/validateAddress.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The requirements to validate customer address where the device needs to be + * shipped. + * + */ +class ValidateAddress { + /** + * Create a ValidateAddress. + * @member {object} shippingAddress Shipping address of the customer. + * @member {string} [shippingAddress.streetAddress1] Street Address line 1. + * @member {string} [shippingAddress.streetAddress2] Street Address line 2. + * @member {string} [shippingAddress.streetAddress3] Street Address line 3. + * @member {string} [shippingAddress.city] Name of the City. + * @member {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * @member {string} [shippingAddress.country] Name of the Country. + * @member {string} [shippingAddress.postalCode] Postal code. + * @member {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * @member {string} [shippingAddress.companyName] Name of the company. + * @member {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * @member {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + */ + constructor() { + } + + /** + * Defines the metadata of ValidateAddress + * + * @returns {object} metadata of ValidateAddress + * + */ + mapper() { + return { + required: false, + serializedName: 'ValidateAddress', + type: { + name: 'Composite', + className: 'ValidateAddress', + modelProperties: { + shippingAddress: { + required: true, + serializedName: 'shippingAddress', + type: { + name: 'Composite', + className: 'ShippingAddress' + } + }, + deviceType: { + required: true, + serializedName: 'deviceType', + type: { + name: 'Enum', + allowedValues: [ 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' ] + } + } + } + } + }; + } +} + +module.exports = ValidateAddress; diff --git a/lib/services/databoxManagement/lib/operations/index.d.ts b/lib/services/databoxManagement/lib/operations/index.d.ts new file mode 100644 index 0000000000..0b42beddd0 --- /dev/null +++ b/lib/services/databoxManagement/lib/operations/index.d.ts @@ -0,0 +1,1979 @@ +/* + * 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. +*/ + +import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; +import * as models from '../models'; + + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataBoxManagementClient. + */ +export interface Operations { + + + /** + * This method gets all the operations. + * + * @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. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method gets all the operations. + * + * @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 {OperationList} - 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. + * + * {OperationList} [result] - The deserialized result object if an error did not occur. + * See {@link OperationList} 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. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * This method gets all the operations. + * + * @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. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method gets all the operations. + * + * @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 {OperationList} - 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. + * + * {OperationList} [result] - The deserialized result object if an error did not occur. + * See {@link OperationList} 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. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Jobs + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataBoxManagementClient. + */ +export interface Jobs { + + + /** + * Lists all the jobs available under the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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. + */ + listWithHttpOperationResponse(options?: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the jobs available under the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 {JobResourceList} - 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. + * + * {JobResourceList} [result] - The deserialized result object if an error did not occur. + * See {@link JobResourceList} 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. + */ + list(options?: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the jobs available under the given resource group. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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?: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the jobs available under the given resource group. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 {JobResourceList} - 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. + * + * {JobResourceList} [result] - The deserialized result object if an error did not occur. + * See {@link JobResourceList} 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?: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { skipToken? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets information about the specified job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] $expand is supported on details parameter + * for job, which provides details on the job stages. + * + * @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, jobName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets information about the specified job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] $expand is supported on details parameter + * for job, which provides details on the job stages. + * + * @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 {JobResource} - 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. + * + * {JobResource} [result] - The deserialized result object if an error did not occur. + * See {@link JobResource} 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, jobName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, jobName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, jobName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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. + */ + createWithHttpOperationResponse(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 {JobResource} - 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. + * + * {JobResource} [result] - The deserialized result object if an error did not occur. + * See {@link JobResource} 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. + */ + create(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, jobName: string, jobResource: models.JobResource, callback: ServiceCallback): void; + create(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, jobName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 {JobResource} - 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. + * + * {JobResource} [result] - The deserialized result object if an error did not occur. + * See {@link JobResource} 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. + */ + update(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, callback: ServiceCallback): void; + update(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Book shipment pick up. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} shipmentPickUpRequest Details of shipment pick up request. + * + * @param {date} shipmentPickUpRequest.startTime Minimum date after which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {date} shipmentPickUpRequest.endTime Maximum date before which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {string} shipmentPickUpRequest.shipmentLocation Shipment Location in + * the pickup place. Eg.front desk + * + * @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. + */ + bookShipmentPickUpWithHttpOperationResponse(resourceGroupName: string, jobName: string, shipmentPickUpRequest: models.ShipmentPickUpRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Book shipment pick up. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} shipmentPickUpRequest Details of shipment pick up request. + * + * @param {date} shipmentPickUpRequest.startTime Minimum date after which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {date} shipmentPickUpRequest.endTime Maximum date before which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {string} shipmentPickUpRequest.shipmentLocation Shipment Location in + * the pickup place. Eg.front desk + * + * @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 {ShipmentPickUpResponse} - 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. + * + * {ShipmentPickUpResponse} [result] - The deserialized result object if an error did not occur. + * See {@link ShipmentPickUpResponse} 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. + */ + bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: models.ShipmentPickUpRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: models.ShipmentPickUpRequest, callback: ServiceCallback): void; + bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: models.ShipmentPickUpRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * CancelJob. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {string} reason Reason for cancellation. + * + * @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. + */ + cancelWithHttpOperationResponse(resourceGroupName: string, jobName: string, reason: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * CancelJob. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {string} reason Reason for cancellation. + * + * @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. + */ + cancel(resourceGroupName: string, jobName: string, reason: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, jobName: string, reason: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, jobName: string, reason: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * This method gets the unencrypted secrets related to the job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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. + */ + listCredentialsWithHttpOperationResponse(resourceGroupName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method gets the unencrypted secrets related to the job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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 {UnencryptedCredentialsList} - 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. + * + * {UnencryptedCredentialsList} [result] - The deserialized result object if an error did not occur. + * See {@link UnencryptedCredentialsList} 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. + */ + listCredentials(resourceGroupName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listCredentials(resourceGroupName: string, jobName: string, callback: ServiceCallback): void; + listCredentials(resourceGroupName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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. + */ + beginCreateWithHttpOperationResponse(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 {JobResource} - 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. + * + * {JobResource} [result] - The deserialized result object if an error did not occur. + * See {@link JobResource} 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. + */ + beginCreate(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, jobName: string, jobResource: models.JobResource, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, jobName: string, jobResource: models.JobResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, jobName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 {JobResource} - 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. + * + * {JobResource} [result] - The deserialized result object if an error did not occur. + * See {@link JobResource} 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. + */ + beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: models.JobResourceUpdateParameter, options: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the jobs available under the 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. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the jobs available under the 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 {JobResourceList} - 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. + * + * {JobResourceList} [result] - The deserialized result object if an error did not occur. + * See {@link JobResourceList} 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. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the jobs available under the given 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>; + + /** + * Lists all the jobs available under the given 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 {JobResourceList} - 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. + * + * {JobResourceList} [result] - The deserialized result object if an error did not occur. + * See {@link JobResourceList} 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; +} + +/** + * @class + * Service + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataBoxManagementClient. + */ +export interface Service { + + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @param {string} location The location of the resource + * + * @param {object} availableSkuRequest Filters for showing the available skus. + * + * @param {string} availableSkuRequest.country ISO country code. Country for + * hardware shipment. For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * + * @param {string} availableSkuRequest.location Location for data transfer. For + * locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * + * @param {array} [availableSkuRequest.skuNames] Sku Names to filter for + * available skus + * + * @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. + */ + listAvailableSkusWithHttpOperationResponse(location: string, availableSkuRequest: models.AvailableSkuRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @param {string} location The location of the resource + * + * @param {object} availableSkuRequest Filters for showing the available skus. + * + * @param {string} availableSkuRequest.country ISO country code. Country for + * hardware shipment. For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * + * @param {string} availableSkuRequest.location Location for data transfer. For + * locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * + * @param {array} [availableSkuRequest.skuNames] Sku Names to filter for + * available skus + * + * @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 {AvailableSkusResult} - 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. + * + * {AvailableSkusResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailableSkusResult} 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. + */ + listAvailableSkus(location: string, availableSkuRequest: models.AvailableSkuRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAvailableSkus(location: string, availableSkuRequest: models.AvailableSkuRequest, callback: ServiceCallback): void; + listAvailableSkus(location: string, availableSkuRequest: models.AvailableSkuRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * This method validates the customer shipping address and provide alternate + * addresses if any. + * + * @param {string} location The location of the resource + * + * @param {object} shippingAddress Shipping address of the customer. + * + * @param {string} shippingAddress.streetAddress1 Street Address line 1. + * + * @param {string} [shippingAddress.streetAddress2] Street Address line 2. + * + * @param {string} [shippingAddress.streetAddress3] Street Address line 3. + * + * @param {string} [shippingAddress.city] Name of the City. + * + * @param {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * + * @param {string} shippingAddress.country Name of the Country. + * + * @param {string} shippingAddress.postalCode Postal code. + * + * @param {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * + * @param {string} [shippingAddress.companyName] Name of the company. + * + * @param {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * + * @param {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @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. + */ + validateAddressMethodWithHttpOperationResponse(location: string, shippingAddress: models.ShippingAddress, deviceType: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method validates the customer shipping address and provide alternate + * addresses if any. + * + * @param {string} location The location of the resource + * + * @param {object} shippingAddress Shipping address of the customer. + * + * @param {string} shippingAddress.streetAddress1 Street Address line 1. + * + * @param {string} [shippingAddress.streetAddress2] Street Address line 2. + * + * @param {string} [shippingAddress.streetAddress3] Street Address line 3. + * + * @param {string} [shippingAddress.city] Name of the City. + * + * @param {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * + * @param {string} shippingAddress.country Name of the Country. + * + * @param {string} shippingAddress.postalCode Postal code. + * + * @param {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * + * @param {string} [shippingAddress.companyName] Name of the company. + * + * @param {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * + * @param {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @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 {AddressValidationOutput} - 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. + * + * {AddressValidationOutput} [result] - The deserialized result object if an error did not occur. + * See {@link AddressValidationOutput} 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. + */ + validateAddressMethod(location: string, shippingAddress: models.ShippingAddress, deviceType: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + validateAddressMethod(location: string, shippingAddress: models.ShippingAddress, deviceType: string, callback: ServiceCallback): void; + validateAddressMethod(location: string, shippingAddress: models.ShippingAddress, deviceType: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @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. + */ + listAvailableSkusNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @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 {AvailableSkusResult} - 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. + * + * {AvailableSkusResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailableSkusResult} 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. + */ + listAvailableSkusNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAvailableSkusNext(nextPageLink: string, callback: ServiceCallback): void; + listAvailableSkusNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/databoxManagement/lib/operations/index.js b/lib/services/databoxManagement/lib/operations/index.js new file mode 100644 index 0000000000..9ece56c7e9 --- /dev/null +++ b/lib/services/databoxManagement/lib/operations/index.js @@ -0,0 +1,19 @@ +/* + * 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. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.Operations = require('./operations'); +exports.Jobs = require('./jobs'); +exports.Service = require('./service'); diff --git a/lib/services/databoxManagement/lib/operations/jobs.js b/lib/services/databoxManagement/lib/operations/jobs.js new file mode 100644 index 0000000000..cd6408a4fa --- /dev/null +++ b/lib/services/databoxManagement/lib/operations/jobs.js @@ -0,0 +1,4307 @@ +/* + * 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; + +/** + * Lists all the jobs available under the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 JobResourceList} 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 _list(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 skipToken = (options && options.skipToken !== undefined) ? options.skipToken : undefined; + // 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (skipToken !== null && skipToken !== undefined && typeof skipToken.valueOf() !== 'string') { + throw new Error('skipToken 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.DataBox/jobs'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (skipToken !== null && skipToken !== undefined) { + queryParameters.push('$skipToken=' + encodeURIComponent(skipToken)); + } + 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['JobResourceList']().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); + }); +} + +/** + * Lists all the jobs available under the given resource group. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 JobResourceList} 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 _listByResourceGroup(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 skipToken = (options && options.skipToken !== undefined) ? options.skipToken : undefined; + // 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (skipToken !== null && skipToken !== undefined && typeof skipToken.valueOf() !== 'string') { + throw new Error('skipToken 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.DataBox/jobs'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (skipToken !== null && skipToken !== undefined) { + queryParameters.push('$skipToken=' + encodeURIComponent(skipToken)); + } + 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['JobResourceList']().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); + }); +} + +/** + * Gets information about the specified job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] $expand is supported on details parameter + * for job, which provides details on the job stages. + * + * @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 JobResource} 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, jobName, 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; + // 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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataBox/jobs/{jobName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + 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['JobResource']().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); + }); +} + + +/** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 JobResource} 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 _create(resourceGroupName, jobName, jobResource, 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.beginCreate(resourceGroupName, jobName, jobResource, 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['JobResource']().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); + }); + }); +} + + +/** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, 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, jobName, 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); + }); + }); +} + + +/** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 JobResource} 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 _update(resourceGroupName, jobName, jobResourceUpdateParameter, 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.beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, 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['JobResource']().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); + }); + }); +} + +/** + * Book shipment pick up. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} shipmentPickUpRequest Details of shipment pick up request. + * + * @param {date} shipmentPickUpRequest.startTime Minimum date after which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {date} shipmentPickUpRequest.endTime Maximum date before which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {string} shipmentPickUpRequest.shipmentLocation Shipment Location in + * the pickup place. Eg.front desk + * + * @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 ShipmentPickUpResponse} 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 _bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest, 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (shipmentPickUpRequest === null || shipmentPickUpRequest === undefined) { + throw new Error('shipmentPickUpRequest 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.DataBox/jobs/{jobName}/bookShipmentPickUp'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (shipmentPickUpRequest !== null && shipmentPickUpRequest !== undefined) { + let requestModelMapper = new client.models['ShipmentPickUpRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, shipmentPickUpRequest, 'shipmentPickUpRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(shipmentPickUpRequest, 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 !== 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['ShipmentPickUpResponse']().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); + }); +} + +/** + * CancelJob. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {string} reason Reason for cancellation. + * + * @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 _cancel(resourceGroupName, jobName, reason, 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (reason === null || reason === undefined || typeof reason.valueOf() !== 'string') { + throw new Error('reason 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); + } + let cancellationReason; + if (reason !== null && reason !== undefined) { + cancellationReason = new client.models['CancellationReason'](); + cancellationReason.reason = reason; + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (cancellationReason !== null && cancellationReason !== undefined) { + let requestModelMapper = new client.models['CancellationReason']().mapper(); + requestModel = client.serialize(requestModelMapper, cancellationReason, 'cancellationReason'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(cancellationReason, 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 !== 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); + }); +} + +/** + * This method gets the unencrypted secrets related to the job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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 UnencryptedCredentialsList} 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 _listCredentials(resourceGroupName, jobName, 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataBox/jobs/{jobName}/listCredentials'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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['UnencryptedCredentialsList']().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); + }); +} + +/** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 JobResource} 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 _beginCreate(resourceGroupName, jobName, jobResource, 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (jobResource === null || jobResource === undefined) { + throw new Error('jobResource 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.DataBox/jobs/{jobName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (jobResource !== null && jobResource !== undefined) { + let requestModelMapper = new client.models['JobResource']().mapper(); + requestModel = client.serialize(requestModelMapper, jobResource, 'jobResource'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(jobResource, 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 !== 200 && 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 === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['JobResource']().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); + }); +} + +/** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataBox/jobs/{jobName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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); + }); +} + +/** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 JobResource} 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 _beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, 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 ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined; + // 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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (jobName !== null && jobName !== undefined) { + if (jobName.length > 24) + { + throw new Error('"jobName" should satisfy the constraint - "MaxLength": 24'); + } + if (jobName.length < 3) + { + throw new Error('"jobName" should satisfy the constraint - "MinLength": 3'); + } + if (jobName.match(/^[-\w\.]+$/) === null) + { + throw new Error('"jobName" should satisfy the constraint - "Pattern": /^[-\w\.]+$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') { + throw new Error('ifMatch must be of type string.'); + } + if (jobResourceUpdateParameter === null || jobResourceUpdateParameter === undefined) { + throw new Error('jobResourceUpdateParameter 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.DataBox/jobs/{jobName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + 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 (ifMatch !== undefined && ifMatch !== null) { + httpRequest.headers['If-Match'] = ifMatch; + } + 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 (jobResourceUpdateParameter !== null && jobResourceUpdateParameter !== undefined) { + let requestModelMapper = new client.models['JobResourceUpdateParameter']().mapper(); + requestModel = client.serialize(requestModelMapper, jobResourceUpdateParameter, 'jobResourceUpdateParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(jobResourceUpdateParameter, 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 !== 200 && 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 === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['JobResource']().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); + }); +} + +/** + * Lists all the jobs available under the 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 JobResourceList} 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 _listNext(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['JobResourceList']().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); + }); +} + +/** + * Lists all the jobs available under the given 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 JobResourceList} 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['JobResourceList']().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); + }); +} + +/** Class representing a Jobs. */ +class Jobs { + /** + * Create a Jobs. + * @param {DataBoxManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._get = _get; + this._create = _create; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._bookShipmentPickUp = _bookShipmentPickUp; + this._cancel = _cancel; + this._listCredentials = _listCredentials; + this._beginCreate = _beginCreate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginUpdate = _beginUpdate; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + } + + /** + * Lists all the jobs available under the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the jobs available under the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 {JobResourceList} - 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 JobResourceList} 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] $skipToken is supported on Get list of + * jobs, which provides the next page in the list of jobs. + * + * @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 {JobResourceList} - 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 JobResourceList} 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. + */ + listByResourceGroup(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._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Gets information about the specified job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] $expand is supported on details parameter + * for job, which provides details on the job stages. + * + * @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, jobName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, jobName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets information about the specified job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] $expand is supported on details parameter + * for job, which provides details on the job stages. + * + * @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 {JobResource} - 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 JobResource} 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, jobName, 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, jobName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, jobName, options, optionalCallback); + } + } + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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. + */ + createWithHttpOperationResponse(resourceGroupName, jobName, jobResource, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(resourceGroupName, jobName, jobResource, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 {JobResource} - 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 JobResource} 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. + */ + create(resourceGroupName, jobName, jobResource, 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._create(resourceGroupName, jobName, jobResource, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(resourceGroupName, jobName, jobResource, options, optionalCallback); + } + } + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, jobName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, 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, jobName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, jobName, options, optionalCallback); + } + } + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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. + */ + updateWithHttpOperationResponse(resourceGroupName, jobName, jobResourceUpdateParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, jobName, jobResourceUpdateParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 {JobResource} - 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 JobResource} 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. + */ + update(resourceGroupName, jobName, jobResourceUpdateParameter, 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._update(resourceGroupName, jobName, jobResourceUpdateParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, jobName, jobResourceUpdateParameter, options, optionalCallback); + } + } + + /** + * Book shipment pick up. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} shipmentPickUpRequest Details of shipment pick up request. + * + * @param {date} shipmentPickUpRequest.startTime Minimum date after which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {date} shipmentPickUpRequest.endTime Maximum date before which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {string} shipmentPickUpRequest.shipmentLocation Shipment Location in + * the pickup place. Eg.front desk + * + * @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. + */ + bookShipmentPickUpWithHttpOperationResponse(resourceGroupName, jobName, shipmentPickUpRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Book shipment pick up. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} shipmentPickUpRequest Details of shipment pick up request. + * + * @param {date} shipmentPickUpRequest.startTime Minimum date after which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {date} shipmentPickUpRequest.endTime Maximum date before which the + * pick up should commence, this must be in local time of pick up area. + * + * @param {string} shipmentPickUpRequest.shipmentLocation Shipment Location in + * the pickup place. Eg.front desk + * + * @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 {ShipmentPickUpResponse} - 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 ShipmentPickUpResponse} 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. + */ + bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest, 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._bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest, options, optionalCallback); + } + } + + /** + * CancelJob. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {string} reason Reason for cancellation. + * + * @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. + */ + cancelWithHttpOperationResponse(resourceGroupName, jobName, reason, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._cancel(resourceGroupName, jobName, reason, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * CancelJob. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {string} reason Reason for cancellation. + * + * @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. + */ + cancel(resourceGroupName, jobName, reason, 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._cancel(resourceGroupName, jobName, reason, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._cancel(resourceGroupName, jobName, reason, options, optionalCallback); + } + } + + /** + * This method gets the unencrypted secrets related to the job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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. + */ + listCredentialsWithHttpOperationResponse(resourceGroupName, jobName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listCredentials(resourceGroupName, jobName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method gets the unencrypted secrets related to the job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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 {UnencryptedCredentialsList} - 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 UnencryptedCredentialsList} 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. + */ + listCredentials(resourceGroupName, jobName, 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._listCredentials(resourceGroupName, jobName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listCredentials(resourceGroupName, jobName, options, optionalCallback); + } + } + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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. + */ + beginCreateWithHttpOperationResponse(resourceGroupName, jobName, jobResource, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreate(resourceGroupName, jobName, jobResource, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a new job with the specified parameters. Existing job cannot be + * updated with this API and should instead be updated with the Update job API. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResource Job details from request body. + * + * @param {object} [jobResource.details] Details of a job run. This field will + * only be sent for expand details filter. + * + * @param {number} [jobResource.details.expectedDataSizeInTeraBytes] The + * expected size of the data, which needs to be transfered in this job, in tera + * bytes. + * + * @param {object} jobResource.details.contactDetails Contact details for + * notification and shipping. + * + * @param {string} jobResource.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResource.details.contactDetails.phone Phone number of the + * contact person. + * + * @param {string} [jobResource.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResource.details.contactDetails.mobile] Mobile number of + * the contact person. + * + * @param {array} jobResource.details.contactDetails.emailList List of + * Email-ids to be notified about job progress. + * + * @param {array} [jobResource.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} jobResource.details.shippingAddress Shipping address of the + * customer. + * + * @param {string} jobResource.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} [jobResource.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResource.details.shippingAddress.city] Name of the City. + * + * @param {string} [jobResource.details.shippingAddress.stateOrProvince] Name + * of the State or Province. + * + * @param {string} jobResource.details.shippingAddress.country Name of the + * Country. + * + * @param {string} jobResource.details.shippingAddress.postalCode Postal code. + * + * @param {string} [jobResource.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} [jobResource.details.shippingAddress.companyName] Name of + * the company. + * + * @param {string} [jobResource.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} jobResource.details.destinationAccountDetails Destination + * account details. + * + * @param {object} [jobResource.details.preferences] Preferences for the order. + * + * @param {array} [jobResource.details.preferences.preferredDataCenterRegion] + * + * @param {string} jobResource.details.jobDetailsType Polymorphic Discriminator + * + * @param {string} jobResource.location The location of the resource. This will + * be one of the supported and registered Azure Regions (e.g. West US, East US, + * Southeast Asia, etc.). The region of a resource cannot be changed once it is + * created, but if an identical region is specified on update the request will + * succeed. + * + * @param {object} [jobResource.tags] The list of key value pairs that describe + * the resource. These tags can be used in viewing and grouping this resource + * (across resource groups). + * + * @param {object} jobResource.sku The sku type. + * + * @param {string} jobResource.sku.name The sku name. Possible values include: + * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @param {string} [jobResource.sku.displayName] The display name of the sku. + * + * @param {string} [jobResource.sku.family] The sku family. + * + * @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 {JobResource} - 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 JobResource} 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. + */ + beginCreate(resourceGroupName, jobName, jobResource, 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._beginCreate(resourceGroupName, jobName, jobResource, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreate(resourceGroupName, jobName, jobResource, options, optionalCallback); + } + } + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, jobName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @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, jobName, 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, jobName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, jobName, options, optionalCallback); + } + } + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, jobName, jobResourceUpdateParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates the properties of an existing job. + * + * @param {string} resourceGroupName The Resource Group Name + * + * @param {string} jobName The name of the job Resource within the specified + * resource group. job names must be between 3 and 24 characters in length and + * use any alphanumeric and underscore only + * + * @param {object} jobResourceUpdateParameter Job update parameters from + * request body. + * + * @param {object} [jobResourceUpdateParameter.details] Details of a job to be + * updated. + * + * @param {object} [jobResourceUpdateParameter.details.contactDetails] Contact + * details for notification and shipping. + * + * @param {string} + * jobResourceUpdateParameter.details.contactDetails.contactName Contact name + * of the person. + * + * @param {string} jobResourceUpdateParameter.details.contactDetails.phone + * Phone number of the contact person. + * + * @param {string} + * [jobResourceUpdateParameter.details.contactDetails.phoneExtension] Phone + * extension number of the contact person. + * + * @param {string} [jobResourceUpdateParameter.details.contactDetails.mobile] + * Mobile number of the contact person. + * + * @param {array} jobResourceUpdateParameter.details.contactDetails.emailList + * List of Email-ids to be notified about job progress. + * + * @param {array} + * [jobResourceUpdateParameter.details.contactDetails.notificationPreference] + * Notification preference for a job stage. + * + * @param {object} [jobResourceUpdateParameter.details.shippingAddress] + * Shipping address of the customer. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.streetAddress1 Street + * Address line 1. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress2] Street + * Address line 2. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.streetAddress3] Street + * Address line 3. + * + * @param {string} [jobResourceUpdateParameter.details.shippingAddress.city] + * Name of the City. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.stateOrProvince] Name of + * the State or Province. + * + * @param {string} jobResourceUpdateParameter.details.shippingAddress.country + * Name of the Country. + * + * @param {string} + * jobResourceUpdateParameter.details.shippingAddress.postalCode Postal code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.zipExtendedCode] + * Extended Zip Code. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.companyName] Name of the + * company. + * + * @param {string} + * [jobResourceUpdateParameter.details.shippingAddress.addressType] Type of + * address. Possible values include: 'None', 'Residential', 'Commercial' + * + * @param {array} [jobResourceUpdateParameter.destinationAccountDetails] + * Destination account details. + * + * @param {object} [jobResourceUpdateParameter.tags] The list of key value + * pairs that describe the resource. These tags can be used in viewing and + * grouping this resource (across resource groups). + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.ifMatch] Defines the If-Match condition. The patch + * will be performed only if the ETag of the job on the server matches this + * value. + * + * @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 {JobResource} - 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 JobResource} 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. + */ + beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, 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._beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, options, optionalCallback); + } + } + + /** + * Lists all the jobs available under the 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. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the jobs available under the 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 {JobResourceList} - 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 JobResourceList} 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. + */ + listNext(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._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Lists all the jobs available under the given 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; + }); + }); + } + + /** + * Lists all the jobs available under the given 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 {JobResourceList} - 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 JobResourceList} 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); + } + } + +} + +module.exports = Jobs; diff --git a/lib/services/databoxManagement/lib/operations/operations.js b/lib/services/databoxManagement/lib/operations/operations.js new file mode 100644 index 0000000000..a9780b8d99 --- /dev/null +++ b/lib/services/databoxManagement/lib/operations/operations.js @@ -0,0 +1,449 @@ +/* + * 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; + +/** + * This method gets all the operations. + * + * @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 OperationList} 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 _list(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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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('/') ? '' : '/') + 'providers/Microsoft.DataBox/operations'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['OperationList']().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); + }); +} + +/** + * This method gets all the operations. + * + * @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 OperationList} 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 _listNext(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['OperationList']().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); + }); +} + +/** Class representing a Operations. */ +class Operations { + /** + * Create a Operations. + * @param {DataBoxManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listNext = _listNext; + } + + /** + * This method gets all the operations. + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method gets all the operations. + * + * @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 {OperationList} - 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 OperationList} 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * This method gets all the operations. + * + * @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. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method gets all the operations. + * + * @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 {OperationList} - 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 OperationList} 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. + */ + listNext(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._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Operations; diff --git a/lib/services/databoxManagement/lib/operations/service.js b/lib/services/databoxManagement/lib/operations/service.js new file mode 100644 index 0000000000..79f9724513 --- /dev/null +++ b/lib/services/databoxManagement/lib/operations/service.js @@ -0,0 +1,868 @@ +/* + * 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; + +/** + * This method provides the list of available skus for the given subscription + * and location. + * + * @param {string} location The location of the resource + * + * @param {object} availableSkuRequest Filters for showing the available skus. + * + * @param {string} availableSkuRequest.country ISO country code. Country for + * hardware shipment. For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * + * @param {string} availableSkuRequest.location Location for data transfer. For + * locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * + * @param {array} [availableSkuRequest.skuNames] Sku Names to filter for + * available skus + * + * @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 AvailableSkusResult} 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 _listAvailableSkus(location, availableSkuRequest, 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.'); + } + if (availableSkuRequest === null || availableSkuRequest === undefined) + { + availableSkuRequest = {}; + } + // 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 (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (availableSkuRequest === null || availableSkuRequest === undefined) { + throw new Error('availableSkuRequest 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}/providers/Microsoft.DataBox/locations/{location}/availableSkus'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (availableSkuRequest !== null && availableSkuRequest !== undefined) { + let requestModelMapper = new client.models['AvailableSkuRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, availableSkuRequest, 'availableSkuRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(availableSkuRequest, 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 !== 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['AvailableSkusResult']().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); + }); +} + +/** + * This method validates the customer shipping address and provide alternate + * addresses if any. + * + * @param {string} location The location of the resource + * + * @param {object} shippingAddress Shipping address of the customer. + * + * @param {string} shippingAddress.streetAddress1 Street Address line 1. + * + * @param {string} [shippingAddress.streetAddress2] Street Address line 2. + * + * @param {string} [shippingAddress.streetAddress3] Street Address line 3. + * + * @param {string} [shippingAddress.city] Name of the City. + * + * @param {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * + * @param {string} shippingAddress.country Name of the Country. + * + * @param {string} shippingAddress.postalCode Postal code. + * + * @param {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * + * @param {string} [shippingAddress.companyName] Name of the company. + * + * @param {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * + * @param {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @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 AddressValidationOutput} 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 _validateAddressMethod(location, shippingAddress, deviceType, 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 (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 (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (shippingAddress === null || shippingAddress === undefined) { + throw new Error('shippingAddress cannot be null or undefined.'); + } + if (deviceType) { + let allowedValues = [ 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' ]; + if (!allowedValues.some( function(item) { return item === deviceType; })) { + throw new Error(deviceType + ' is not a valid value. The valid values are: ' + allowedValues); + } + } else { + throw new Error('deviceType 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); + } + let validateAddress; + if ((shippingAddress !== null && shippingAddress !== undefined) || (deviceType !== null && deviceType !== undefined)) { + validateAddress = new client.models['ValidateAddress'](); + validateAddress.shippingAddress = shippingAddress; + validateAddress.deviceType = deviceType; + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (validateAddress !== null && validateAddress !== undefined) { + let requestModelMapper = new client.models['ValidateAddress']().mapper(); + requestModel = client.serialize(requestModelMapper, validateAddress, 'validateAddress'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(validateAddress, 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 !== 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['AddressValidationOutput']().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); + }); +} + +/** + * This method provides the list of available skus for the given subscription + * and location. + * + * @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 AvailableSkusResult} 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 _listAvailableSkusNext(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 = 'POST'; + 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['AvailableSkusResult']().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); + }); +} + +/** Class representing a Service. */ +class Service { + /** + * Create a Service. + * @param {DataBoxManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listAvailableSkus = _listAvailableSkus; + this._validateAddressMethod = _validateAddressMethod; + this._listAvailableSkusNext = _listAvailableSkusNext; + } + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @param {string} location The location of the resource + * + * @param {object} availableSkuRequest Filters for showing the available skus. + * + * @param {string} availableSkuRequest.country ISO country code. Country for + * hardware shipment. For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * + * @param {string} availableSkuRequest.location Location for data transfer. For + * locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * + * @param {array} [availableSkuRequest.skuNames] Sku Names to filter for + * available skus + * + * @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. + */ + listAvailableSkusWithHttpOperationResponse(location, availableSkuRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listAvailableSkus(location, availableSkuRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @param {string} location The location of the resource + * + * @param {object} availableSkuRequest Filters for showing the available skus. + * + * @param {string} availableSkuRequest.country ISO country code. Country for + * hardware shipment. For codes check: + * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * + * @param {string} availableSkuRequest.location Location for data transfer. For + * locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * + * @param {array} [availableSkuRequest.skuNames] Sku Names to filter for + * available skus + * + * @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 {AvailableSkusResult} - 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 AvailableSkusResult} 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. + */ + listAvailableSkus(location, availableSkuRequest, 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._listAvailableSkus(location, availableSkuRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listAvailableSkus(location, availableSkuRequest, options, optionalCallback); + } + } + + /** + * This method validates the customer shipping address and provide alternate + * addresses if any. + * + * @param {string} location The location of the resource + * + * @param {object} shippingAddress Shipping address of the customer. + * + * @param {string} shippingAddress.streetAddress1 Street Address line 1. + * + * @param {string} [shippingAddress.streetAddress2] Street Address line 2. + * + * @param {string} [shippingAddress.streetAddress3] Street Address line 3. + * + * @param {string} [shippingAddress.city] Name of the City. + * + * @param {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * + * @param {string} shippingAddress.country Name of the Country. + * + * @param {string} shippingAddress.postalCode Postal code. + * + * @param {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * + * @param {string} [shippingAddress.companyName] Name of the company. + * + * @param {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * + * @param {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @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. + */ + validateAddressMethodWithHttpOperationResponse(location, shippingAddress, deviceType, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._validateAddressMethod(location, shippingAddress, deviceType, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method validates the customer shipping address and provide alternate + * addresses if any. + * + * @param {string} location The location of the resource + * + * @param {object} shippingAddress Shipping address of the customer. + * + * @param {string} shippingAddress.streetAddress1 Street Address line 1. + * + * @param {string} [shippingAddress.streetAddress2] Street Address line 2. + * + * @param {string} [shippingAddress.streetAddress3] Street Address line 3. + * + * @param {string} [shippingAddress.city] Name of the City. + * + * @param {string} [shippingAddress.stateOrProvince] Name of the State or + * Province. + * + * @param {string} shippingAddress.country Name of the Country. + * + * @param {string} shippingAddress.postalCode Postal code. + * + * @param {string} [shippingAddress.zipExtendedCode] Extended Zip Code. + * + * @param {string} [shippingAddress.companyName] Name of the company. + * + * @param {string} [shippingAddress.addressType] Type of address. Possible + * values include: 'None', 'Residential', 'Commercial' + * + * @param {string} deviceType Device type to be used for the job. Possible + * values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + * + * @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 {AddressValidationOutput} - 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 AddressValidationOutput} 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. + */ + validateAddressMethod(location, shippingAddress, deviceType, 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._validateAddressMethod(location, shippingAddress, deviceType, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._validateAddressMethod(location, shippingAddress, deviceType, options, optionalCallback); + } + } + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @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. + */ + listAvailableSkusNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listAvailableSkusNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This method provides the list of available skus for the given subscription + * and location. + * + * @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 {AvailableSkusResult} - 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 AvailableSkusResult} 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. + */ + listAvailableSkusNext(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._listAvailableSkusNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listAvailableSkusNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Service; diff --git a/lib/services/databoxManagement/package.json b/lib/services/databoxManagement/package.json new file mode 100644 index 0000000000..2bf4392204 --- /dev/null +++ b/lib/services/databoxManagement/package.json @@ -0,0 +1,25 @@ +{ + "name": "azure-arm-databox", + "author": "Microsoft Corporation", + "description": "DataBoxManagementClient Library with typescript type definitions for node", + "version": "0.0.1", + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/dataBoxManagementClient.js", + "types": "./lib/dataBoxManagementClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-node/issues" + } +} diff --git a/lib/services/datafactoryManagement/lib/models/activityPolicy.js b/lib/services/datafactoryManagement/lib/models/activityPolicy.js index b3b092348a..856bccee7a 100644 --- a/lib/services/datafactoryManagement/lib/models/activityPolicy.js +++ b/lib/services/datafactoryManagement/lib/models/activityPolicy.js @@ -24,6 +24,8 @@ class ActivityPolicy { * Type: integer (or Expression with resultType integer), minimum: 0. * @member {number} [retryIntervalInSeconds] Interval between each retry * attempt (in seconds). The default is 30 sec. + * @member {boolean} [secureInput] When set to true, Input from activity is + * considered as secure and will not be logged to monitoring. * @member {boolean} [secureOutput] When set to true, Output from activity is * considered as secure and will not be logged to monitoring. */ @@ -81,6 +83,13 @@ class ActivityPolicy { name: 'Number' } }, + secureInput: { + required: false, + serializedName: 'secureInput', + type: { + name: 'Boolean' + } + }, secureOutput: { required: false, serializedName: 'secureOutput', diff --git a/lib/services/datafactoryManagement/lib/models/executionActivity.js b/lib/services/datafactoryManagement/lib/models/executionActivity.js index a34a2d4d78..2dadb92822 100644 --- a/lib/services/datafactoryManagement/lib/models/executionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executionActivity.js @@ -34,6 +34,8 @@ class ExecutionActivity extends models['Activity'] { * is 0. Type: integer (or Expression with resultType integer), minimum: 0. * @member {number} [policy.retryIntervalInSeconds] Interval between each * retry attempt (in seconds). The default is 30 sec. + * @member {boolean} [policy.secureInput] When set to true, Input from + * activity is considered as secure and will not be logged to monitoring. * @member {boolean} [policy.secureOutput] When set to true, Output from * activity is considered as secure and will not be logged to monitoring. */ diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 6c097510c3..8bfc1f3950 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -4853,6 +4853,8 @@ export interface ScheduleTrigger extends MultiplePipelineTrigger { * Type: integer (or Expression with resultType integer), minimum: 0. * @member {number} [retryIntervalInSeconds] Interval between each retry * attempt (in seconds). The default is 30 sec. + * @member {boolean} [secureInput] When set to true, Input from activity is + * considered as secure and will not be logged to monitoring. * @member {boolean} [secureOutput] When set to true, Output from activity is * considered as secure and will not be logged to monitoring. */ @@ -4860,6 +4862,7 @@ export interface ActivityPolicy { timeout?: any; retry?: any; retryIntervalInSeconds?: number; + secureInput?: boolean; secureOutput?: boolean; /** * @property Describes unknown properties. The value of an unknown property @@ -4887,6 +4890,8 @@ export interface ActivityPolicy { * 0. Type: integer (or Expression with resultType integer), minimum: 0. * @member {number} [policy.retryIntervalInSeconds] Interval between each retry * attempt (in seconds). The default is 30 sec. + * @member {boolean} [policy.secureInput] When set to true, Input from activity + * is considered as secure and will not be logged to monitoring. * @member {boolean} [policy.secureOutput] When set to true, Output from * activity is considered as secure and will not be logged to monitoring. */ diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index a5ee46dce0..0502725a76 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.d.ts +++ b/lib/services/datafactoryManagement/lib/operations/index.d.ts @@ -3887,6 +3887,9 @@ export interface PipelineRuns { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.isRecursive] If true, cancel all the Child + * pipelines that are triggered by the current pipeline. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3896,7 +3899,7 @@ export interface PipelineRuns { * * @reject {Error|ServiceError} - The error object. */ - cancelWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, options?: { isRecursive? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Cancel a pipeline run by its run ID. @@ -3909,6 +3912,9 @@ export interface PipelineRuns { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.isRecursive] If true, cancel all the Child + * pipelines that are triggered by the current pipeline. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3933,9 +3939,9 @@ export interface PipelineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - cancel(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, factoryName: string, runId: string, options?: { isRecursive? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; cancel(resourceGroupName: string, factoryName: string, runId: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, factoryName: string, runId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + cancel(resourceGroupName: string, factoryName: string, runId: string, options: { isRecursive? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** diff --git a/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js b/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js index 34cd8c5214..5c695ddf22 100644 --- a/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js +++ b/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js @@ -410,6 +410,9 @@ function _get(resourceGroupName, factoryName, runId, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.isRecursive] If true, cancel all the Child + * pipelines that are triggered by the current pipeline. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -435,6 +438,7 @@ function _cancel(resourceGroupName, factoryName, runId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let isRecursive = (options && options.isRecursive !== undefined) ? options.isRecursive : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -477,6 +481,9 @@ function _cancel(resourceGroupName, factoryName, runId, options, callback) { if (runId === null || runId === undefined || typeof runId.valueOf() !== 'string') { throw new Error('runId cannot be null or undefined and it must be of type string.'); } + if (isRecursive !== null && isRecursive !== undefined && typeof isRecursive !== 'boolean') { + throw new Error('isRecursive must be of type boolean.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -495,6 +502,9 @@ function _cancel(resourceGroupName, factoryName, runId, options, callback) { requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); requestUrl = requestUrl.replace('{runId}', encodeURIComponent(runId)); let queryParameters = []; + if (isRecursive !== null && isRecursive !== undefined) { + queryParameters.push('isRecursive=' + encodeURIComponent(isRecursive.toString())); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -791,6 +801,9 @@ class PipelineRuns { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.isRecursive] If true, cancel all the Child + * pipelines that are triggered by the current pipeline. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -825,6 +838,9 @@ class PipelineRuns { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.isRecursive] If true, cancel all the Child + * pipelines that are triggered by the current pipeline. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/datafactoryManagement/package.json b/lib/services/datafactoryManagement/package.json index 0bde241087..0d812b1b2d 100644 --- a/lib/services/datafactoryManagement/package.json +++ b/lib/services/datafactoryManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/dataFactoryManagementClient.js", "types": "./lib/dataFactoryManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/datafactoryManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/eventgridManagement/README.md b/lib/services/eventgridManagement/README.md index 73fe7ec966..634dae5877 100644 --- a/lib/services/eventgridManagement/README.md +++ b/lib/services/eventgridManagement/README.md @@ -18,7 +18,7 @@ npm install azure-arm-eventgrid ## How to use -### Authentication, client creation and get domains as an example. +### Authentication, client creation and get eventSubscriptions as an example. ```javascript const msRestAzure = require("ms-rest-azure"); @@ -26,9 +26,9 @@ const EventGridManagementClient = require("azure-arm-eventgrid"); msRestAzure.interactiveLogin().then((creds) => { const subscriptionId = ""; const client = new EventGridManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const domainName = "testdomainName"; - return client.domains.get(resourceGroupName, domainName).then((result) => { + const scope = "testscope"; + const eventSubscriptionName = "testeventSubscriptionName"; + return client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => { console.log("The result is:"); console.log(result); }); diff --git a/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts b/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts index 49705230e9..03519d10f0 100644 --- a/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts +++ b/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts @@ -56,8 +56,6 @@ export default class EventGridManagementClient extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups - domains: operations.Domains; - domainTopics: operations.DomainTopics; eventSubscriptions: operations.EventSubscriptions; operations: operations.Operations; topics: operations.Topics; diff --git a/lib/services/eventgridManagement/lib/eventGridManagementClient.js b/lib/services/eventgridManagement/lib/eventGridManagementClient.js index 6e01befdac..0b4ca2dd9a 100644 --- a/lib/services/eventgridManagement/lib/eventGridManagementClient.js +++ b/lib/services/eventgridManagement/lib/eventGridManagementClient.js @@ -50,7 +50,7 @@ class EventGridManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-09-15-preview'; + this.apiVersion = '2018-05-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -72,8 +72,6 @@ class EventGridManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } - this.domains = new operations.Domains(this); - this.domainTopics = new operations.DomainTopics(this); this.eventSubscriptions = new operations.EventSubscriptions(this); this.operations = new operations.Operations(this); this.topics = new operations.Topics(this); diff --git a/lib/services/eventgridManagement/lib/models/eventSubscription.js b/lib/services/eventgridManagement/lib/models/eventSubscription.js index b7dacf48f5..1da68c6113 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscription.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscription.js @@ -43,13 +43,11 @@ class EventSubscription extends models['Resource'] { * @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. - * @member {array} [filter.advancedFilters] A list of advanced filters. * @member {array} [labels] List of user defined labels. - * @member {date} [expirationTimeUtc] Expiration time of the event - * subscription. * @member {string} [eventDeliverySchema] The event delivery schema for the * event subscription. Possible values include: 'EventGridSchema', - * 'CloudEventV01Schema', 'CustomInputSchema' + * 'InputEventSchema', 'CloudEventV01Schema'. Default value: + * 'InputEventSchema' . * @member {object} [retryPolicy] The retry policy for events. This can be * used to configure maximum number of delivery attempts and time to live for * events. @@ -155,16 +153,10 @@ class EventSubscription extends models['Resource'] { } } }, - expirationTimeUtc: { - required: false, - serializedName: 'properties.expirationTimeUtc', - type: { - name: 'DateTime' - } - }, eventDeliverySchema: { required: false, serializedName: 'properties.eventDeliverySchema', + defaultValue: 'InputEventSchema', type: { name: 'String' } diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js index 831e72dd7b..338d0e2ba1 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js @@ -31,7 +31,6 @@ class EventSubscriptionFilter { * @member {boolean} [isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. Default value: false . - * @member {array} [advancedFilters] A list of advanced filters. */ constructor() { } @@ -85,26 +84,6 @@ class EventSubscriptionFilter { type: { name: 'Boolean' } - }, - advancedFilters: { - required: false, - serializedName: 'advancedFilters', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'AdvancedFilterElementType', - type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'operatorType', - clientName: 'operatorType' - }, - uberParent: 'AdvancedFilter', - className: 'AdvancedFilter' - } - } - } } } } diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js index 8aacf20691..d70cc1d5f0 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js @@ -36,13 +36,10 @@ class EventSubscriptionUpdateParameters { * @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. - * @member {array} [filter.advancedFilters] A list of advanced filters. * @member {array} [labels] List of user defined labels. - * @member {date} [expirationTimeUtc] Information about the expiration time - * for the event subscription. * @member {string} [eventDeliverySchema] The event delivery schema for the * event subscription. Possible values include: 'EventGridSchema', - * 'CloudEventV01Schema', 'CustomInputSchema' + * 'InputEventSchema', 'CloudEventV01Schema' * @member {object} [retryPolicy] The retry policy for events. This can be * used to configure maximum number of delivery attempts and time to live for * events. @@ -107,13 +104,6 @@ class EventSubscriptionUpdateParameters { } } }, - expirationTimeUtc: { - required: false, - serializedName: 'expirationTimeUtc', - type: { - name: 'DateTime' - } - }, eventDeliverySchema: { required: false, serializedName: 'eventDeliverySchema', diff --git a/lib/services/eventgridManagement/lib/models/index.d.ts b/lib/services/eventgridManagement/lib/models/index.d.ts index dc3904772d..5638897eaa 100644 --- a/lib/services/eventgridManagement/lib/models/index.d.ts +++ b/lib/services/eventgridManagement/lib/models/index.d.ts @@ -16,124 +16,6 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; -/** - * @class - * Initializes a new instance of the InputSchemaMapping class. - * @constructor - * By default, Event Grid expects events to be in the Event Grid event schema. - * Specifying an input schema mapping enables publishing to Event Grid using a - * custom input schema. Currently, the only supported type of - * InputSchemaMapping is 'JsonInputSchemaMapping'. - * - * @member {string} inputSchemaMappingType Polymorphic Discriminator - */ -export interface InputSchemaMapping { - inputSchemaMappingType: string; -} - -/** - * @class - * Initializes a new instance of the Resource class. - * @constructor - * Definition of a Resource - * - * @member {string} [id] Fully qualified identifier of the resource - * @member {string} [name] Name of the resource - * @member {string} [type] Type of the resource - */ -export interface Resource extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -/** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor - * Definition of a Tracked Resource - * - * @member {string} location Location of the resource - * @member {object} [tags] Tags of the resource - */ -export interface TrackedResource extends Resource { - location: string; - tags?: { [propertyName: string]: string }; -} - -/** - * @class - * Initializes a new instance of the Domain class. - * @constructor - * EventGrid Domain - * - * @member {string} [provisioningState] Provisioning state of the domain. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - * 'Canceled', 'Failed' - * @member {string} [endpoint] Endpoint for the domain. - * @member {string} [inputSchema] This determines the format that Event Grid - * should expect for incoming events published to the domain. Possible values - * include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - * @member {object} [inputSchemaMapping] Information about the - * InputSchemaMapping which specified the info about mapping event payload. - * @member {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic - * Discriminator - */ -export interface Domain extends TrackedResource { - readonly provisioningState?: string; - readonly endpoint?: string; - inputSchema?: string; - inputSchemaMapping?: InputSchemaMapping; -} - -/** - * @class - * Initializes a new instance of the DomainUpdateParameters class. - * @constructor - * Properties of the Domain update - * - * @member {object} [tags] Tags of the domains resource - */ -export interface DomainUpdateParameters { - tags?: { [propertyName: string]: string }; -} - -/** - * @class - * Initializes a new instance of the DomainSharedAccessKeys class. - * @constructor - * Shared access keys of the Domain - * - * @member {string} [key1] Shared access key1 for the domain. - * @member {string} [key2] Shared access key2 for the domain. - */ -export interface DomainSharedAccessKeys { - key1?: string; - key2?: string; -} - -/** - * @class - * Initializes a new instance of the DomainRegenerateKeyRequest class. - * @constructor - * Domain regenerate share access key request - * - * @member {string} keyName Key name to regenerate key1 or key2 - */ -export interface DomainRegenerateKeyRequest { - keyName: string; -} - -/** - * @class - * Initializes a new instance of the DomainTopic class. - * @constructor - * Domain Topic - * - */ -export interface DomainTopic extends Resource { -} - /** * @class * Initializes a new instance of the EventSubscriptionDestination class. @@ -146,22 +28,6 @@ export interface EventSubscriptionDestination { endpointType: string; } -/** - * @class - * Initializes a new instance of the AdvancedFilter class. - * @constructor - * Represents an advanced filter that can be used to filter events based on - * various event envelope/data fields. - * - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - * @member {string} operatorType Polymorphic Discriminator - */ -export interface AdvancedFilter { - key?: string; - operatorType: string; -} - /** * @class * Initializes a new instance of the EventSubscriptionFilter class. @@ -182,14 +48,12 @@ export interface AdvancedFilter { * @member {boolean} [isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. Default value: false . - * @member {array} [advancedFilters] A list of advanced filters. */ export interface EventSubscriptionFilter { subjectBeginsWith?: string; subjectEndsWith?: string; includedEventTypes?: string[]; isSubjectCaseSensitive?: boolean; - advancedFilters?: AdvancedFilter[]; } /** @@ -226,14 +90,18 @@ export interface DeadLetterDestination { /** * @class - * Initializes a new instance of the NumberInAdvancedFilter class. + * Initializes a new instance of the Resource class. * @constructor - * NumberIn filter + * Definition of a Resource * - * @member {array} [values] The set of filter values + * @member {string} [id] Fully qualified identifier of the resource + * @member {string} [name] Name of the resource + * @member {string} [type] Type of the resource */ -export interface NumberInAdvancedFilter extends AdvancedFilter { - values?: number[]; +export interface Resource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; } /** @@ -252,138 +120,6 @@ export interface StorageBlobDeadLetterDestination extends DeadLetterDestination blobContainerName?: string; } -/** - * @class - * Initializes a new instance of the NumberNotInAdvancedFilter class. - * @constructor - * NumberNotIn Filter - * - * @member {array} [values] The set of filter values - */ -export interface NumberNotInAdvancedFilter extends AdvancedFilter { - values?: number[]; -} - -/** - * @class - * Initializes a new instance of the NumberLessThanAdvancedFilter class. - * @constructor - * NumberLessThan Filter - * - * @member {number} [value] The filter value - */ -export interface NumberLessThanAdvancedFilter extends AdvancedFilter { - value?: number; -} - -/** - * @class - * Initializes a new instance of the NumberGreaterThanAdvancedFilter class. - * @constructor - * NumberGreaterThan Filter - * - * @member {number} [value] The filter value - */ -export interface NumberGreaterThanAdvancedFilter extends AdvancedFilter { - value?: number; -} - -/** - * @class - * Initializes a new instance of the NumberLessThanOrEqualsAdvancedFilter class. - * @constructor - * NumberLessThanOrEquals Filter - * - * @member {number} [value] The filter value - */ -export interface NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { - value?: number; -} - -/** - * @class - * Initializes a new instance of the NumberGreaterThanOrEqualsAdvancedFilter class. - * @constructor - * NumberGreaterThanOrEquals Filter - * - * @member {number} [value] The filter value - */ -export interface NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter { - value?: number; -} - -/** - * @class - * Initializes a new instance of the BoolEqualsAdvancedFilter class. - * @constructor - * BoolEquals Filter - * - * @member {boolean} [value] The filter value - */ -export interface BoolEqualsAdvancedFilter extends AdvancedFilter { - value?: boolean; -} - -/** - * @class - * Initializes a new instance of the StringInAdvancedFilter class. - * @constructor - * StringIn Filter - * - * @member {array} [values] The set of filter values - */ -export interface StringInAdvancedFilter extends AdvancedFilter { - values?: string[]; -} - -/** - * @class - * Initializes a new instance of the StringNotInAdvancedFilter class. - * @constructor - * StringNotIn Filter - * - * @member {array} [values] The set of filter values - */ -export interface StringNotInAdvancedFilter extends AdvancedFilter { - values?: string[]; -} - -/** - * @class - * Initializes a new instance of the StringBeginsWithAdvancedFilter class. - * @constructor - * StringBeginsWith Filter - * - * @member {array} [values] The set of filter values - */ -export interface StringBeginsWithAdvancedFilter extends AdvancedFilter { - values?: string[]; -} - -/** - * @class - * Initializes a new instance of the StringEndsWithAdvancedFilter class. - * @constructor - * StringEndsWith Filter - * - * @member {array} [values] The set of filter values - */ -export interface StringEndsWithAdvancedFilter extends AdvancedFilter { - values?: string[]; -} - -/** - * @class - * Initializes a new instance of the StringContainsAdvancedFilter class. - * @constructor - * StringContains Filter - * - * @member {array} [values] The set of filter values - */ -export interface StringContainsAdvancedFilter extends AdvancedFilter { - values?: string[]; -} - /** * @class * Initializes a new instance of the WebHookEventSubscriptionDestination class. @@ -472,13 +208,11 @@ export interface HybridConnectionEventSubscriptionDestination extends EventSubsc * @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. - * @member {array} [filter.advancedFilters] A list of advanced filters. * @member {array} [labels] List of user defined labels. - * @member {date} [expirationTimeUtc] Expiration time of the event - * subscription. * @member {string} [eventDeliverySchema] The event delivery schema for the * event subscription. Possible values include: 'EventGridSchema', - * 'CloudEventV01Schema', 'CustomInputSchema' + * 'InputEventSchema', 'CloudEventV01Schema'. Default value: 'InputEventSchema' + * . * @member {object} [retryPolicy] The retry policy for events. This can be used * to configure maximum number of delivery attempts and time to live for * events. @@ -497,7 +231,6 @@ export interface EventSubscription extends Resource { destination?: EventSubscriptionDestination; filter?: EventSubscriptionFilter; labels?: string[]; - expirationTimeUtc?: Date; eventDeliverySchema?: string; retryPolicy?: RetryPolicy; deadLetterDestination?: DeadLetterDestination; @@ -528,13 +261,10 @@ export interface EventSubscription extends Resource { * @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. - * @member {array} [filter.advancedFilters] A list of advanced filters. * @member {array} [labels] List of user defined labels. - * @member {date} [expirationTimeUtc] Information about the expiration time for - * the event subscription. * @member {string} [eventDeliverySchema] The event delivery schema for the * event subscription. Possible values include: 'EventGridSchema', - * 'CloudEventV01Schema', 'CustomInputSchema' + * 'InputEventSchema', 'CloudEventV01Schema' * @member {object} [retryPolicy] The retry policy for events. This can be used * to configure maximum number of delivery attempts and time to live for * events. @@ -551,7 +281,6 @@ export interface EventSubscriptionUpdateParameters { destination?: EventSubscriptionDestination; filter?: EventSubscriptionFilter; labels?: string[]; - expirationTimeUtc?: Date; eventDeliverySchema?: string; retryPolicy?: RetryPolicy; deadLetterDestination?: DeadLetterDestination; @@ -610,6 +339,21 @@ export interface Operation { properties?: any; } +/** + * @class + * Initializes a new instance of the InputSchemaMapping class. + * @constructor + * By default, Event Grid expects events to be in the Event Grid event schema. + * Specifying an input schema mapping enables publishing to Event Grid using a + * custom input schema. Currently, the only supported type of + * InputSchemaMapping is 'JsonInputSchemaMapping'. + * + * @member {string} inputSchemaMappingType Polymorphic Discriminator + */ +export interface InputSchemaMapping { + inputSchemaMappingType: string; +} + /** * @class * Initializes a new instance of the JsonField class. @@ -698,6 +442,20 @@ export interface JsonInputSchemaMapping extends InputSchemaMapping { dataVersion?: JsonFieldWithDefault; } +/** + * @class + * Initializes a new instance of the TrackedResource class. + * @constructor + * Definition of a Tracked Resource + * + * @member {string} location Location of the resource + * @member {object} [tags] Tags of the resource + */ +export interface TrackedResource extends Resource { + location: string; + tags?: { [propertyName: string]: string }; +} + /** * @class * Initializes a new instance of the Topic class. @@ -807,26 +565,6 @@ export interface TopicTypeInfo extends Resource { } -/** - * @class - * Initializes a new instance of the DomainsListResult class. - * @constructor - * Result of the List Domains operation - * - */ -export interface DomainsListResult extends Array { -} - -/** - * @class - * Initializes a new instance of the DomainTopicsListResult class. - * @constructor - * Result of the List Domain Topics operation - * - */ -export interface DomainTopicsListResult extends Array { -} - /** * @class * Initializes a new instance of the EventSubscriptionsListResult class. diff --git a/lib/services/eventgridManagement/lib/models/index.js b/lib/services/eventgridManagement/lib/models/index.js index d8e161899b..6861313f86 100644 --- a/lib/services/eventgridManagement/lib/models/index.js +++ b/lib/services/eventgridManagement/lib/models/index.js @@ -18,32 +18,12 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; -exports.InputSchemaMapping = require('./inputSchemaMapping'); -exports.Resource = require('./resource'); -exports.TrackedResource = require('./trackedResource'); -exports.Domain = require('./domain'); -exports.DomainUpdateParameters = require('./domainUpdateParameters'); -exports.DomainSharedAccessKeys = require('./domainSharedAccessKeys'); -exports.DomainRegenerateKeyRequest = require('./domainRegenerateKeyRequest'); -exports.DomainTopic = require('./domainTopic'); exports.EventSubscriptionDestination = require('./eventSubscriptionDestination'); -exports.AdvancedFilter = require('./advancedFilter'); exports.EventSubscriptionFilter = require('./eventSubscriptionFilter'); exports.RetryPolicy = require('./retryPolicy'); exports.DeadLetterDestination = require('./deadLetterDestination'); -exports.NumberInAdvancedFilter = require('./numberInAdvancedFilter'); +exports.Resource = require('./resource'); exports.StorageBlobDeadLetterDestination = require('./storageBlobDeadLetterDestination'); -exports.NumberNotInAdvancedFilter = require('./numberNotInAdvancedFilter'); -exports.NumberLessThanAdvancedFilter = require('./numberLessThanAdvancedFilter'); -exports.NumberGreaterThanAdvancedFilter = require('./numberGreaterThanAdvancedFilter'); -exports.NumberLessThanOrEqualsAdvancedFilter = require('./numberLessThanOrEqualsAdvancedFilter'); -exports.NumberGreaterThanOrEqualsAdvancedFilter = require('./numberGreaterThanOrEqualsAdvancedFilter'); -exports.BoolEqualsAdvancedFilter = require('./boolEqualsAdvancedFilter'); -exports.StringInAdvancedFilter = require('./stringInAdvancedFilter'); -exports.StringNotInAdvancedFilter = require('./stringNotInAdvancedFilter'); -exports.StringBeginsWithAdvancedFilter = require('./stringBeginsWithAdvancedFilter'); -exports.StringEndsWithAdvancedFilter = require('./stringEndsWithAdvancedFilter'); -exports.StringContainsAdvancedFilter = require('./stringContainsAdvancedFilter'); exports.WebHookEventSubscriptionDestination = require('./webHookEventSubscriptionDestination'); exports.EventHubEventSubscriptionDestination = require('./eventHubEventSubscriptionDestination'); exports.StorageQueueEventSubscriptionDestination = require('./storageQueueEventSubscriptionDestination'); @@ -53,43 +33,30 @@ exports.EventSubscriptionUpdateParameters = require('./eventSubscriptionUpdatePa exports.EventSubscriptionFullUrl = require('./eventSubscriptionFullUrl'); exports.OperationInfo = require('./operationInfo'); exports.Operation = require('./operation'); +exports.InputSchemaMapping = require('./inputSchemaMapping'); exports.JsonField = require('./jsonField'); exports.JsonFieldWithDefault = require('./jsonFieldWithDefault'); exports.JsonInputSchemaMapping = require('./jsonInputSchemaMapping'); +exports.TrackedResource = require('./trackedResource'); exports.Topic = require('./topic'); exports.TopicUpdateParameters = require('./topicUpdateParameters'); exports.TopicSharedAccessKeys = require('./topicSharedAccessKeys'); exports.TopicRegenerateKeyRequest = require('./topicRegenerateKeyRequest'); exports.EventType = require('./eventType'); exports.TopicTypeInfo = require('./topicTypeInfo'); -exports.DomainsListResult = require('./domainsListResult'); -exports.DomainTopicsListResult = require('./domainTopicsListResult'); exports.EventSubscriptionsListResult = require('./eventSubscriptionsListResult'); exports.OperationsListResult = require('./operationsListResult'); exports.TopicsListResult = require('./topicsListResult'); exports.EventTypesListResult = require('./eventTypesListResult'); exports.TopicTypesListResult = require('./topicTypesListResult'); exports.discriminators = { - 'InputSchemaMapping' : exports.InputSchemaMapping, 'EventSubscriptionDestination' : exports.EventSubscriptionDestination, - 'AdvancedFilter' : exports.AdvancedFilter, 'DeadLetterDestination' : exports.DeadLetterDestination, - 'AdvancedFilter.NumberIn' : exports.NumberInAdvancedFilter, 'DeadLetterDestination.StorageBlob' : exports.StorageBlobDeadLetterDestination, - 'AdvancedFilter.NumberNotIn' : exports.NumberNotInAdvancedFilter, - 'AdvancedFilter.NumberLessThan' : exports.NumberLessThanAdvancedFilter, - 'AdvancedFilter.NumberGreaterThan' : exports.NumberGreaterThanAdvancedFilter, - 'AdvancedFilter.NumberLessThanOrEquals' : exports.NumberLessThanOrEqualsAdvancedFilter, - 'AdvancedFilter.NumberGreaterThanOrEquals' : exports.NumberGreaterThanOrEqualsAdvancedFilter, - 'AdvancedFilter.BoolEquals' : exports.BoolEqualsAdvancedFilter, - 'AdvancedFilter.StringIn' : exports.StringInAdvancedFilter, - 'AdvancedFilter.StringNotIn' : exports.StringNotInAdvancedFilter, - 'AdvancedFilter.StringBeginsWith' : exports.StringBeginsWithAdvancedFilter, - 'AdvancedFilter.StringEndsWith' : exports.StringEndsWithAdvancedFilter, - 'AdvancedFilter.StringContains' : exports.StringContainsAdvancedFilter, 'EventSubscriptionDestination.WebHook' : exports.WebHookEventSubscriptionDestination, 'EventSubscriptionDestination.EventHub' : exports.EventHubEventSubscriptionDestination, 'EventSubscriptionDestination.StorageQueue' : exports.StorageQueueEventSubscriptionDestination, 'EventSubscriptionDestination.HybridConnection' : exports.HybridConnectionEventSubscriptionDestination, + 'InputSchemaMapping' : exports.InputSchemaMapping, 'InputSchemaMapping.Json' : exports.JsonInputSchemaMapping }; diff --git a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js index dd8e35341a..d96562e777 100644 --- a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js +++ b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js @@ -222,17 +222,11 @@ function _get(scope, eventSubscriptionName, options, callback) { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -449,18 +443,12 @@ function _deleteMethod(scope, eventSubscriptionName, options, callback) { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -2043,162 +2031,6 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, }); } -/** - * @summary List all event subscriptions for a specific domain topic - * - * List all event subscriptions that have been created for a specific domain - * topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the top level domain - * - * @param {string} topicName Name of the domain topic - * - * @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 EventSubscriptionsListResult} 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 _listByDomainTopic(resourceGroupName, domainName, topicName, 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 (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 (domainName === null || domainName === undefined || typeof domainName.valueOf() !== 'string') { - throw new Error('domainName cannot be null or undefined and it must be of type string.'); - } - if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') { - throw new Error('topicName cannot be null or undefined and it must be of type string.'); - } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); - requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.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['EventSubscriptionsListResult']().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); - }); -} - /** * @summary Create or update an event subscription * @@ -2254,17 +2086,11 @@ function _listByDomainTopic(resourceGroupName, domainName, topicName, options, c * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -2621,18 +2447,12 @@ function _beginDeleteMethod(scope, eventSubscriptionName, options, callback) { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -2826,7 +2646,6 @@ class EventSubscriptions { this._listRegionalBySubscriptionForTopicType = _listRegionalBySubscriptionForTopicType; this._listRegionalByResourceGroupForTopicType = _listRegionalByResourceGroupForTopicType; this._listByResource = _listByResource; - this._listByDomainTopic = _listByDomainTopic; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdate = _beginUpdate; @@ -2995,17 +2814,11 @@ class EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -3103,17 +2916,11 @@ class EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -3339,18 +3146,12 @@ class EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -3450,18 +3251,12 @@ class EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -4487,105 +4282,6 @@ class EventSubscriptions { } } - /** - * @summary List all event subscriptions for a specific domain topic - * - * List all event subscriptions that have been created for a specific domain - * topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the top level domain - * - * @param {string} topicName Name of the domain topic - * - * @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. - */ - listByDomainTopicWithHttpOperationResponse(resourceGroupName, domainName, topicName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listByDomainTopic(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary List all event subscriptions for a specific domain topic - * - * List all event subscriptions that have been created for a specific domain - * topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the top level domain - * - * @param {string} topicName Name of the domain topic - * - * @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 {EventSubscriptionsListResult} - 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 EventSubscriptionsListResult} 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. - */ - listByDomainTopic(resourceGroupName, domainName, topicName, 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._listByDomainTopic(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listByDomainTopic(resourceGroupName, domainName, topicName, options, optionalCallback); - } - } - /** * @summary Create or update an event subscription * @@ -4641,17 +4337,11 @@ class EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -4749,17 +4439,11 @@ class EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -4985,18 +4669,12 @@ class EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -5096,18 +4774,12 @@ class EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery diff --git a/lib/services/eventgridManagement/lib/operations/index.d.ts b/lib/services/eventgridManagement/lib/operations/index.d.ts index fa186ffc72..1e46bdfe3e 100644 --- a/lib/services/eventgridManagement/lib/operations/index.d.ts +++ b/lib/services/eventgridManagement/lib/operations/index.d.ts @@ -12,954 +12,6 @@ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationRes import * as models from '../models'; -/** - * @class - * Domains - * __NOTE__: An instance of this class is automatically created for an - * instance of the EventGridManagementClient. - */ -export interface Domains { - - - /** - * @summary Get a domain - * - * Get properties of a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get a domain - * - * Get properties of a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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 {Domain} - 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. - * - * {Domain} [result] - The deserialized result object if an error did not occur. - * See {@link Domain} 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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Create a domain - * - * Asynchronously creates a new domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainInfo Domain information - * - * @param {string} [domainInfo.inputSchema] This determines the format that - * Event Grid should expect for incoming events published to the domain. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema' - * - * @param {object} [domainInfo.inputSchemaMapping] Information about the - * InputSchemaMapping which specified the info about mapping event payload. - * - * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType - * Polymorphic Discriminator - * - * @param {string} domainInfo.location Location of the resource - * - * @param {object} [domainInfo.tags] Tags of the resource - * - * @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, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Create a domain - * - * Asynchronously creates a new domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainInfo Domain information - * - * @param {string} [domainInfo.inputSchema] This determines the format that - * Event Grid should expect for incoming events published to the domain. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema' - * - * @param {object} [domainInfo.inputSchemaMapping] Information about the - * InputSchemaMapping which specified the info about mapping event payload. - * - * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType - * Polymorphic Discriminator - * - * @param {string} domainInfo.location Location of the resource - * - * @param {object} [domainInfo.tags] Tags of the resource - * - * @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 {Domain} - 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. - * - * {Domain} [result] - The deserialized result object if an error did not occur. - * See {@link Domain} 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, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Delete a domain - * - * Delete existing domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Delete a domain - * - * Delete existing domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Update a domain - * - * Asynchronously updates a domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainUpdateParameters Domain update information - * - * @param {object} [domainUpdateParameters.tags] Tags of the domains resource - * - * @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. - */ - updateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Update a domain - * - * Asynchronously updates a domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainUpdateParameters Domain update information - * - * @param {object} [domainUpdateParameters.tags] Tags of the domains resource - * - * @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 {Domain} - 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. - * - * {Domain} [result] - The deserialized result object if an error did not occur. - * See {@link Domain} 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. - */ - update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, callback: ServiceCallback): void; - update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary List domains under an Azure subscription - * - * List all the domains under an Azure 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>; - - /** - * @summary List domains under an Azure subscription - * - * List all the domains under an Azure 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 {DomainsListResult} - 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. - * - * {DomainsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DomainsListResult} 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; - - - /** - * @summary List domains under a resource group - * - * List all the domains under a resource group - * - * @param {string} resourceGroupName The name of the resource group within the - * user's 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. - */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary List domains under a resource group - * - * List all the domains under a resource group - * - * @param {string} resourceGroupName The name of the resource group within the - * user's 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 {DomainsListResult} - 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. - * - * {DomainsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DomainsListResult} 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; - - - /** - * @summary List keys for a domain - * - * List the two keys used to publish to a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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. - */ - listSharedAccessKeysWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary List keys for a domain - * - * List the two keys used to publish to a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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 {DomainSharedAccessKeys} - 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. - * - * {DomainSharedAccessKeys} [result] - The deserialized result object if an error did not occur. - * See {@link DomainSharedAccessKeys} 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. - */ - listSharedAccessKeys(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSharedAccessKeys(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; - listSharedAccessKeys(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Regenerate key for a domain - * - * Regenerate a shared access key for a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} regenerateKeyRequest Request body to regenerate key - * - * @param {string} regenerateKeyRequest.keyName Key name to regenerate key1 or - * key2 - * - * @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. - */ - regenerateKeyWithHttpOperationResponse(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Regenerate key for a domain - * - * Regenerate a shared access key for a domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} regenerateKeyRequest Request body to regenerate key - * - * @param {string} regenerateKeyRequest.keyName Key name to regenerate key1 or - * key2 - * - * @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 {DomainSharedAccessKeys} - 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. - * - * {DomainSharedAccessKeys} [result] - The deserialized result object if an error did not occur. - * See {@link DomainSharedAccessKeys} 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. - */ - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, callback: ServiceCallback): void; - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Create a domain - * - * Asynchronously creates a new domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainInfo Domain information - * - * @param {string} [domainInfo.inputSchema] This determines the format that - * Event Grid should expect for incoming events published to the domain. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema' - * - * @param {object} [domainInfo.inputSchemaMapping] Information about the - * InputSchemaMapping which specified the info about mapping event payload. - * - * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType - * Polymorphic Discriminator - * - * @param {string} domainInfo.location Location of the resource - * - * @param {object} [domainInfo.tags] Tags of the resource - * - * @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, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Create a domain - * - * Asynchronously creates a new domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainInfo Domain information - * - * @param {string} [domainInfo.inputSchema] This determines the format that - * Event Grid should expect for incoming events published to the domain. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema' - * - * @param {object} [domainInfo.inputSchemaMapping] Information about the - * InputSchemaMapping which specified the info about mapping event payload. - * - * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType - * Polymorphic Discriminator - * - * @param {string} domainInfo.location Location of the resource - * - * @param {object} [domainInfo.tags] Tags of the resource - * - * @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 {Domain} - 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. - * - * {Domain} [result] - The deserialized result object if an error did not occur. - * See {@link Domain} 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, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Delete a domain - * - * Delete existing domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Delete a domain - * - * Delete existing domain - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @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, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Update a domain - * - * Asynchronously updates a domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainUpdateParameters Domain update information - * - * @param {object} [domainUpdateParameters.tags] Tags of the domains resource - * - * @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. - */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Update a domain - * - * Asynchronously updates a domain with the specified parameters. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {object} domainUpdateParameters Domain update information - * - * @param {object} [domainUpdateParameters.tags] Tags of the domains resource - * - * @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 {Domain} - 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. - * - * {Domain} [result] - The deserialized result object if an error did not occur. - * See {@link Domain} 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. - */ - beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DomainTopics - * __NOTE__: An instance of this class is automatically created for an - * instance of the EventGridManagementClient. - */ -export interface DomainTopics { - - - /** - * @summary Get a domain topic - * - * Get properties of a domain topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {string} topicName Name of the topic - * - * @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, domainName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get a domain topic - * - * Get properties of a domain topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the domain - * - * @param {string} topicName Name of the topic - * - * @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 {DomainTopic} - 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. - * - * {DomainTopic} [result] - The deserialized result object if an error did not occur. - * See {@link DomainTopic} 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, domainName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, domainName: string, topicName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, domainName: string, topicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary List domain topics. - * - * List all the topics in a domain. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Domain name. - * - * @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. - */ - listByDomainWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary List domain topics. - * - * List all the topics in a domain. - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Domain name. - * - * @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 {DomainTopicsListResult} - 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. - * - * {DomainTopicsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DomainTopicsListResult} 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. - */ - listByDomain(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDomain(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; - listByDomain(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - /** * @class * EventSubscriptions @@ -1105,17 +157,11 @@ export interface EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -1201,17 +247,11 @@ export interface EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -1395,18 +435,12 @@ export interface EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -1494,18 +528,12 @@ export interface EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -2246,78 +1274,6 @@ export interface EventSubscriptions { listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * @summary List all event subscriptions for a specific domain topic - * - * List all event subscriptions that have been created for a specific domain - * topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the top level domain - * - * @param {string} topicName Name of the domain topic - * - * @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. - */ - listByDomainTopicWithHttpOperationResponse(resourceGroupName: string, domainName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary List all event subscriptions for a specific domain topic - * - * List all event subscriptions that have been created for a specific domain - * topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} domainName Name of the top level domain - * - * @param {string} topicName Name of the domain topic - * - * @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 {EventSubscriptionsListResult} - 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. - * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} 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. - */ - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, callback: ServiceCallback): void; - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - /** * @summary Create or update an event subscription * @@ -2373,17 +1329,11 @@ export interface EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -2469,17 +1419,11 @@ export interface EventSubscriptions { * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionInfo.filter.advancedFilters] A list of - * advanced filters. - * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * - * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of - * the event subscription. - * * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event * delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts @@ -2663,18 +1607,12 @@ export interface EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery @@ -2762,18 +1700,12 @@ export interface EventSubscriptions { * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] A - * list of advanced filters. - * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * - * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] - * Information about the expiration time for the event subscription. - * * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The * event delivery schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema' * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery diff --git a/lib/services/eventgridManagement/lib/operations/index.js b/lib/services/eventgridManagement/lib/operations/index.js index 6ca7250658..4b3d0fac59 100644 --- a/lib/services/eventgridManagement/lib/operations/index.js +++ b/lib/services/eventgridManagement/lib/operations/index.js @@ -14,8 +14,6 @@ 'use strict'; -exports.Domains = require('./domains'); -exports.DomainTopics = require('./domainTopics'); exports.EventSubscriptions = require('./eventSubscriptions'); exports.Operations = require('./operations'); exports.Topics = require('./topics'); diff --git a/lib/services/eventgridManagement/package.json b/lib/services/eventgridManagement/package.json index 95ee9067e4..496a899882 100644 --- a/lib/services/eventgridManagement/package.json +++ b/lib/services/eventgridManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/eventGridManagementClient.js", "types": "./lib/eventGridManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/eventgridManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/monitorManagement/lib/models/index.d.ts b/lib/services/monitorManagement/lib/models/index.d.ts index a004e3aa8f..b77dd1d7aa 100644 --- a/lib/services/monitorManagement/lib/models/index.d.ts +++ b/lib/services/monitorManagement/lib/models/index.d.ts @@ -78,7 +78,8 @@ export interface ScaleCapacity { * hours and 5 minutes. * @member {string} timeAggregation time aggregation type. How the data that is * collected should be combined over time. The default value is Average. - * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count', + * 'Last' * @member {string} operator the operator that is used to compare the metric * data and the threshold. Possible values include: 'Equals', 'NotEquals', * 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' @@ -147,7 +148,7 @@ export interface ScaleAction { * @member {string} [metricTrigger.timeAggregation] time aggregation type. How * the data that is collected should be combined over time. The default value * is Average. Possible values include: 'Average', 'Minimum', 'Maximum', - * 'Total', 'Count' + * 'Total', 'Count', 'Last' * @member {string} [metricTrigger.operator] the operator that is used to * compare the metric data and the threshold. Possible values include: * 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', diff --git a/lib/services/monitorManagement/lib/models/metricTrigger.js b/lib/services/monitorManagement/lib/models/metricTrigger.js index 09e76603e5..2da56fd24d 100644 --- a/lib/services/monitorManagement/lib/models/metricTrigger.js +++ b/lib/services/monitorManagement/lib/models/metricTrigger.js @@ -33,7 +33,8 @@ class MetricTrigger { * hours and 5 minutes. * @member {string} timeAggregation time aggregation type. How the data that * is collected should be combined over time. The default value is Average. - * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', + * 'Count', 'Last' * @member {string} operator the operator that is used to compare the metric * data and the threshold. Possible values include: 'Equals', 'NotEquals', * 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' @@ -98,7 +99,7 @@ class MetricTrigger { serializedName: 'timeAggregation', type: { name: 'Enum', - allowedValues: [ 'Average', 'Minimum', 'Maximum', 'Total', 'Count' ] + allowedValues: [ 'Average', 'Minimum', 'Maximum', 'Total', 'Count', 'Last' ] } }, operator: { diff --git a/lib/services/monitorManagement/lib/models/scaleRule.js b/lib/services/monitorManagement/lib/models/scaleRule.js index beda6ba5a8..5260a6d2db 100644 --- a/lib/services/monitorManagement/lib/models/scaleRule.js +++ b/lib/services/monitorManagement/lib/models/scaleRule.js @@ -37,7 +37,7 @@ class ScaleRule { * @member {string} [metricTrigger.timeAggregation] time aggregation type. * How the data that is collected should be combined over time. The default * value is Average. Possible values include: 'Average', 'Minimum', - * 'Maximum', 'Total', 'Count' + * 'Maximum', 'Total', 'Count', 'Last' * @member {string} [metricTrigger.operator] the operator that is used to * compare the metric data and the threshold. Possible values include: * 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', diff --git a/lib/services/monitorManagement/package.json b/lib/services/monitorManagement/package.json index 7d9aa13beb..8ae61a04b3 100644 --- a/lib/services/monitorManagement/package.json +++ b/lib/services/monitorManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/monitorManagementClient.js", "types": "./lib/monitorManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/monitorManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/networkManagement2/package.json b/lib/services/networkManagement2/package.json index 0b57d20d2c..34a6124f83 100644 --- a/lib/services/networkManagement2/package.json +++ b/lib/services/networkManagement2/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/networkManagementClient.js", "types": "./lib/networkManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/networkManagement2", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/resourceManagement/lib/feature/featureClient.d.ts b/lib/services/resourceManagement/lib/feature/featureClient.d.ts index daac7accee..343b6a3923 100644 --- a/lib/services/resourceManagement/lib/feature/featureClient.d.ts +++ b/lib/services/resourceManagement/lib/feature/featureClient.d.ts @@ -8,7 +8,7 @@ * regenerated. */ -import { ServiceClientCredentials } from 'ms-rest'; +import { ServiceClient, ServiceClientOptions, ServiceCallback, HttpOperationResponse, ServiceClientCredentials } from 'ms-rest'; import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; @@ -57,6 +57,114 @@ export default class FeatureClient extends AzureServiceClient { // Operation groups features: operations.Features; + + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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. + */ + listOperationsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 {OperationListResult} - 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. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} 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. + */ + listOperations(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listOperations(callback: ServiceCallback): void; + listOperations(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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. + */ + listOperationsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 {OperationListResult} - 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. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} 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. + */ + listOperationsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listOperationsNext(nextPageLink: string, callback: ServiceCallback): void; + listOperationsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { FeatureClient, models as FeatureModels }; diff --git a/lib/services/resourceManagement/lib/feature/featureClient.js b/lib/services/resourceManagement/lib/feature/featureClient.js index 6d2d304720..d8f5a7bb50 100644 --- a/lib/services/resourceManagement/lib/feature/featureClient.js +++ b/lib/services/resourceManagement/lib/feature/featureClient.js @@ -17,11 +17,268 @@ const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const ServiceClient = msRestAzure.AzureServiceClient; +const WebResource = msRest.WebResource; const models = require('./models'); const operations = require('./operations'); +/** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 OperationListResult} 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 _listOperations(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.Features/operations'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.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.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.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['OperationListResult']().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); + }); +} + +/** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 OperationListResult} 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 _listOperationsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + 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.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.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.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.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['OperationListResult']().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); + }); +} + /** Class representing a FeatureClient. */ class FeatureClient extends ServiceClient { /** @@ -74,9 +331,173 @@ class FeatureClient extends ServiceClient { } this.features = new operations.Features(this); this.models = models; + this._listOperations = _listOperations; + this._listOperationsNext = _listOperationsNext; msRest.addSerializationMixin(this); } + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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. + */ + listOperationsWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._listOperations(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 {OperationListResult} - 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 OperationListResult} 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. + */ + listOperations(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listOperations(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listOperations(options, optionalCallback); + } + } + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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. + */ + listOperationsNextWithHttpOperationResponse(nextPageLink, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._listOperationsNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available Microsoft.Features REST API operations. + * + * @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 {OperationListResult} - 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 OperationListResult} 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. + */ + listOperationsNext(nextPageLink, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listOperationsNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listOperationsNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = FeatureClient; diff --git a/lib/services/resourceManagement/lib/feature/models/index.d.ts b/lib/services/resourceManagement/lib/feature/models/index.d.ts index ec61d6ea0b..1ecde30033 100644 --- a/lib/services/resourceManagement/lib/feature/models/index.d.ts +++ b/lib/services/resourceManagement/lib/feature/models/index.d.ts @@ -49,6 +49,56 @@ export interface FeatureResult { type?: string; } +/** + * @class + * Initializes a new instance of the OperationDisplay class. + * @constructor + * The object that represents the operation. + * + * @member {string} [provider] Service provider: Microsoft.Features + * @member {string} [resource] Resource on which the operation is performed: + * Profile, endpoint, etc. + * @member {string} [operation] Operation type: Read, write, delete, etc. + */ +export interface OperationDisplay { + provider?: string; + resource?: string; + operation?: string; +} + +/** + * @class + * Initializes a new instance of the Operation class. + * @constructor + * Microsoft.Features operation + * + * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * @member {object} [display] The object that represents the operation. + * @member {string} [display.provider] Service provider: Microsoft.Features + * @member {string} [display.resource] Resource on which the operation is + * performed: Profile, endpoint, etc. + * @member {string} [display.operation] Operation type: Read, write, delete, + * etc. + */ +export interface Operation { + name?: string; + display?: OperationDisplay; +} + + +/** + * @class + * Initializes a new instance of the OperationListResult class. + * @constructor + * Result of the request to list Microsoft.Features operations. It contains a + * list of operations and a URL link to get the next set of results. + * + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ +export interface OperationListResult extends Array { + nextLink?: string; +} /** * @class diff --git a/lib/services/resourceManagement/lib/feature/models/index.js b/lib/services/resourceManagement/lib/feature/models/index.js index 4c6deea212..80319edab8 100644 --- a/lib/services/resourceManagement/lib/feature/models/index.js +++ b/lib/services/resourceManagement/lib/feature/models/index.js @@ -20,4 +20,7 @@ exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; exports.FeatureProperties = require('./featureProperties'); exports.FeatureResult = require('./featureResult'); +exports.OperationDisplay = require('./operationDisplay'); +exports.Operation = require('./operation'); +exports.OperationListResult = require('./operationListResult'); exports.FeatureOperationsListResult = require('./featureOperationsListResult'); diff --git a/lib/services/resourceManagement/lib/feature/models/operation.js b/lib/services/resourceManagement/lib/feature/models/operation.js new file mode 100644 index 0000000000..8d732e8dcb --- /dev/null +++ b/lib/services/resourceManagement/lib/feature/models/operation.js @@ -0,0 +1,66 @@ +/* + * 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'; + +/** + * Microsoft.Features operation + * + */ +class Operation { + /** + * Create a Operation. + * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * @member {object} [display] The object that represents the operation. + * @member {string} [display.provider] Service provider: Microsoft.Features + * @member {string} [display.resource] Resource on which the operation is + * performed: Profile, endpoint, etc. + * @member {string} [display.operation] Operation type: Read, write, delete, + * etc. + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serializedName: 'display', + type: { + name: 'Composite', + className: 'OperationDisplay' + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/resourceManagement/lib/feature/models/operationDisplay.js b/lib/services/resourceManagement/lib/feature/models/operationDisplay.js new file mode 100644 index 0000000000..f3df1d54e7 --- /dev/null +++ b/lib/services/resourceManagement/lib/feature/models/operationDisplay.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'; + +/** + * The object that represents the operation. + * + */ +class OperationDisplay { + /** + * Create a OperationDisplay. + * @member {string} [provider] Service provider: Microsoft.Features + * @member {string} [resource] Resource on which the operation is performed: + * Profile, endpoint, etc. + * @member {string} [operation] Operation type: Read, write, delete, etc. + */ + constructor() { + } + + /** + * Defines the metadata of OperationDisplay + * + * @returns {object} metadata of OperationDisplay + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation_display', + type: { + name: 'Composite', + className: 'OperationDisplay', + modelProperties: { + provider: { + required: false, + serializedName: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serializedName: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serializedName: 'operation', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationDisplay; diff --git a/lib/services/resourceManagement/lib/feature/models/operationListResult.js b/lib/services/resourceManagement/lib/feature/models/operationListResult.js new file mode 100644 index 0000000000..b6e2492b26 --- /dev/null +++ b/lib/services/resourceManagement/lib/feature/models/operationListResult.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'; + +/** + * Result of the request to list Microsoft.Features operations. It contains a + * list of operations and a URL link to get the next set of results. + */ +class OperationListResult extends Array { + /** + * Create a OperationListResult. + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of OperationListResult + * + * @returns {object} metadata of OperationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationListResult', + type: { + name: 'Composite', + className: 'OperationListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationElementType', + type: { + name: 'Composite', + className: 'Operation' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationListResult; diff --git a/lib/services/storSimple1200SeriesManagement/LICENSE.txt b/lib/services/storSimple1200SeriesManagement/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/storSimple1200SeriesManagement/LICENSE.txt +++ b/lib/services/storSimple1200SeriesManagement/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/storSimple1200SeriesManagement/README.md b/lib/services/storSimple1200SeriesManagement/README.md index 869f5fceeb..291532b8e5 100644 --- a/lib/services/storSimple1200SeriesManagement/README.md +++ b/lib/services/storSimple1200SeriesManagement/README.md @@ -1,40 +1,40 @@ ---- -uid: azure-arm-storsimple1200series -summary: *content - ---- -# Microsoft Azure SDK for Node.js - StorSimpleManagementClient -This project provides a Node.js package for accessing Azure. Right now it supports: -- **Node.js version 6.x.x or higher** - -## Features - - -## How to Install - -```bash -npm install azure-arm-storsimple1200series -``` - -## How to use - -### Authentication, client creation and list managers as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const StorSimpleManagementClient = require("azure-arm-storsimple1200series"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new StorSimpleManagementClient(creds, subscriptionId); - return client.managers.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.log('An error occurred:'); - console.dir(err, {depth: null, colors: true}); -}); - -## Related projects - -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) +--- +uid: azure-arm-storsimple1200series +summary: *content + +--- +# Microsoft Azure SDK for Node.js - StorSimpleManagementClient +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +## Features + + +## How to Install + +```bash +npm install azure-arm-storsimple1200series +``` + +## How to use + +### Authentication, client creation and list managers as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const StorSimpleManagementClient = require("azure-arm-storsimple1200series"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new StorSimpleManagementClient(creds, subscriptionId); + return client.managers.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +## Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/storSimple1200SeriesManagement/lib/operations/availableProviderOperationsOperations.js b/lib/services/storSimple1200SeriesManagement/lib/operations/availableProviderOperationsOperations.js index 9cd31796dd..3b5c08ac5d 100644 --- a/lib/services/storSimple1200SeriesManagement/lib/operations/availableProviderOperationsOperations.js +++ b/lib/services/storSimple1200SeriesManagement/lib/operations/availableProviderOperationsOperations.js @@ -48,9 +48,6 @@ function _list(options, callback) { } // 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -63,8 +60,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.StorSimple/operations'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.StorSimple/operations'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { diff --git a/lib/services/storSimple1200SeriesManagement/package.json b/lib/services/storSimple1200SeriesManagement/package.json index 290b8e3207..e7e85a7532 100644 --- a/lib/services/storSimple1200SeriesManagement/package.json +++ b/lib/services/storSimple1200SeriesManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/storSimpleManagementClient.js", "types": "./lib/storSimpleManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/storSimple1200SeriesManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js index e072f99069..28a4f7ec4e 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js @@ -20,8 +20,6 @@ const models = require('./index'); class CloudEndpoint extends models['Resource'] { /** * Create a CloudEndpoint. - * @member {string} [storageAccountKey] Storage Account access key. - * @member {string} [storageAccount] Storage Account name. * @member {string} [storageAccountResourceId] Storage Account Resource Id * @member {string} [storageAccountShareName] Storage Account Share name * @member {string} [storageAccountTenantId] Storage Account Tenant Id @@ -74,20 +72,6 @@ class CloudEndpoint extends models['Resource'] { name: 'String' } }, - storageAccountKey: { - required: false, - serializedName: 'properties.storageAccountKey', - type: { - name: 'String' - } - }, - storageAccount: { - required: false, - serializedName: 'properties.storageAccount', - type: { - name: 'String' - } - }, storageAccountResourceId: { required: false, serializedName: 'properties.storageAccountResourceId', diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js new file mode 100644 index 0000000000..44475c876c --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js @@ -0,0 +1,100 @@ +/* + * 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 parameters used when creating a storage sync service. + * + */ +class CloudEndpointCreateParameters { + /** + * Create a CloudEndpointCreateParameters. + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that + * describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater + * than 128 characters and a value with a length no greater than 256 + * characters. + * @member {string} [storageAccountResourceId] Storage Account Resource Id + * @member {string} [storageAccountShareName] Storage Account Share name + * @member {string} [storageAccountTenantId] Storage Account Tenant Id + */ + constructor() { + } + + /** + * Defines the metadata of CloudEndpointCreateParameters + * + * @returns {object} metadata of CloudEndpointCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CloudEndpointCreateParameters', + type: { + name: 'Composite', + className: 'CloudEndpointCreateParameters', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storageAccountResourceId: { + required: false, + serializedName: 'properties.storageAccountResourceId', + type: { + name: 'String' + } + }, + storageAccountShareName: { + required: false, + serializedName: 'properties.storageAccountShareName', + type: { + name: 'String' + } + }, + storageAccountTenantId: { + required: false, + serializedName: 'properties.storageAccountTenantId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CloudEndpointCreateParameters; diff --git a/lib/services/storagesyncManagement/lib/models/index.d.ts b/lib/services/storagesyncManagement/lib/models/index.d.ts index 4fa06f73d5..3c76db6922 100644 --- a/lib/services/storagesyncManagement/lib/models/index.d.ts +++ b/lib/services/storagesyncManagement/lib/models/index.d.ts @@ -34,23 +34,54 @@ export interface StorageSyncErrorDetails { /** * @class - * Initializes a new instance of the StorageSyncError class. + * Initializes a new instance of the StorageSyncApiError class. * @constructor * Error type * * @member {string} [code] Error code of the given entry. * @member {string} [message] Error message of the given entry. + * @member {string} [target] Target of the given error entry. * @member {object} [details] Error details of the given entry. * @member {string} [details.code] Error code of the given entry. * @member {string} [details.message] Error message of the given entry. * @member {string} [details.target] Target of the given entry. */ -export interface StorageSyncError { +export interface StorageSyncApiError { code?: string; message?: string; + target?: string; details?: StorageSyncErrorDetails; } +/** + * @class + * Initializes a new instance of the StorageSyncError class. + * @constructor + * Error type + * + * @member {object} [error] Error details of the given entry. + * @member {string} [error.code] Error code of the given entry. + * @member {string} [error.message] Error message of the given entry. + * @member {string} [error.target] Target of the given error entry. + * @member {object} [error.details] Error details of the given entry. + * @member {string} [error.details.code] Error code of the given entry. + * @member {string} [error.details.message] Error message of the given entry. + * @member {string} [error.details.target] Target of the given entry. + * @member {object} [innererror] Error details of the given entry. + * @member {string} [innererror.code] Error code of the given entry. + * @member {string} [innererror.message] Error message of the given entry. + * @member {string} [innererror.target] Target of the given error entry. + * @member {object} [innererror.details] Error details of the given entry. + * @member {string} [innererror.details.code] Error code of the given entry. + * @member {string} [innererror.details.message] Error message of the given + * entry. + * @member {string} [innererror.details.target] Target of the given entry. + */ +export interface StorageSyncError { + error?: StorageSyncApiError; + innererror?: StorageSyncApiError; +} + /** * @class * Initializes a new instance of the SubscriptionState class. @@ -132,8 +163,6 @@ export interface SyncGroup extends Resource { * @constructor * Cloud Endpoint object. * - * @member {string} [storageAccountKey] Storage Account access key. - * @member {string} [storageAccount] Storage Account name. * @member {string} [storageAccountResourceId] Storage Account Resource Id * @member {string} [storageAccountShareName] Storage Account Share name * @member {string} [storageAccountTenantId] Storage Account Tenant Id @@ -145,8 +174,6 @@ export interface SyncGroup extends Resource { * @member {string} [lastOperationName] Resource Last Operation Name */ export interface CloudEndpoint extends Resource { - storageAccountKey?: string; - storageAccount?: string; storageAccountResourceId?: string; storageAccountShareName?: string; storageAccountTenantId?: string; @@ -158,6 +185,168 @@ export interface CloudEndpoint extends Resource { lastOperationName?: string; } +/** + * @class + * Initializes a new instance of the RecallActionParameters class. + * @constructor + * The parameters used when calling recall action on server endpoint. + * + * @member {string} [pattern] Pattern of the files. + * @member {string} [recallPath] Recall path. + */ +export interface RecallActionParameters { + pattern?: string; + recallPath?: string; +} + +/** + * @class + * Initializes a new instance of the StorageSyncServiceCreateParameters class. + * @constructor + * The parameters used when creating a storage sync service. + * + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo Regions + * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource + * cannot be changed once it is created, but if an identical geo region is + * specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that describe + * the resource. These tags can be used for viewing and grouping this resource + * (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + */ +export interface StorageSyncServiceCreateParameters { + location?: string; + tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the SyncGroupCreateParameters class. + * @constructor + * The parameters used when creating a sync group. + * + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo Regions + * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource + * cannot be changed once it is created, but if an identical geo region is + * specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that describe + * the resource. These tags can be used for viewing and grouping this resource + * (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * @member {object} [properties] The parameters used to create the sync group + */ +export interface SyncGroupCreateParameters { + location?: string; + tags?: { [propertyName: string]: string }; + properties?: any; +} + +/** + * @class + * Initializes a new instance of the CloudEndpointCreateParameters class. + * @constructor + * The parameters used when creating a storage sync service. + * + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo Regions + * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource + * cannot be changed once it is created, but if an identical geo region is + * specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that describe + * the resource. These tags can be used for viewing and grouping this resource + * (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * @member {string} [storageAccountResourceId] Storage Account Resource Id + * @member {string} [storageAccountShareName] Storage Account Share name + * @member {string} [storageAccountTenantId] Storage Account Tenant Id + */ +export interface CloudEndpointCreateParameters { + location?: string; + tags?: { [propertyName: string]: string }; + storageAccountResourceId?: string; + storageAccountShareName?: string; + storageAccountTenantId?: string; +} + +/** + * @class + * Initializes a new instance of the ServerEndpointCreateParameters class. + * @constructor + * The parameters used when creating a storage sync service. + * + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo Regions + * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource + * cannot be changed once it is created, but if an identical geo region is + * specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that describe + * the resource. These tags can be used for viewing and grouping this resource + * (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * @member {string} [serverLocalPath] Server Local path. + * @member {string} [cloudTiering] Cloud Tiering. Possible values include: + * 'on', 'off' + * @member {number} [volumeFreeSpacePercent] Level of free space to be + * maintained by Cloud Tiering if it is enabled. + * @member {string} [friendlyName] Friendly Name + * @member {string} [serverResourceId] Server Resource Id. + */ +export interface ServerEndpointCreateParameters { + location?: string; + tags?: { [propertyName: string]: string }; + serverLocalPath?: string; + cloudTiering?: string; + volumeFreeSpacePercent?: number; + friendlyName?: string; + serverResourceId?: string; +} + +/** + * @class + * Initializes a new instance of the RegisteredServerCreateParameters class. + * @constructor + * The parameters used when creating a storage sync service. + * + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo Regions + * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource + * cannot be changed once it is created, but if an identical geo region is + * specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that describe + * the resource. These tags can be used for viewing and grouping this resource + * (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * @member {string} [serverCertificate] Registered Server Certificate + * @member {string} [agentVersion] Registered Server Agent Version + * @member {string} [serverOSVersion] Registered Server OS Version + * @member {string} [lastHeartBeat] Registered Server last heart beat + * @member {string} [serverRole] Registered Server serverRole + * @member {string} [clusterId] Registered Server clusterId + * @member {string} [clusterName] Registered Server clusterName + * @member {string} [serverId] Registered Server serverId + * @member {string} [friendlyName] Friendly Name + */ +export interface RegisteredServerCreateParameters { + location?: string; + tags?: { [propertyName: string]: string }; + serverCertificate?: string; + agentVersion?: string; + serverOSVersion?: string; + lastHeartBeat?: string; + serverRole?: string; + clusterId?: string; + clusterName?: string; + serverId?: string; + friendlyName?: string; +} + /** * @class * Initializes a new instance of the ServerEndpointUpdateParameters class. @@ -213,9 +402,6 @@ export interface ServerEndpoint extends Resource { * @constructor * Registered Server resource. * - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type * @member {string} [serverCertificate] Registered Server Certificate * @member {string} [agentVersion] Registered Server Agent Version * @member {string} [serverOSVersion] Registered Server OS Version @@ -237,10 +423,7 @@ export interface ServerEndpoint extends Resource { * @member {string} [friendlyName] Friendly Name * @member {string} [managementEndpointUri] Management Endpoint Uri */ -export interface RegisteredServer extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export interface RegisteredServer extends Resource { serverCertificate?: string; agentVersion?: string; serverOSVersion?: string; diff --git a/lib/services/storagesyncManagement/lib/models/index.js b/lib/services/storagesyncManagement/lib/models/index.js index 120c64445a..696805cb3d 100644 --- a/lib/services/storagesyncManagement/lib/models/index.js +++ b/lib/services/storagesyncManagement/lib/models/index.js @@ -19,6 +19,7 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; exports.StorageSyncErrorDetails = require('./storageSyncErrorDetails'); +exports.StorageSyncApiError = require('./storageSyncApiError'); exports.StorageSyncError = require('./storageSyncError'); exports.SubscriptionState = require('./subscriptionState'); exports.Resource = require('./resource'); @@ -26,6 +27,12 @@ exports.TrackedResource = require('./trackedResource'); exports.StorageSyncService = require('./storageSyncService'); exports.SyncGroup = require('./syncGroup'); exports.CloudEndpoint = require('./cloudEndpoint'); +exports.RecallActionParameters = require('./recallActionParameters'); +exports.StorageSyncServiceCreateParameters = require('./storageSyncServiceCreateParameters'); +exports.SyncGroupCreateParameters = require('./syncGroupCreateParameters'); +exports.CloudEndpointCreateParameters = require('./cloudEndpointCreateParameters'); +exports.ServerEndpointCreateParameters = require('./serverEndpointCreateParameters'); +exports.RegisteredServerCreateParameters = require('./registeredServerCreateParameters'); exports.ServerEndpointUpdateParameters = require('./serverEndpointUpdateParameters'); exports.ServerEndpoint = require('./serverEndpoint'); exports.RegisteredServer = require('./registeredServer'); diff --git a/lib/services/storagesyncManagement/lib/models/recallActionParameters.js b/lib/services/storagesyncManagement/lib/models/recallActionParameters.js new file mode 100644 index 0000000000..96d1da2872 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/recallActionParameters.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'; + +/** + * The parameters used when calling recall action on server endpoint. + * + */ +class RecallActionParameters { + /** + * Create a RecallActionParameters. + * @member {string} [pattern] Pattern of the files. + * @member {string} [recallPath] Recall path. + */ + constructor() { + } + + /** + * Defines the metadata of RecallActionParameters + * + * @returns {object} metadata of RecallActionParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'RecallActionParameters', + type: { + name: 'Composite', + className: 'RecallActionParameters', + modelProperties: { + pattern: { + required: false, + serializedName: 'pattern', + type: { + name: 'String' + } + }, + recallPath: { + required: false, + serializedName: 'recallPath', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RecallActionParameters; diff --git a/lib/services/storagesyncManagement/lib/models/registeredServer.js b/lib/services/storagesyncManagement/lib/models/registeredServer.js index cfa338c603..9847aa9b8b 100644 --- a/lib/services/storagesyncManagement/lib/models/registeredServer.js +++ b/lib/services/storagesyncManagement/lib/models/registeredServer.js @@ -15,14 +15,11 @@ const models = require('./index'); /** * Registered Server resource. * - * @extends models['BaseResource'] + * @extends models['Resource'] */ -class RegisteredServer extends models['BaseResource'] { +class RegisteredServer extends models['Resource'] { /** * Create a RegisteredServer. - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type * @member {string} [serverCertificate] Registered Server Certificate * @member {string} [agentVersion] Registered Server Agent Version * @member {string} [serverOSVersion] Registered Server OS Version diff --git a/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js b/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js new file mode 100644 index 0000000000..0bfd317a37 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js @@ -0,0 +1,148 @@ +/* + * 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 parameters used when creating a storage sync service. + * + */ +class RegisteredServerCreateParameters { + /** + * Create a RegisteredServerCreateParameters. + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that + * describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater + * than 128 characters and a value with a length no greater than 256 + * characters. + * @member {string} [serverCertificate] Registered Server Certificate + * @member {string} [agentVersion] Registered Server Agent Version + * @member {string} [serverOSVersion] Registered Server OS Version + * @member {string} [lastHeartBeat] Registered Server last heart beat + * @member {string} [serverRole] Registered Server serverRole + * @member {string} [clusterId] Registered Server clusterId + * @member {string} [clusterName] Registered Server clusterName + * @member {string} [serverId] Registered Server serverId + * @member {string} [friendlyName] Friendly Name + */ + constructor() { + } + + /** + * Defines the metadata of RegisteredServerCreateParameters + * + * @returns {object} metadata of RegisteredServerCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'RegisteredServerCreateParameters', + type: { + name: 'Composite', + className: 'RegisteredServerCreateParameters', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + serverCertificate: { + required: false, + serializedName: 'properties.serverCertificate', + type: { + name: 'String' + } + }, + agentVersion: { + required: false, + serializedName: 'properties.agentVersion', + type: { + name: 'String' + } + }, + serverOSVersion: { + required: false, + serializedName: 'properties.serverOSVersion', + type: { + name: 'String' + } + }, + lastHeartBeat: { + required: false, + serializedName: 'properties.lastHeartBeat', + type: { + name: 'String' + } + }, + serverRole: { + required: false, + serializedName: 'properties.serverRole', + type: { + name: 'String' + } + }, + clusterId: { + required: false, + serializedName: 'properties.clusterId', + type: { + name: 'String' + } + }, + clusterName: { + required: false, + serializedName: 'properties.clusterName', + type: { + name: 'String' + } + }, + serverId: { + required: false, + serializedName: 'properties.serverId', + type: { + name: 'String' + } + }, + friendlyName: { + required: false, + serializedName: 'properties.friendlyName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RegisteredServerCreateParameters; diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js b/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js new file mode 100644 index 0000000000..1de8c64a0e --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js @@ -0,0 +1,122 @@ +/* + * 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 parameters used when creating a storage sync service. + * + */ +class ServerEndpointCreateParameters { + /** + * Create a ServerEndpointCreateParameters. + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that + * describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater + * than 128 characters and a value with a length no greater than 256 + * characters. + * @member {string} [serverLocalPath] Server Local path. + * @member {string} [cloudTiering] Cloud Tiering. Possible values include: + * 'on', 'off' + * @member {number} [volumeFreeSpacePercent] Level of free space to be + * maintained by Cloud Tiering if it is enabled. + * @member {string} [friendlyName] Friendly Name + * @member {string} [serverResourceId] Server Resource Id. + */ + constructor() { + } + + /** + * Defines the metadata of ServerEndpointCreateParameters + * + * @returns {object} metadata of ServerEndpointCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ServerEndpointCreateParameters', + type: { + name: 'Composite', + className: 'ServerEndpointCreateParameters', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + serverLocalPath: { + required: false, + serializedName: 'properties.serverLocalPath', + type: { + name: 'String' + } + }, + cloudTiering: { + required: false, + serializedName: 'properties.cloudTiering', + type: { + name: 'String' + } + }, + volumeFreeSpacePercent: { + required: false, + serializedName: 'properties.volumeFreeSpacePercent', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + friendlyName: { + required: false, + serializedName: 'properties.friendlyName', + type: { + name: 'String' + } + }, + serverResourceId: { + required: false, + serializedName: 'properties.serverResourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServerEndpointCreateParameters; diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js b/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js new file mode 100644 index 0000000000..553ef6142a --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js @@ -0,0 +1,80 @@ +/* + * 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'; + +/** + * Error type + * + */ +class StorageSyncApiError { + /** + * Create a StorageSyncApiError. + * @member {string} [code] Error code of the given entry. + * @member {string} [message] Error message of the given entry. + * @member {string} [target] Target of the given error entry. + * @member {object} [details] Error details of the given entry. + * @member {string} [details.code] Error code of the given entry. + * @member {string} [details.message] Error message of the given entry. + * @member {string} [details.target] Target of the given entry. + */ + constructor() { + } + + /** + * Defines the metadata of StorageSyncApiError + * + * @returns {object} metadata of StorageSyncApiError + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageSyncApiError', + type: { + name: 'Composite', + className: 'StorageSyncApiError', + modelProperties: { + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + serializedName: 'target', + type: { + name: 'String' + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'Composite', + className: 'StorageSyncErrorDetails' + } + } + } + } + }; + } +} + +module.exports = StorageSyncApiError; diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncError.js b/lib/services/storagesyncManagement/lib/models/storageSyncError.js index b185128307..69cb149ebd 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncError.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncError.js @@ -17,12 +17,23 @@ class StorageSyncError { /** * Create a StorageSyncError. - * @member {string} [code] Error code of the given entry. - * @member {string} [message] Error message of the given entry. - * @member {object} [details] Error details of the given entry. - * @member {string} [details.code] Error code of the given entry. - * @member {string} [details.message] Error message of the given entry. - * @member {string} [details.target] Target of the given entry. + * @member {object} [error] Error details of the given entry. + * @member {string} [error.code] Error code of the given entry. + * @member {string} [error.message] Error message of the given entry. + * @member {string} [error.target] Target of the given error entry. + * @member {object} [error.details] Error details of the given entry. + * @member {string} [error.details.code] Error code of the given entry. + * @member {string} [error.details.message] Error message of the given entry. + * @member {string} [error.details.target] Target of the given entry. + * @member {object} [innererror] Error details of the given entry. + * @member {string} [innererror.code] Error code of the given entry. + * @member {string} [innererror.message] Error message of the given entry. + * @member {string} [innererror.target] Target of the given error entry. + * @member {object} [innererror.details] Error details of the given entry. + * @member {string} [innererror.details.code] Error code of the given entry. + * @member {string} [innererror.details.message] Error message of the given + * entry. + * @member {string} [innererror.details.target] Target of the given entry. */ constructor() { } @@ -41,26 +52,20 @@ class StorageSyncError { name: 'Composite', className: 'StorageSyncError', modelProperties: { - code: { + error: { required: false, - serializedName: 'code', + serializedName: 'error', type: { - name: 'String' - } - }, - message: { - required: false, - serializedName: 'message', - type: { - name: 'String' + name: 'Composite', + className: 'StorageSyncApiError' } }, - details: { + innererror: { required: false, - serializedName: 'details', + serializedName: 'innererror', type: { name: 'Composite', - className: 'StorageSyncErrorDetails' + className: 'StorageSyncApiError' } } } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js b/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js new file mode 100644 index 0000000000..d35819cecf --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The parameters used when creating a storage sync service. + * + */ +class StorageSyncServiceCreateParameters { + /** + * Create a StorageSyncServiceCreateParameters. + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that + * describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater + * than 128 characters and a value with a length no greater than 256 + * characters. + */ + constructor() { + } + + /** + * Defines the metadata of StorageSyncServiceCreateParameters + * + * @returns {object} metadata of StorageSyncServiceCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageSyncServiceCreateParameters', + type: { + name: 'Composite', + className: 'StorageSyncServiceCreateParameters', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = StorageSyncServiceCreateParameters; diff --git a/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js b/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js new file mode 100644 index 0000000000..694015b9f5 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js @@ -0,0 +1,84 @@ +/* + * 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 parameters used when creating a sync group. + * + */ +class SyncGroupCreateParameters { + /** + * Create a SyncGroupCreateParameters. + * @member {string} [location] Required. Gets or sets the location of the + * resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * @member {object} [tags] Gets or sets a list of key value pairs that + * describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater + * than 128 characters and a value with a length no greater than 256 + * characters. + * @member {object} [properties] The parameters used to create the sync group + */ + constructor() { + } + + /** + * Defines the metadata of SyncGroupCreateParameters + * + * @returns {object} metadata of SyncGroupCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'SyncGroupCreateParameters', + type: { + name: 'Composite', + className: 'SyncGroupCreateParameters', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = SyncGroupCreateParameters; diff --git a/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js b/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js index d7e27c4eec..d52c90fa06 100644 --- a/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js +++ b/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js @@ -30,9 +30,17 @@ const WebResource = msRest.WebResource; * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. - * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -43,17 +51,6 @@ const WebResource = msRest.WebResource; * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1088,9 +1085,17 @@ function _postRestore(resourceGroupName, storageSyncServiceName, syncGroupName, * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -1101,17 +1106,6 @@ function _postRestore(resourceGroupName, storageSyncServiceName, syncGroupName, * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1235,7 +1229,7 @@ function _beginCreate(resourceGroupName, storageSyncServiceName, syncGroupName, let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['CloudEndpoint']().mapper(); + let requestModelMapper = new client.models['CloudEndpointCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -2323,9 +2317,17 @@ class CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -2336,17 +2338,6 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2387,9 +2378,17 @@ class CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -2400,17 +2399,6 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3358,9 +3346,17 @@ class CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -3371,17 +3367,6 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3422,9 +3407,17 @@ class CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -3435,17 +3428,6 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/storagesyncManagement/lib/operations/index.d.ts b/lib/services/storagesyncManagement/lib/operations/index.d.ts index 46fc980dd1..d39f996a56 100644 --- a/lib/services/storagesyncManagement/lib/operations/index.d.ts +++ b/lib/services/storagesyncManagement/lib/operations/index.d.ts @@ -217,10 +217,17 @@ export interface StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} parameters.location The geo-location where the resource - * lives + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {object} [options] Optional Parameters. * @@ -233,7 +240,7 @@ export interface StorageSyncServices { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncServiceCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new StorageSyncService. @@ -246,10 +253,17 @@ export interface StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} parameters.location The geo-location where the resource - * lives + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {object} [options] Optional Parameters. * @@ -278,9 +292,9 @@ export interface StorageSyncServices { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncService, callback: ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncService, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncServiceCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncServiceCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, parameters: models.StorageSyncServiceCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -682,7 +696,20 @@ export interface SyncGroups { * * @param {object} parameters Sync Group Body * - * @param {string} [parameters.uniqueId] Unique Id + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * + * @param {object} [parameters.properties] The parameters used to create the + * sync group * * @param {object} [options] Optional Parameters. * @@ -695,7 +722,7 @@ export interface SyncGroups { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroupCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new SyncGroup. @@ -710,7 +737,20 @@ export interface SyncGroups { * * @param {object} parameters Sync Group Body * - * @param {string} [parameters.uniqueId] Unique Id + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * + * @param {object} [parameters.properties] The parameters used to create the + * sync group * * @param {object} [options] Optional Parameters. * @@ -739,9 +779,9 @@ export interface SyncGroups { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroup, callback: ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroupCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroupCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, parameters: models.SyncGroupCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -901,9 +941,17 @@ export interface CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -914,17 +962,6 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -936,7 +973,7 @@ export interface CloudEndpoints { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new CloudEndpoint. @@ -953,9 +990,17 @@ export interface CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -966,17 +1011,6 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1004,9 +1038,9 @@ export interface CloudEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, callback: ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1693,9 +1727,17 @@ export interface CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -1706,17 +1748,6 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1728,7 +1759,7 @@ export interface CloudEndpoints { * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new CloudEndpoint. @@ -1745,9 +1776,17 @@ export interface CloudEndpoints { * * @param {object} parameters Body of Cloud Endpoint resource. * - * @param {string} [parameters.storageAccountKey] Storage Account access key. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} [parameters.storageAccount] Storage Account name. + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id @@ -1758,17 +1797,6 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id * - * @param {string} [parameters.partnershipId] Partnership Id - * - * @param {string} [parameters.friendlyName] Friendly Name - * - * @param {string} [parameters.provisioningState] CloudEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] CloudEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1796,9 +1824,9 @@ export interface CloudEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpoint, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: models.CloudEndpointCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2286,6 +2314,18 @@ export interface ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2298,15 +2338,6 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2318,7 +2349,7 @@ export interface ServerEndpoints { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new ServerEndpoint. @@ -2335,6 +2366,18 @@ export interface ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2347,15 +2390,6 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2383,9 +2417,9 @@ export interface ServerEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, callback: ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2704,6 +2738,12 @@ export interface ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2715,7 +2755,7 @@ export interface ServerEndpoints { * * @reject {Error|ServiceError} - The error object. */ - recallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + recallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Recall a serverendpoint. @@ -2730,6 +2770,12 @@ export interface ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2756,9 +2802,9 @@ export interface ServerEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, callback: ServiceCallback): void; - recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, callback: ServiceCallback): void; + recallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2776,6 +2822,18 @@ export interface ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2788,15 +2846,6 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2808,7 +2857,7 @@ export interface ServerEndpoints { * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new ServerEndpoint. @@ -2825,6 +2874,18 @@ export interface ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2837,15 +2898,6 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2873,9 +2925,9 @@ export interface ServerEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpoint, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.ServerEndpointCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3056,6 +3108,12 @@ export interface ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3067,7 +3125,7 @@ export interface ServerEndpoints { * * @reject {Error|ServiceError} - The error object. */ - beginRecallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRecallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Recall a serverendpoint. @@ -3082,6 +3140,12 @@ export interface ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3108,9 +3172,9 @@ export interface ServerEndpoints { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, callback: ServiceCallback): void; - beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, callback: ServiceCallback): void; + beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3265,20 +3329,26 @@ export interface RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -3287,24 +3357,8 @@ export interface RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3316,7 +3370,7 @@ export interface RegisteredServers { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Add a new registered server. @@ -3331,20 +3385,26 @@ export interface RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -3353,24 +3413,8 @@ export interface RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3398,9 +3442,9 @@ export interface RegisteredServers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, callback: ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3482,20 +3526,26 @@ export interface RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -3504,24 +3554,8 @@ export interface RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3533,7 +3567,7 @@ export interface RegisteredServers { * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Add a new registered server. @@ -3548,20 +3582,26 @@ export interface RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -3570,24 +3610,8 @@ export interface RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3615,9 +3639,9 @@ export interface RegisteredServers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: models.RegisteredServerCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/storagesyncManagement/lib/operations/registeredServers.js b/lib/services/storagesyncManagement/lib/operations/registeredServers.js index dc20961702..3e75357ffd 100644 --- a/lib/services/storagesyncManagement/lib/operations/registeredServers.js +++ b/lib/services/storagesyncManagement/lib/operations/registeredServers.js @@ -382,20 +382,26 @@ function _get(resourceGroupName, storageSyncServiceName, serverId, options, call * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -404,24 +410,8 @@ function _get(resourceGroupName, storageSyncServiceName, serverId, options, call * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -572,20 +562,26 @@ function _deleteMethod(resourceGroupName, storageSyncServiceName, serverId, opti * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -594,24 +590,8 @@ function _deleteMethod(resourceGroupName, storageSyncServiceName, serverId, opti * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -731,7 +711,7 @@ function _beginCreate(resourceGroupName, storageSyncServiceName, serverId, param let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['RegisteredServer']().mapper(); + let requestModelMapper = new client.models['RegisteredServerCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -1173,20 +1153,26 @@ class RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -1195,24 +1181,8 @@ class RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1251,20 +1221,26 @@ class RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -1273,24 +1249,8 @@ class RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1444,20 +1404,26 @@ class RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -1466,24 +1432,8 @@ class RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1522,20 +1472,26 @@ class RegisteredServers { * * @param {object} parameters Body of Registered Server object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverCertificate] Registered Server Certificate * * @param {string} [parameters.agentVersion] Registered Server Agent Version * * @param {string} [parameters.serverOSVersion] Registered Server OS Version * - * @param {number} [parameters.serverManagementtErrorCode] Registered Server - * Management Error Code - * * @param {string} [parameters.lastHeartBeat] Registered Server last heart beat * - * @param {string} [parameters.provisioningState] Registered Server - * Provisioning State - * * @param {string} [parameters.serverRole] Registered Server serverRole * * @param {string} [parameters.clusterId] Registered Server clusterId @@ -1544,24 +1500,8 @@ class RegisteredServers { * * @param {string} [parameters.serverId] Registered Server serverId * - * @param {string} [parameters.storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * - * @param {string} [parameters.lastWorkflowId] Registered Server lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {string} [parameters.discoveryEndpointUri] Resource - * discoveryEndpointUri - * - * @param {string} [parameters.resourceLocation] Resource Location - * - * @param {string} [parameters.serviceLocation] Service Location - * * @param {string} [parameters.friendlyName] Friendly Name * - * @param {string} [parameters.managementEndpointUri] Management Endpoint Uri - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js b/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js index 2b41bfad61..bfd557dcc1 100644 --- a/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js +++ b/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js @@ -30,6 +30,18 @@ const WebResource = msRest.WebResource; * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -42,15 +54,6 @@ const WebResource = msRest.WebResource; * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -666,6 +669,12 @@ function _listBySyncGroup(resourceGroupName, storageSyncServiceName, syncGroupNa * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -683,7 +692,7 @@ function _listBySyncGroup(resourceGroupName, storageSyncServiceName, syncGroupNa * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, callback) { +function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -696,7 +705,7 @@ function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, } // Send request - this.beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, (err, parsedResult, httpRequest, response) => { + this.beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -736,6 +745,18 @@ function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -748,15 +769,6 @@ function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -880,7 +892,7 @@ function _beginCreate(resourceGroupName, storageSyncServiceName, syncGroupName, let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['ServerEndpoint']().mapper(); + let requestModelMapper = new client.models['ServerEndpointCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -1341,6 +1353,12 @@ function _beginDeleteMethod(resourceGroupName, storageSyncServiceName, syncGroup * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1358,7 +1376,7 @@ function _beginDeleteMethod(resourceGroupName, storageSyncServiceName, syncGroup * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, callback) { +function _beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1414,6 +1432,9 @@ function _beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroup if (serverEndpointName === null || serverEndpointName === undefined || typeof serverEndpointName.valueOf() !== 'string') { throw new Error('serverEndpointName 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.'); } @@ -1455,7 +1476,21 @@ function _beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroup } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['RecallActionParameters']().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) { @@ -1531,6 +1566,18 @@ class ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -1543,15 +1590,6 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1592,6 +1630,18 @@ class ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -1604,15 +1654,6 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2084,6 +2125,12 @@ class ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2095,11 +2142,11 @@ class ServerEndpoints { * * @reject {Error} - The error object. */ - recallActionWithHttpOperationResponse(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options) { + recallActionWithHttpOperationResponse(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, (err, result, request, response) => { + self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2122,6 +2169,12 @@ class ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2148,7 +2201,7 @@ class ServerEndpoints { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, optionalCallback) { + recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2157,14 +2210,14 @@ class ServerEndpoints { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, (err, result, request, response) => { + self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, optionalCallback); + return self._recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, optionalCallback); } } @@ -2183,6 +2236,18 @@ class ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2195,15 +2260,6 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2244,6 +2300,18 @@ class ServerEndpoints { * * @param {object} parameters Body of Server Endpoint object. * + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * * @param {string} [parameters.serverLocalPath] Server Local path. * * @param {string} [parameters.cloudTiering] Cloud Tiering. Possible values @@ -2256,15 +2324,6 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * - * @param {string} [parameters.provisioningState] ServerEndpoint Provisioning - * State - * - * @param {string} [parameters.lastWorkflowId] ServerEndpoint lastWorkflowId - * - * @param {string} [parameters.lastOperationName] Resource Last Operation Name - * - * @param {object} [parameters.syncStatus] Sync Health Status - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2544,6 +2603,12 @@ class ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2555,11 +2620,11 @@ class ServerEndpoints { * * @reject {Error} - The error object. */ - beginRecallActionWithHttpOperationResponse(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options) { + beginRecallActionWithHttpOperationResponse(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, (err, result, request, response) => { + self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2582,6 +2647,12 @@ class ServerEndpoints { * * @param {string} serverEndpointName Name of Server Endpoint object. * + * @param {object} parameters Body of Recall Action object. + * + * @param {string} [parameters.pattern] Pattern of the files. + * + * @param {string} [parameters.recallPath] Recall path. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2608,7 +2679,7 @@ class ServerEndpoints { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, optionalCallback) { + beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2617,14 +2688,14 @@ class ServerEndpoints { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, (err, result, request, response) => { + self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, options, optionalCallback); + return self._beginRecallAction(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, options, optionalCallback); } } diff --git a/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js b/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js index 8fdaed8c3c..5c5928460b 100644 --- a/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js +++ b/lib/services/storagesyncManagement/lib/operations/storageSyncServices.js @@ -203,10 +203,17 @@ function _checkNameAvailability(locationName, parameters, options, callback) { * * @param {object} parameters Storage Sync Service resource name. * - * @param {object} [parameters.tags] Resource tags. - * - * @param {string} parameters.location The geo-location where the resource - * lives + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {object} [options] Optional Parameters. * @@ -323,7 +330,7 @@ function _create(resourceGroupName, storageSyncServiceName, parameters, options, let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['StorageSyncService']().mapper(); + let requestModelMapper = new client.models['StorageSyncServiceCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -1353,10 +1360,17 @@ class StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. * - * @param {string} parameters.location The geo-location where the resource - * lives + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {object} [options] Optional Parameters. * @@ -1394,10 +1408,17 @@ class StorageSyncServices { * * @param {object} parameters Storage Sync Service resource name. * - * @param {object} [parameters.tags] Resource tags. - * - * @param {string} parameters.location The geo-location where the resource - * lives + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/storagesyncManagement/lib/operations/syncGroups.js b/lib/services/storagesyncManagement/lib/operations/syncGroups.js index 95834a7a79..0b52f356ef 100644 --- a/lib/services/storagesyncManagement/lib/operations/syncGroups.js +++ b/lib/services/storagesyncManagement/lib/operations/syncGroups.js @@ -201,7 +201,20 @@ function _listByStorageSyncService(resourceGroupName, storageSyncServiceName, op * * @param {object} parameters Sync Group Body * - * @param {string} [parameters.uniqueId] Unique Id + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * + * @param {object} [parameters.properties] The parameters used to create the + * sync group * * @param {object} [options] Optional Parameters. * @@ -322,7 +335,7 @@ function _create(resourceGroupName, storageSyncServiceName, syncGroupName, param let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['SyncGroup']().mapper(); + let requestModelMapper = new client.models['SyncGroupCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -848,7 +861,20 @@ class SyncGroups { * * @param {object} parameters Sync Group Body * - * @param {string} [parameters.uniqueId] Unique Id + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * + * @param {object} [parameters.properties] The parameters used to create the + * sync group * * @param {object} [options] Optional Parameters. * @@ -888,7 +914,20 @@ class SyncGroups { * * @param {object} parameters Sync Group Body * - * @param {string} [parameters.uniqueId] Unique Id + * @param {string} [parameters.location] Required. Gets or sets the location of + * the resource. This will be one of the supported and registered Azure Geo + * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + * resource cannot be changed once it is created, but if an identical geo + * region is specified on update, the request will succeed. + * + * @param {object} [parameters.tags] Gets or sets a list of key value pairs + * that describe the resource. These tags can be used for viewing and grouping + * this resource (across resource groups). A maximum of 15 tags can be provided + * for a resource. Each tag must have a key with a length no greater than 128 + * characters and a value with a length no greater than 256 characters. + * + * @param {object} [parameters.properties] The parameters used to create the + * sync group * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/storagesyncManagement/package.json b/lib/services/storagesyncManagement/package.json index 9e5f196e2c..490015ef30 100644 --- a/lib/services/storagesyncManagement/package.json +++ b/lib/services/storagesyncManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/storageSyncManagementClient.js", "types": "./lib/storageSyncManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/storagesyncManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index 972848d73d..0cde71306c 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -4894,6 +4894,24 @@ export interface NetworkFeatures extends ProxyOnlyResource { readonly hybridConnectionsV2?: HybridConnection[]; } +/** + * @class + * Initializes a new instance of the NetworkTrace class. + * @constructor + * Network trace + * + * @member {string} [path] Local file path for the captured network trace file. + * @member {string} [status] Current status of the network trace operation, + * same as Operation.Status (InProgress/Succeeded/Failed). + * @member {string} [message] Detailed message of a network trace operation, + * e.g. error message in case of failure. + */ +export interface NetworkTrace { + path?: string; + status?: string; + message?: string; +} + /** * @class * Initializes a new instance of the PerfMonSample class. diff --git a/lib/services/websiteManagement2/lib/models/index.js b/lib/services/websiteManagement2/lib/models/index.js index e298b66554..f3212fe94c 100644 --- a/lib/services/websiteManagement2/lib/models/index.js +++ b/lib/services/websiteManagement2/lib/models/index.js @@ -189,6 +189,7 @@ exports.MigrateMySqlRequest = require('./migrateMySqlRequest'); exports.MigrateMySqlStatus = require('./migrateMySqlStatus'); exports.RelayServiceConnectionEntity = require('./relayServiceConnectionEntity'); exports.NetworkFeatures = require('./networkFeatures'); +exports.NetworkTrace = require('./networkTrace'); exports.PerfMonSample = require('./perfMonSample'); exports.PerfMonSet = require('./perfMonSet'); exports.PerfMonResponse = require('./perfMonResponse'); diff --git a/lib/services/websiteManagement2/lib/models/networkTrace.js b/lib/services/websiteManagement2/lib/models/networkTrace.js new file mode 100644 index 0000000000..ffd8d53400 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/networkTrace.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'; + +/** + * Network trace + * + */ +class NetworkTrace { + /** + * Create a NetworkTrace. + * @member {string} [path] Local file path for the captured network trace + * file. + * @member {string} [status] Current status of the network trace operation, + * same as Operation.Status (InProgress/Succeeded/Failed). + * @member {string} [message] Detailed message of a network trace operation, + * e.g. error message in case of failure. + */ + constructor() { + } + + /** + * Defines the metadata of NetworkTrace + * + * @returns {object} metadata of NetworkTrace + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkTrace', + type: { + name: 'Composite', + className: 'NetworkTrace', + modelProperties: { + path: { + required: false, + serializedName: 'path', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NetworkTrace; diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index eb0b5607f8..1bc355742e 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -20072,9 +20072,81 @@ export interface WebApps { /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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. + */ + getNetworkTraceOperationWithHttpOperationResponse(resourceGroupName: string, name: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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 {Object} - 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. + * + * {Object} [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. + */ + getNetworkTraceOperation(resourceGroupName: string, name: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNetworkTraceOperation(resourceGroupName: string, name: string, operationId: string, callback: ServiceCallback): void; + getNetworkTraceOperation(resourceGroupName: string, name: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Start capturing network packets for the site (To be deprecated). + * + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -20103,9 +20175,9 @@ export interface WebApps { startWebSiteNetworkTraceWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Start capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Start capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -20151,6 +20223,86 @@ export interface WebApps { startWebSiteNetworkTrace(resourceGroupName: string, name: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + startWebSiteNetworkTraceOperationWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {Object} [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. + */ + startWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + startWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, callback: ServiceCallback): void; + startWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Stop ongoing capturing network packets for the site. * @@ -20168,11 +20320,11 @@ export interface WebApps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - stopWebSiteNetworkTraceWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWebSiteNetworkTraceWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Stop ongoing capturing network packets for the site. @@ -20196,7 +20348,7 @@ export interface WebApps { * * {Promise} A promise is returned. * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20204,15 +20356,87 @@ export interface WebApps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {String} [result] - The deserialized result object if an error did not occur. + * {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. + */ + stopWebSiteNetworkTrace(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stopWebSiteNetworkTrace(resourceGroupName: string, name: string, callback: ServiceCallback): void; + stopWebSiteNetworkTrace(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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. + */ + getNetworkTracesWithHttpOperationResponse(resourceGroupName: string, name: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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 {Array} - 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. + * + * {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. */ - stopWebSiteNetworkTrace(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stopWebSiteNetworkTrace(resourceGroupName: string, name: string, callback: ServiceCallback): void; - stopWebSiteNetworkTrace(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getNetworkTraces(resourceGroupName: string, name: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNetworkTraces(resourceGroupName: string, name: string, operationId: string, callback: ServiceCallback): void; + getNetworkTraces(resourceGroupName: string, name: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -34283,59 +34507,53 @@ export interface WebApps { /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. - * - * @param {string} slot The name of the slot for this web app. - * - * @param {object} [options] Optional Parameters. + * @param {string} name Name of the app. * - * @param {number} [options.durationInSeconds] The duration to keep capturing - * in seconds. + * @param {string} operationId GUID of the operation. * - * @param {number} [options.maxFrameLength] The maximum frame length in bytes - * (Optional). + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. * - * @param {string} [options.sasUrl] The Blob URL to store capture file. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWebSiteNetworkTraceSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName: string, name: string, operationId: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. - * - * @param {string} slot The name of the slot for this web app. - * - * @param {object} [options] Optional Parameters. + * @param {string} name Name of the app. * - * @param {number} [options.durationInSeconds] The duration to keep capturing - * in seconds. + * @param {string} operationId GUID of the operation. * - * @param {number} [options.maxFrameLength] The maximum frame length in bytes - * (Optional). + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. * - * @param {string} [options.sasUrl] The Blob URL to store capture file. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34347,7 +34565,7 @@ export interface WebApps { * * {Promise} A promise is returned. * - * @resolve {String} - The deserialized result object. + * @resolve {Object} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34355,21 +34573,21 @@ export interface WebApps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {String} [result] - The deserialized result object if an error did not occur. + * {Object} [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. */ - startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; - startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getNetworkTraceOperationSlot(resourceGroupName: string, name: string, operationId: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNetworkTraceOperationSlot(resourceGroupName: string, name: string, operationId: string, slot: string, callback: ServiceCallback): void; + getNetworkTraceOperationSlot(resourceGroupName: string, name: string, operationId: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Stop ongoing capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Stop ongoing capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -34380,21 +34598,29 @@ export interface WebApps { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. */ - stopWebSiteNetworkTraceSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWebSiteNetworkTraceSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Stop ongoing capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Stop ongoing capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -34405,6 +34631,14 @@ export interface WebApps { * * @param {object} [options] Optional Parameters. * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34429,9 +34663,239 @@ export interface WebApps { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; - stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + startWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + startWebSiteNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {Object} [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. + */ + startWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + startWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + startWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Stop ongoing capturing network packets for the site. + * + * Stop ongoing capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @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. + */ + stopWebSiteNetworkTraceSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Stop ongoing capturing network packets for the site. + * + * Stop ongoing capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @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. + */ + stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + stopWebSiteNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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. + */ + getNetworkTracesSlotWithHttpOperationResponse(resourceGroupName: string, name: string, operationId: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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 {Array} - 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. + * + * {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. + */ + getNetworkTracesSlot(resourceGroupName: string, name: string, operationId: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNetworkTracesSlot(resourceGroupName: string, name: string, operationId: string, slot: string, callback: ServiceCallback): void; + getNetworkTracesSlot(resourceGroupName: string, name: string, operationId: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -43239,6 +43703,86 @@ export interface WebApps { beginMigrateMySql(resourceGroupName: string, name: string, migrationRequestEnvelope: models.MigrateMySqlRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + beginStartWebSiteNetworkTraceOperationWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {Object} [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. + */ + beginStartWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + beginStartWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, callback: ServiceCallback): void; + beginStartWebSiteNetworkTraceOperation(resourceGroupName: string, name: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Restores an app from a backup blob in Azure Storage. * @@ -45081,6 +45625,90 @@ export interface WebApps { beginCreateInstanceMSDeployOperationSlot(resourceGroupName: string, name: string, slot: string, instanceId: string, mSDeploy: models.MSDeploy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + beginStartWebSiteNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {Object} [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. + */ + beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, options?: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName: string, name: string, slot: string, options: { durationInSeconds? : number, maxFrameLength? : number, sasUrl? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Restores an app from a backup blob in Azure Storage. * diff --git a/lib/services/websiteManagement2/lib/operations/webApps.js b/lib/services/websiteManagement2/lib/operations/webApps.js index c133ccf4c8..d9aff806fe 100644 --- a/lib/services/websiteManagement2/lib/operations/webApps.js +++ b/lib/services/websiteManagement2/lib/operations/webApps.js @@ -19324,24 +19324,20 @@ function _listNetworkFeatures(resourceGroupName, name, view, options, callback) } /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.durationInSeconds] The duration to keep capturing - * in seconds. + * @param {string} name Name of the app. * - * @param {number} [options.maxFrameLength] The maximum frame length in bytes - * (Optional). + * @param {string} operationId GUID of the operation. * - * @param {string} [options.sasUrl] The Blob URL to store capture file. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19352,13 +19348,13 @@ function _listNetworkFeatures(resourceGroupName, name, view, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {object} [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 _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { +function _getNetworkTraceOperation(resourceGroupName, name, operationId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -19368,9 +19364,6 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; - let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; - let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -19393,14 +19386,8 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { - throw new Error('durationInSeconds must be of type number.'); - } - if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { - throw new Error('maxFrameLength must be of type number.'); - } - if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { - throw new Error('sasUrl must be of type string.'); + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -19417,20 +19404,12 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (durationInSeconds !== null && durationInSeconds !== undefined) { - queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); - } - if (maxFrameLength !== null && maxFrameLength !== undefined) { - queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); - } - if (sasUrl !== null && sasUrl !== undefined) { - queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -19438,7 +19417,7 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -19463,7 +19442,7 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -19503,7 +19482,15 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { required: false, serializedName: 'parsedResponse', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -19515,15 +19502,32 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { 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['Operation']().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); }); } /** - * @summary Stop ongoing capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Stop ongoing capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -19532,6 +19536,14 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19547,7 +19559,7 @@ function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { +function _startWebSiteNetworkTrace(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -19557,6 +19569,9 @@ function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; + let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; + let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -19579,6 +19594,15 @@ function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { + throw new Error('durationInSeconds must be of type number.'); + } + if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { + throw new Error('maxFrameLength must be of type number.'); + } + if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { + throw new Error('sasUrl must be of type string.'); + } 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.'); } @@ -19594,11 +19618,20 @@ function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (durationInSeconds !== null && durationInSeconds !== undefined) { + queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); + } + if (maxFrameLength !== null && maxFrameLength !== undefined) { + queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); + } + if (sasUrl !== null && sasUrl !== undefined) { + queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -19688,17 +19721,109 @@ function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { }); } + /** - * @summary Generates a new publishing password for an app (or deployment slot, - * if specified). + * @summary Start capturing network packets for the site. * - * Generates a new publishing password for an app (or deployment slot, if - * specified). + * Start capturing network packets for the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + * + * {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 _startWebSiteNetworkTraceOperation(resourceGroupName, name, 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.beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Object' + } + }; + 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); + }); + }); +} + +/** + * @summary Stop ongoing capturing network packets for the site. + * + * Stop ongoing capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. * * @param {object} [options] Optional Parameters. * @@ -19717,7 +19842,7 @@ function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateNewSitePublishingPassword(resourceGroupName, name, options, callback) { +function _stopWebSiteNetworkTrace(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -19764,7 +19889,7 @@ function _generateNewSitePublishingPassword(resourceGroupName, name, options, ca // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -19835,21 +19960,20 @@ function _generateNewSitePublishingPassword(resourceGroupName, name, options, ca } /** - * @summary Gets perfmon counters for web app. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Gets perfmon counters for web app. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. + * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {string} operationId GUID of the operation. * - * @param {string} [options.filter] Return only usages/metrics specified in the - * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - * duration'[Hour|Minute|Day]'. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19860,15 +19984,13 @@ function _generateNewSitePublishingPassword(resourceGroupName, name, 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 PerfMonCounterCollection} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listPerfMonCounters(resourceGroupName, name, options, callback) { +function _getNetworkTraces(resourceGroupName, name, operationId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -19878,7 +20000,6 @@ function _listPerfMonCounters(resourceGroupName, name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let filter = (options && options.filter !== undefined) ? options.filter : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -19901,8 +20022,8 @@ function _listPerfMonCounters(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { - throw new Error('filter must be of type string.'); + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -19919,14 +20040,12 @@ function _listPerfMonCounters(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (filter !== null && filter !== undefined) { - queryParameters.push('$filter=' + filter); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -19995,7 +20114,21 @@ function _listPerfMonCounters(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PerfMonCounterCollection']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -20011,14 +20144,16 @@ function _listPerfMonCounters(resourceGroupName, name, options, callback) { } /** - * @summary Gets web app's event logs. + * @summary Generates a new publishing password for an app (or deployment slot, + * if specified). * - * Gets web app's event logs. + * Generates a new publishing password for an app (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. + * @param {string} name Name of the app. * * @param {object} [options] Optional Parameters. * @@ -20031,14 +20166,13 @@ function _listPerfMonCounters(resourceGroupName, name, 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 SitePhpErrorLogFlag} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { +function _generateNewSitePublishingPassword(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20085,7 +20219,7 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -20097,7 +20231,7 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -20122,7 +20256,7 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -20132,13 +20266,12 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -20151,40 +20284,28 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, 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['SitePhpErrorLogFlag']().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); }); } /** - * @summary Gets the premier add-ons of an app. + * @summary Gets perfmon counters for web app. * - * Gets the premier add-ons of an app. + * Gets perfmon counters for web app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Name of web app. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Return only usages/metrics specified in the + * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -20195,13 +20316,14 @@ function _getSitePhpErrorLogFlag(resourceGroupName, name, 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 PremierAddOn} for more information. + * See {@link PerfMonCounterCollection} 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 _listPremierAddOns(resourceGroupName, name, options, callback) { +function _listPerfMonCounters(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20211,6 +20333,7 @@ function _listPremierAddOns(resourceGroupName, name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -20233,6 +20356,9 @@ function _listPremierAddOns(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } 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.'); } @@ -20248,11 +20374,14 @@ function _listPremierAddOns(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + filter); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -20321,7 +20450,7 @@ function _listPremierAddOns(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PremierAddOn']().mapper(); + let resultMapper = new client.models['PerfMonCounterCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -20337,16 +20466,14 @@ function _listPremierAddOns(resourceGroupName, name, options, callback) { } /** - * @summary Gets a named add-on of an app. + * @summary Gets web app's event logs. * - * Gets a named add-on of an app. + * Gets web app's event logs. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. - * - * @param {string} premierAddOnName Add-on name. + * @param {string} name Name of web app. * * @param {object} [options] Optional Parameters. * @@ -20360,13 +20487,13 @@ function _listPremierAddOns(resourceGroupName, name, 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 PremierAddOn} for more information. + * See {@link SitePhpErrorLogFlag} 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 _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, callback) { +function _getSitePhpErrorLogFlag(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20398,9 +20525,6 @@ function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, ca if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { - throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); - } 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.'); } @@ -20416,10 +20540,9 @@ function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, ca // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -20490,7 +20613,7 @@ function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, ca parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PremierAddOn']().mapper(); + let resultMapper = new client.models['SitePhpErrorLogFlag']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -20506,38 +20629,15 @@ function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, ca } /** - * @summary Updates a named add-on of an app. + * @summary Gets the premier add-ons of an app. * - * Updates a named add-on of an app. + * Gets the premier add-ons of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {string} premierAddOnName Add-on name. - * - * @param {object} premierAddOn A JSON representation of the edited premier - * add-on. - * - * @param {string} [premierAddOn.sku] Premier add on SKU. - * - * @param {string} [premierAddOn.product] Premier add on Product. - * - * @param {string} [premierAddOn.vendor] Premier add on Vendor. - * - * @param {string} [premierAddOn.marketplacePublisher] Premier add on - * Marketplace publisher. - * - * @param {string} [premierAddOn.marketplaceOffer] Premier add on Marketplace - * offer. - * - * @param {string} [premierAddOn.kind] Kind of resource. - * - * @param {string} premierAddOn.location Resource Location. - * - * @param {object} [premierAddOn.tags] Resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -20556,7 +20656,7 @@ function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddOn, options, callback) { +function _listPremierAddOns(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20588,12 +20688,6 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { - throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); - } - if (premierAddOn === null || premierAddOn === undefined) { - throw new Error('premierAddOn cannot be null or undefined.'); - } 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.'); } @@ -20609,10 +20703,9 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -20622,7 +20715,7 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -20640,21 +20733,7 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (premierAddOn !== null && premierAddOn !== undefined) { - let requestModelMapper = new client.models['PremierAddOn']().mapper(); - requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(premierAddOn, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -20713,9 +20792,9 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO } /** - * @summary Delete a premier add-on from an app. + * @summary Gets a named add-on of an app. * - * Delete a premier add-on from an app. + * Gets a named add-on of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -20735,13 +20814,14 @@ function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddO * * {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 PremierAddOn} 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 _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, callback) { +function _getPremierAddOn(resourceGroupName, name, premierAddOnName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20804,7 +20884,7 @@ function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -20839,12 +20919,13 @@ function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -20857,6 +20938,23 @@ function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, 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['PremierAddOn']().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); }); @@ -20891,6 +20989,10 @@ function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, * * @param {string} [premierAddOn.kind] Kind of resource. * + * @param {string} premierAddOn.location Resource Location. + * + * @param {object} [premierAddOn.tags] Resource tags. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -20909,7 +21011,7 @@ function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierAddOn, options, callback) { +function _addPremierAddOn(resourceGroupName, name, premierAddOnName, premierAddOn, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -20975,7 +21077,7 @@ function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierA // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -20998,7 +21100,7 @@ function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierA let requestModel = null; try { if (premierAddOn !== null && premierAddOn !== undefined) { - let requestModelMapper = new client.models['PremierAddOnPatchResource']().mapper(); + let requestModelMapper = new client.models['PremierAddOn']().mapper(); requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); requestContent = JSON.stringify(requestModel); } @@ -21066,16 +21168,16 @@ function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierA } /** - * @summary Gets data around private site access enablement and authorized - * Virtual Networks that can access the site. + * @summary Delete a premier add-on from an app. * - * Gets data around private site access enablement and authorized Virtual - * Networks that can access the site. + * Delete a premier add-on from an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. + * @param {string} name Name of the app. + * + * @param {string} premierAddOnName Add-on name. * * @param {object} [options] Optional Parameters. * @@ -21088,14 +21190,13 @@ function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierA * * {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 PrivateAccess} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPrivateAccess(resourceGroupName, name, options, callback) { +function _deletePremierAddOn(resourceGroupName, name, premierAddOnName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21127,6 +21228,9 @@ function _getPrivateAccess(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { + throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); + } 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.'); } @@ -21142,9 +21246,10 @@ function _getPrivateAccess(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -21154,7 +21259,7 @@ function _getPrivateAccess(resourceGroupName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -21189,13 +21294,12 @@ function _getPrivateAccess(resourceGroupName, name, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -21208,48 +21312,39 @@ function _getPrivateAccess(resourceGroupName, name, 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['PrivateAccess']().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); }); } /** - * @summary Sets data around private site access enablement and authorized - * Virtual Networks that can access the site. + * @summary Updates a named add-on of an app. * - * Sets data around private site access enablement and authorized Virtual - * Networks that can access the site. + * Updates a named add-on of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. + * @param {string} name Name of the app. * - * @param {object} access The information for the private access + * @param {string} premierAddOnName Add-on name. * - * @param {boolean} [access.enabled] Whether private access is enabled or not. + * @param {object} premierAddOn A JSON representation of the edited premier + * add-on. * - * @param {array} [access.virtualNetworks] The Virtual Networks (and subnets) - * allowed to access the site privately. + * @param {string} [premierAddOn.sku] Premier add on SKU. * - * @param {string} [access.kind] Kind of resource. + * @param {string} [premierAddOn.product] Premier add on Product. + * + * @param {string} [premierAddOn.vendor] Premier add on Vendor. + * + * @param {string} [premierAddOn.marketplacePublisher] Premier add on + * Marketplace publisher. + * + * @param {string} [premierAddOn.marketplaceOffer] Premier add on Marketplace + * offer. + * + * @param {string} [premierAddOn.kind] Kind of resource. * * @param {object} [options] Optional Parameters. * @@ -21263,13 +21358,13 @@ function _getPrivateAccess(resourceGroupName, name, 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 PrivateAccess} for more information. + * See {@link PremierAddOn} 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 _putPrivateAccessVnet(resourceGroupName, name, access, options, callback) { +function _updatePremierAddOn(resourceGroupName, name, premierAddOnName, premierAddOn, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21301,8 +21396,11 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (access === null || access === undefined) { - throw new Error('access cannot be null or undefined.'); + if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { + throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); + } + if (premierAddOn === null || premierAddOn === undefined) { + throw new Error('premierAddOn cannot be null or undefined.'); } 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.'); @@ -21319,9 +21417,10 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -21331,7 +21430,7 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -21353,14 +21452,14 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac let requestContent = null; let requestModel = null; try { - if (access !== null && access !== undefined) { - let requestModelMapper = new client.models['PrivateAccess']().mapper(); - requestModel = client.serialize(requestModelMapper, access, 'access'); + if (premierAddOn !== null && premierAddOn !== undefined) { + let requestModelMapper = new client.models['PremierAddOnPatchResource']().mapper(); + requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(access, null, 2)}.`); + `payload - ${JSON.stringify(premierAddOn, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -21406,7 +21505,7 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PrivateAccess']().mapper(); + let resultMapper = new client.models['PremierAddOn']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -21422,16 +21521,16 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, options, callbac } /** - * @summary Get list of processes for a web site, or a deployment slot, or for - * a specific scaled-out instance in a web site. + * @summary Gets data around private site access enablement and authorized + * Virtual Networks that can access the site. * - * Get list of processes for a web site, or a deployment slot, or for a - * specific scaled-out instance in a web site. + * Gets data around private site access enablement and authorized Virtual + * Networks that can access the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Site name. + * @param {string} name The name of the web app. * * @param {object} [options] Optional Parameters. * @@ -21445,13 +21544,13 @@ function _putPrivateAccessVnet(resourceGroupName, name, access, 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 ProcessInfoCollection} for more information. + * See {@link PrivateAccess} 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 _listProcesses(resourceGroupName, name, options, callback) { +function _getPrivateAccess(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21498,7 +21597,7 @@ function _listProcesses(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -21535,7 +21634,7 @@ function _listProcesses(resourceGroupName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 404) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -21545,12 +21644,13 @@ function _listProcesses(resourceGroupName, name, options, callback) { 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -21570,7 +21670,7 @@ function _listProcesses(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessInfoCollection']().mapper(); + let resultMapper = new client.models['PrivateAccess']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -21586,18 +21686,25 @@ function _listProcesses(resourceGroupName, name, options, callback) { } /** - * @summary Get process information by its ID for a specific scaled-out - * instance in a web site. + * @summary Sets data around private site access enablement and authorized + * Virtual Networks that can access the site. * - * Get process information by its ID for a specific scaled-out instance in a - * web site. + * Sets data around private site access enablement and authorized Virtual + * Networks that can access the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Site name. + * @param {string} name The name of the web app. * - * @param {string} processId PID. + * @param {object} access The information for the private access + * + * @param {boolean} [access.enabled] Whether private access is enabled or not. + * + * @param {array} [access.virtualNetworks] The Virtual Networks (and subnets) + * allowed to access the site privately. + * + * @param {string} [access.kind] Kind of resource. * * @param {object} [options] Optional Parameters. * @@ -21611,13 +21718,13 @@ function _listProcesses(resourceGroupName, name, 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 ProcessInfo} for more information. + * See {@link PrivateAccess} 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 _getProcess(resourceGroupName, name, processId, options, callback) { +function _putPrivateAccessVnet(resourceGroupName, name, access, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21649,8 +21756,8 @@ function _getProcess(resourceGroupName, name, processId, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { - throw new Error('processId cannot be null or undefined and it must be of type string.'); + if (access === null || access === undefined) { + throw new Error('access cannot be null or undefined.'); } 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.'); @@ -21667,10 +21774,188 @@ function _getProcess(resourceGroupName, name, processId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (access !== null && access !== undefined) { + let requestModelMapper = new client.models['PrivateAccess']().mapper(); + requestModel = client.serialize(requestModelMapper, access, 'access'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(access, 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 !== 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) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().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['PrivateAccess']().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); + }); +} + +/** + * @summary Get list of processes for a web site, or a deployment slot, or for + * a specific scaled-out instance in a web site. + * + * Get list of processes for a web site, or a deployment slot, or for a + * specific scaled-out instance in a web site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Site name. + * + * @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 ProcessInfoCollection} 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 _listProcesses(resourceGroupName, name, 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 (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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/processes'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -21740,7 +22025,7 @@ function _getProcess(resourceGroupName, name, processId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessInfo']().mapper(); + let resultMapper = new client.models['ProcessInfoCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -21756,11 +22041,11 @@ function _getProcess(resourceGroupName, name, processId, options, callback) { } /** - * @summary Terminate a process by its ID for a web site, or a deployment slot, - * or specific scaled-out instance in a web site. + * @summary Get process information by its ID for a specific scaled-out + * instance in a web site. * - * Terminate a process by its ID for a web site, or a deployment slot, or - * specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a + * web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -21780,13 +22065,14 @@ function _getProcess(resourceGroupName, name, processId, 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 ProcessInfo} 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 _deleteProcess(resourceGroupName, name, processId, options, callback) { +function _getProcess(resourceGroupName, name, processId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21849,7 +22135,7 @@ function _deleteProcess(resourceGroupName, name, processId, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -21874,7 +22160,7 @@ function _deleteProcess(resourceGroupName, name, processId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 404) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -21902,17 +22188,34 @@ function _deleteProcess(resourceGroupName, name, processId, 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['ProcessInfo']().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); }); } /** - * @summary Get a memory dump of a process by its ID for a specific scaled-out - * instance in a web site. + * @summary Terminate a process by its ID for a web site, or a deployment slot, + * or specific scaled-out instance in a web site. * - * Get a memory dump of a process by its ID for a specific scaled-out instance - * in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or + * specific scaled-out instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -21932,13 +22235,13 @@ function _deleteProcess(resourceGroupName, name, processId, 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. + * {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 _getProcessDump(resourceGroupName, name, processId, options, callback) { +function _deleteProcess(resourceGroupName, name, processId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -21988,7 +22291,7 @@ function _getProcessDump(resourceGroupName, name, processId, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); @@ -22001,7 +22304,7 @@ function _getProcessDump(resourceGroupName, name, processId, options, callback) // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -22021,22 +22324,20 @@ function _getProcessDump(resourceGroupName, name, processId, options, callback) } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 404) { - let error = new Error(`Unexpected status code: ${statusCode}`); + if (statusCode !== 204 && statusCode !== 404) { + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; @@ -22053,20 +22354,21 @@ function _getProcessDump(resourceGroupName, name, processId, options, callback) } return callback(error); } - // Create Result - let result = response; + let result = null; + if (responseBody === '') responseBody = null; + return callback(null, result, httpRequest, response); }); } /** - * @summary List module information for a process by its ID for a specific - * scaled-out instance in a web site. - * - * List module information for a process by its ID for a specific scaled-out + * @summary Get a memory dump of a process by its ID for a specific scaled-out * instance in a web site. * + * Get a memory dump of a process by its ID for a specific scaled-out instance + * in a web site. + * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * @@ -22086,14 +22388,12 @@ function _getProcessDump(resourceGroupName, name, processId, 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 ProcessModuleInfoCollection} 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 _listProcessModules(resourceGroupName, name, processId, options, callback) { +function _getProcessDump(resourceGroupName, name, processId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22143,7 +22443,7 @@ function _listProcessModules(resourceGroupName, name, processId, options, callba // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); @@ -22176,20 +22476,22 @@ function _listProcessModules(resourceGroupName, name, processId, options, callba } httpRequest.body = null; // Send Request + httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } + let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 404) { - let error = new Error(responseBody); + let error = new Error(`Unexpected status code: ${statusCode}`); 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 (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; @@ -22206,37 +22508,19 @@ function _listProcessModules(resourceGroupName, name, processId, options, callba } 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['ProcessModuleInfoCollection']().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); - } - } + // Create Result + let result = response; return callback(null, result, httpRequest, response); }); } /** - * @summary Get process information by its ID for a specific scaled-out - * instance in a web site. + * @summary List module information for a process by its ID for a specific + * scaled-out instance in a web site. * - * Get process information by its ID for a specific scaled-out instance in a - * web site. + * List module information for a process by its ID for a specific scaled-out + * instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -22245,8 +22529,6 @@ function _listProcessModules(resourceGroupName, name, processId, options, callba * * @param {string} processId PID. * - * @param {string} baseAddress Module base address. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -22259,13 +22541,14 @@ function _listProcessModules(resourceGroupName, name, processId, 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 ProcessModuleInfo} for more information. + * See {@link ProcessModuleInfoCollection} 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 _getProcessModule(resourceGroupName, name, processId, baseAddress, options, callback) { +function _listProcessModules(resourceGroupName, name, processId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22300,9 +22583,6 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, opti if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { throw new Error('processId cannot be null or undefined and it must be of type string.'); } - if (baseAddress === null || baseAddress === undefined || typeof baseAddress.valueOf() !== 'string') { - throw new Error('baseAddress cannot be null or undefined and it must be of type string.'); - } 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.'); } @@ -22318,11 +22598,10 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, opti // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); - requestUrl = requestUrl.replace('{baseAddress}', encodeURIComponent(baseAddress)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -22392,7 +22671,7 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, opti parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessModuleInfo']().mapper(); + let resultMapper = new client.models['ProcessModuleInfoCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -22408,11 +22687,11 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, opti } /** - * @summary List the threads in a process by its ID for a specific scaled-out + * @summary Get process information by its ID for a specific scaled-out * instance in a web site. * - * List the threads in a process by its ID for a specific scaled-out instance - * in a web site. + * Get process information by its ID for a specific scaled-out instance in a + * web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -22421,6 +22700,8 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, opti * * @param {string} processId PID. * + * @param {string} baseAddress Module base address. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -22433,14 +22714,13 @@ function _getProcessModule(resourceGroupName, name, processId, baseAddress, 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 ProcessThreadInfoCollection} for more - * information. + * See {@link ProcessModuleInfo} 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 _listProcessThreads(resourceGroupName, name, processId, options, callback) { +function _getProcessModule(resourceGroupName, name, processId, baseAddress, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22475,6 +22755,9 @@ function _listProcessThreads(resourceGroupName, name, processId, options, callba if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { throw new Error('processId cannot be null or undefined and it must be of type string.'); } + if (baseAddress === null || baseAddress === undefined || typeof baseAddress.valueOf() !== 'string') { + throw new Error('baseAddress cannot be null or undefined and it must be of type string.'); + } 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.'); } @@ -22490,10 +22773,11 @@ function _listProcessThreads(resourceGroupName, name, processId, options, callba // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); + requestUrl = requestUrl.replace('{baseAddress}', encodeURIComponent(baseAddress)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -22563,7 +22847,7 @@ function _listProcessThreads(resourceGroupName, name, processId, options, callba parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessThreadInfoCollection']().mapper(); + let resultMapper = new client.models['ProcessModuleInfo']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -22579,11 +22863,11 @@ function _listProcessThreads(resourceGroupName, name, processId, options, callba } /** - * @summary Get thread information by Thread ID for a specific process, in a - * specific scaled-out instance in a web site. + * @summary List the threads in a process by its ID for a specific scaled-out + * instance in a web site. * - * Get thread information by Thread ID for a specific process, in a specific - * scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance + * in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -22592,8 +22876,6 @@ function _listProcessThreads(resourceGroupName, name, processId, options, callba * * @param {string} processId PID. * - * @param {string} threadId TID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -22606,13 +22888,14 @@ function _listProcessThreads(resourceGroupName, name, processId, 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 ProcessThreadInfo} for more information. + * See {@link ProcessThreadInfoCollection} 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 _getProcessThread(resourceGroupName, name, processId, threadId, options, callback) { +function _listProcessThreads(resourceGroupName, name, processId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22647,9 +22930,6 @@ function _getProcessThread(resourceGroupName, name, processId, threadId, options if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { throw new Error('processId cannot be null or undefined and it must be of type string.'); } - if (threadId === null || threadId === undefined || typeof threadId.valueOf() !== 'string') { - throw new Error('threadId cannot be null or undefined and it must be of type string.'); - } 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.'); } @@ -22665,11 +22945,10 @@ function _getProcessThread(resourceGroupName, name, processId, threadId, options // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); - requestUrl = requestUrl.replace('{threadId}', encodeURIComponent(threadId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -22739,7 +23018,7 @@ function _getProcessThread(resourceGroupName, name, processId, threadId, options parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessThreadInfo']().mapper(); + let resultMapper = new client.models['ProcessThreadInfoCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -22755,14 +23034,20 @@ function _getProcessThread(resourceGroupName, name, processId, threadId, options } /** - * @summary Get public certificates for an app or a deployment slot. + * @summary Get thread information by Thread ID for a specific process, in a + * specific scaled-out instance in a web site. * - * Get public certificates for an app or a deployment slot. + * Get thread information by Thread ID for a specific process, in a specific + * scaled-out instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Site name. + * + * @param {string} processId PID. + * + * @param {string} threadId TID. * * @param {object} [options] Optional Parameters. * @@ -22776,14 +23061,13 @@ function _getProcessThread(resourceGroupName, name, processId, threadId, 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 PublicCertificateCollection} for more - * information. + * See {@link ProcessThreadInfo} 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 _listPublicCertificates(resourceGroupName, name, options, callback) { +function _getProcessThread(resourceGroupName, name, processId, threadId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22815,6 +23099,12 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { + throw new Error('processId cannot be null or undefined and it must be of type string.'); + } + if (threadId === null || threadId === undefined || typeof threadId.valueOf() !== 'string') { + throw new Error('threadId cannot be null or undefined and it must be of type string.'); + } 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.'); } @@ -22830,9 +23120,11 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); + requestUrl = requestUrl.replace('{threadId}', encodeURIComponent(threadId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -22867,7 +23159,7 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -22877,13 +23169,12 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -22903,7 +23194,7 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PublicCertificateCollection']().mapper(); + let resultMapper = new client.models['ProcessThreadInfo']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -22919,19 +23210,15 @@ function _listPublicCertificates(resourceGroupName, name, options, callback) { } /** - * @summary Get the named public certificate for an app (or deployment slot, if - * specified). + * @summary Get public certificates for an app or a deployment slot. * - * Get the named public certificate for an app (or deployment slot, if - * specified). + * Get public certificates for an app or a deployment slot. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {string} publicCertificateName Public certificate name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -22944,13 +23231,14 @@ function _listPublicCertificates(resourceGroupName, name, 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 PublicCertificate} for more information. + * See {@link PublicCertificateCollection} 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 _getPublicCertificate(resourceGroupName, name, publicCertificateName, options, callback) { +function _listPublicCertificates(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -22982,9 +23270,6 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { - throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); - } 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.'); } @@ -23000,10 +23285,9 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -23074,7 +23358,7 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PublicCertificate']().mapper(); + let resultMapper = new client.models['PublicCertificateCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -23090,9 +23374,11 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o } /** - * @summary Creates a hostname binding for an app. + * @summary Get the named public certificate for an app (or deployment slot, if + * specified). * - * Creates a hostname binding for an app. + * Get the named public certificate for an app (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -23101,17 +23387,6 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o * * @param {string} publicCertificateName Public certificate name. * - * @param {object} publicCertificate Public certificate details. This is the - * JSON representation of a PublicCertificate object. - * - * @param {buffer} [publicCertificate.blob] Public Certificate byte array - * - * @param {string} [publicCertificate.publicCertificateLocation] Public - * Certificate Location. Possible values include: 'CurrentUserMy', - * 'LocalMachineMy', 'Unknown' - * - * @param {string} [publicCertificate.kind] Kind of resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -23130,7 +23405,7 @@ function _getPublicCertificate(resourceGroupName, name, publicCertificateName, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdatePublicCertificate(resourceGroupName, name, publicCertificateName, publicCertificate, options, callback) { +function _getPublicCertificate(resourceGroupName, name, publicCertificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -23165,9 +23440,6 @@ function _createOrUpdatePublicCertificate(resourceGroupName, name, publicCertifi if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); } - if (publicCertificate === null || publicCertificate === undefined) { - throw new Error('publicCertificate cannot be null or undefined.'); - } 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.'); } @@ -23196,7 +23468,7 @@ function _createOrUpdatePublicCertificate(resourceGroupName, name, publicCertifi // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23214,21 +23486,204 @@ function _createOrUpdatePublicCertificate(resourceGroupName, name, publicCertifi } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (publicCertificate !== null && publicCertificate !== undefined) { - let requestModelMapper = new client.models['PublicCertificate']().mapper(); - requestModel = client.serialize(requestModelMapper, publicCertificate, 'publicCertificate'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(publicCertificate, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + 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) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().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['PublicCertificate']().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); + }); +} + +/** + * @summary Creates a hostname binding for an app. + * + * Creates a hostname binding for an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} publicCertificateName Public certificate name. + * + * @param {object} publicCertificate Public certificate details. This is the + * JSON representation of a PublicCertificate object. + * + * @param {buffer} [publicCertificate.blob] Public Certificate byte array + * + * @param {string} [publicCertificate.publicCertificateLocation] Public + * Certificate Location. Possible values include: 'CurrentUserMy', + * 'LocalMachineMy', 'Unknown' + * + * @param {string} [publicCertificate.kind] Kind of resource. + * + * @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 PublicCertificate} 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 _createOrUpdatePublicCertificate(resourceGroupName, name, publicCertificateName, publicCertificate, 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 (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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { + throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); + } + if (publicCertificate === null || publicCertificate === undefined) { + throw new Error('publicCertificate cannot be null or undefined.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/publicCertificates/{publicCertificateName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (publicCertificate !== null && publicCertificate !== undefined) { + let requestModelMapper = new client.models['PublicCertificate']().mapper(); + requestModel = client.serialize(requestModelMapper, publicCertificate, 'publicCertificate'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(publicCertificate, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -44079,26 +44534,23 @@ function _listNetworkFeaturesSlot(resourceGroupName, name, view, slot, options, } /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. - * - * @param {string} slot The name of the slot for this web app. - * - * @param {object} [options] Optional Parameters. + * @param {string} name Name of the app. * - * @param {number} [options.durationInSeconds] The duration to keep capturing - * in seconds. + * @param {string} operationId GUID of the operation. * - * @param {number} [options.maxFrameLength] The maximum frame length in bytes - * (Optional). + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. * - * @param {string} [options.sasUrl] The Blob URL to store capture file. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44109,13 +44561,13 @@ function _listNetworkFeaturesSlot(resourceGroupName, name, view, slot, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {object} [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 _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, callback) { +function _getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -44125,9 +44577,6 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; - let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; - let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -44150,18 +44599,12 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { - throw new Error('durationInSeconds must be of type number.'); + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { - throw new Error('maxFrameLength must be of type number.'); - } - if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { - throw new Error('sasUrl must be of type string.'); - } 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.'); } @@ -44177,21 +44620,13 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (durationInSeconds !== null && durationInSeconds !== undefined) { - queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); - } - if (maxFrameLength !== null && maxFrameLength !== undefined) { - queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); - } - if (sasUrl !== null && sasUrl !== undefined) { - queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -44199,7 +44634,7 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -44224,7 +44659,7 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -44264,7 +44699,15 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c required: false, serializedName: 'parsedResponse', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -44276,15 +44719,32 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c 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['Operation']().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); }); } /** - * @summary Stop ongoing capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Stop ongoing capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -44295,6 +44755,14 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c * * @param {object} [options] Optional Parameters. * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -44310,7 +44778,7 @@ function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, callback) { +function _startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -44320,6 +44788,9 @@ function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, ca if (!callback) { throw new Error('callback cannot be null.'); } + let durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; + let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; + let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -44342,9 +44813,18 @@ function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, ca if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { + throw new Error('durationInSeconds must be of type number.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } + if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { + throw new Error('maxFrameLength must be of type number.'); + } + if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { + throw new Error('sasUrl must be of type string.'); + } 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.'); } @@ -44360,12 +44840,21 @@ function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, ca // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (durationInSeconds !== null && durationInSeconds !== undefined) { + queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); + } + if (maxFrameLength !== null && maxFrameLength !== undefined) { + queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); + } + if (sasUrl !== null && sasUrl !== undefined) { + queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -44455,21 +44944,113 @@ function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, ca }); } + /** - * @summary Generates a new publishing password for an app (or deployment slot, - * if specified). + * @summary Start capturing network packets for the site. * - * Generates a new publishing password for an app (or deployment slot, if - * specified). + * Start capturing network packets for the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name The name of the web app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API generate a new publishing password for the production - * slot. + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + * + * {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 _startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, 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.beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Object' + } + }; + 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); + }); + }); +} + +/** + * @summary Stop ongoing capturing network packets for the site. + * + * Stop ongoing capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. * * @param {object} [options] Optional Parameters. * @@ -44488,7 +45069,7 @@ function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, options, callback) { +function _stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -44538,7 +45119,7 @@ function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, o // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -44610,24 +45191,23 @@ function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, o } /** - * @summary Gets perfmon counters for web app. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Gets perfmon counters for web app. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. + * @param {string} name Name of the app. * - * @param {string} slot Name of web app slot. If not specified then will - * default to production slot. + * @param {string} operationId GUID of the operation. * - * @param {object} [options] Optional Parameters. + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. * - * @param {string} [options.filter] Return only usages/metrics specified in the - * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - * duration'[Hour|Minute|Day]'. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44638,15 +45218,13 @@ function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, 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 PerfMonCounterCollection} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callback) { +function _getNetworkTracesSlot(resourceGroupName, name, operationId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -44656,7 +45234,6 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let filter = (options && options.filter !== undefined) ? options.filter : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -44679,12 +45256,12 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callba if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { - throw new Error('filter must be of type string.'); - } 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.'); } @@ -44700,15 +45277,13 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callba // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (filter !== null && filter !== undefined) { - queryParameters.push('$filter=' + filter); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -44777,7 +45352,21 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callba parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PerfMonCounterCollection']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -44793,17 +45382,20 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callba } /** - * @summary Gets web app's event logs. + * @summary Generates a new publishing password for an app (or deployment slot, + * if specified). * - * Gets web app's event logs. + * Generates a new publishing password for an app (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. + * @param {string} name Name of the app. * - * @param {string} slot Name of web app slot. If not specified then will - * default to production slot. + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API generate a new publishing password for the production + * slot. * * @param {object} [options] Optional Parameters. * @@ -44816,14 +45408,13 @@ function _listPerfMonCountersSlot(resourceGroupName, name, slot, 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 SitePhpErrorLogFlag} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, callback) { +function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -44873,7 +45464,7 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -44886,7 +45477,7 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, cal // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -44911,7 +45502,7 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, cal return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -44921,13 +45512,12 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, cal try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -44940,43 +45530,31 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, 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['SitePhpErrorLogFlag']().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); }); } /** - * @summary Gets the premier add-ons of an app. + * @summary Gets perfmon counters for web app. * - * Gets the premier add-ons of an app. + * Gets perfmon counters for web app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Name of web app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the premier add-ons for the production slot. + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Return only usages/metrics specified in the + * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -44987,13 +45565,14 @@ function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, 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 PremierAddOn} for more information. + * See {@link PerfMonCounterCollection} 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 _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback) { +function _listPerfMonCountersSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45003,6 +45582,7 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -45028,6 +45608,9 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } 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.'); } @@ -45043,12 +45626,15 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + filter); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -45117,7 +45703,7 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PremierAddOn']().mapper(); + let resultMapper = new client.models['PerfMonCounterCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -45133,19 +45719,17 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback } /** - * @summary Gets a named add-on of an app. + * @summary Gets web app's event logs. * - * Gets a named add-on of an app. + * Gets web app's event logs. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. - * - * @param {string} premierAddOnName Add-on name. + * @param {string} name Name of web app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the named add-on for the production slot. + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. * * @param {object} [options] Optional Parameters. * @@ -45159,13 +45743,13 @@ function _listPremierAddOnsSlot(resourceGroupName, name, slot, 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 PremierAddOn} for more information. + * See {@link SitePhpErrorLogFlag} 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 _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, options, callback) { +function _getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45197,9 +45781,6 @@ function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, o if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { - throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -45218,10 +45799,9 @@ function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, o // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -45293,7 +45873,7 @@ function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, o parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PremierAddOn']().mapper(); + let resultMapper = new client.models['SitePhpErrorLogFlag']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -45309,40 +45889,17 @@ function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, o } /** - * @summary Updates a named add-on of an app. + * @summary Gets the premier add-ons of an app. * - * Updates a named add-on of an app. + * Gets the premier add-ons of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {string} premierAddOnName Add-on name. - * - * @param {object} premierAddOn A JSON representation of the edited premier - * add-on. - * - * @param {string} [premierAddOn.sku] Premier add on SKU. - * - * @param {string} [premierAddOn.product] Premier add on Product. - * - * @param {string} [premierAddOn.vendor] Premier add on Vendor. - * - * @param {string} [premierAddOn.marketplacePublisher] Premier add on - * Marketplace publisher. - * - * @param {string} [premierAddOn.marketplaceOffer] Premier add on Marketplace - * offer. - * - * @param {string} [premierAddOn.kind] Kind of resource. - * - * @param {string} premierAddOn.location Resource Location. - * - * @param {object} [premierAddOn.tags] Resource tags. - * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will update the named add-on for the production slot. + * specified, the API will get the premier add-ons for the production slot. * * @param {object} [options] Optional Parameters. * @@ -45362,7 +45919,7 @@ function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premierAddOn, slot, options, callback) { +function _listPremierAddOnsSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45394,12 +45951,6 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { - throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); - } - if (premierAddOn === null || premierAddOn === undefined) { - throw new Error('premierAddOn cannot be null or undefined.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -45418,10 +45969,9 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -45432,7 +45982,7 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -45450,21 +46000,7 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (premierAddOn !== null && premierAddOn !== undefined) { - let requestModelMapper = new client.models['PremierAddOn']().mapper(); - requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(premierAddOn, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -45523,9 +46059,9 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier } /** - * @summary Delete a premier add-on from an app. + * @summary Gets a named add-on of an app. * - * Delete a premier add-on from an app. + * Gets a named add-on of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -45535,7 +46071,7 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier * @param {string} premierAddOnName Add-on name. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will delete the named add-on for the production slot. + * specified, the API will get the named add-on for the production slot. * * @param {object} [options] Optional Parameters. * @@ -45548,13 +46084,14 @@ function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premier * * {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 PremierAddOn} 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 _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, options, callback) { +function _getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45621,7 +46158,7 @@ function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -45656,12 +46193,13 @@ function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -45674,6 +46212,23 @@ function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot // 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['PremierAddOn']().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); }); @@ -45708,6 +46263,10 @@ function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot * * @param {string} [premierAddOn.kind] Kind of resource. * + * @param {string} premierAddOn.location Resource Location. + * + * @param {object} [premierAddOn.tags] Resource tags. + * * @param {string} slot Name of the deployment slot. If a slot is not * specified, the API will update the named add-on for the production slot. * @@ -45729,7 +46288,7 @@ function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, premierAddOn, slot, options, callback) { +function _addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, premierAddOn, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45799,7 +46358,7 @@ function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, prem // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -45822,7 +46381,7 @@ function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, prem let requestModel = null; try { if (premierAddOn !== null && premierAddOn !== undefined) { - let requestModelMapper = new client.models['PremierAddOnPatchResource']().mapper(); + let requestModelMapper = new client.models['PremierAddOn']().mapper(); requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); requestContent = JSON.stringify(requestModel); } @@ -45890,18 +46449,19 @@ function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, prem } /** - * @summary Gets data around private site access enablement and authorized - * Virtual Networks that can access the site. + * @summary Delete a premier add-on from an app. * - * Gets data around private site access enablement and authorized Virtual - * Networks that can access the site. + * Delete a premier add-on from an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. + * @param {string} name Name of the app. * - * @param {string} slot The name of the slot for the web app. + * @param {string} premierAddOnName Add-on name. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will delete the named add-on for the production slot. * * @param {object} [options] Optional Parameters. * @@ -45914,14 +46474,13 @@ function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, prem * * {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 PrivateAccess} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) { +function _deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -45953,6 +46512,9 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { + throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -45971,9 +46533,10 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -45984,7 +46547,7 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -46019,13 +46582,12 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -46038,50 +46600,42 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, 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['PrivateAccess']().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); }); } /** - * @summary Sets data around private site access enablement and authorized - * Virtual Networks that can access the site. + * @summary Updates a named add-on of an app. * - * Sets data around private site access enablement and authorized Virtual - * Networks that can access the site. + * Updates a named add-on of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name The name of the web app. + * @param {string} name Name of the app. * - * @param {object} access The information for the private access + * @param {string} premierAddOnName Add-on name. * - * @param {boolean} [access.enabled] Whether private access is enabled or not. + * @param {object} premierAddOn A JSON representation of the edited premier + * add-on. * - * @param {array} [access.virtualNetworks] The Virtual Networks (and subnets) - * allowed to access the site privately. + * @param {string} [premierAddOn.sku] Premier add on SKU. * - * @param {string} [access.kind] Kind of resource. + * @param {string} [premierAddOn.product] Premier add on Product. * - * @param {string} slot The name of the slot for the web app. + * @param {string} [premierAddOn.vendor] Premier add on Vendor. + * + * @param {string} [premierAddOn.marketplacePublisher] Premier add on + * Marketplace publisher. + * + * @param {string} [premierAddOn.marketplaceOffer] Premier add on Marketplace + * offer. + * + * @param {string} [premierAddOn.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the named add-on for the production slot. * * @param {object} [options] Optional Parameters. * @@ -46095,13 +46649,13 @@ function _getPrivateAccessSlot(resourceGroupName, name, slot, 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 PrivateAccess} for more information. + * See {@link PremierAddOn} 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 _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, options, callback) { +function _updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, premierAddOn, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46133,8 +46687,11 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (access === null || access === undefined) { - throw new Error('access cannot be null or undefined.'); + if (premierAddOnName === null || premierAddOnName === undefined || typeof premierAddOnName.valueOf() !== 'string') { + throw new Error('premierAddOnName cannot be null or undefined and it must be of type string.'); + } + if (premierAddOn === null || premierAddOn === undefined) { + throw new Error('premierAddOn cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -46154,9 +46711,10 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{premierAddOnName}', encodeURIComponent(premierAddOnName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -46167,7 +46725,7 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -46189,14 +46747,14 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option let requestContent = null; let requestModel = null; try { - if (access !== null && access !== undefined) { - let requestModelMapper = new client.models['PrivateAccess']().mapper(); - requestModel = client.serialize(requestModelMapper, access, 'access'); + if (premierAddOn !== null && premierAddOn !== undefined) { + let requestModelMapper = new client.models['PremierAddOnPatchResource']().mapper(); + requestModel = client.serialize(requestModelMapper, premierAddOn, 'premierAddOn'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(access, null, 2)}.`); + `payload - ${JSON.stringify(premierAddOn, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -46242,7 +46800,7 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PrivateAccess']().mapper(); + let resultMapper = new client.models['PremierAddOn']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -46258,19 +46816,18 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, option } /** - * @summary Get list of processes for a web site, or a deployment slot, or for - * a specific scaled-out instance in a web site. + * @summary Gets data around private site access enablement and authorized + * Virtual Networks that can access the site. * - * Get list of processes for a web site, or a deployment slot, or for a - * specific scaled-out instance in a web site. + * Gets data around private site access enablement and authorized Virtual + * Networks that can access the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Site name. + * @param {string} name The name of the web app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API returns deployments for the production slot. + * @param {string} slot The name of the slot for the web app. * * @param {object} [options] Optional Parameters. * @@ -46284,13 +46841,13 @@ function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, 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 ProcessInfoCollection} for more information. + * See {@link PrivateAccess} 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 _listProcessesSlot(resourceGroupName, name, slot, options, callback) { +function _getPrivateAccessSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46340,7 +46897,7 @@ function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -46378,7 +46935,7 @@ function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 404) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -46388,12 +46945,13 @@ function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -46413,7 +46971,7 @@ function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessInfoCollection']().mapper(); + let resultMapper = new client.models['PrivateAccess']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -46429,21 +46987,27 @@ function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { } /** - * @summary Get process information by its ID for a specific scaled-out - * instance in a web site. + * @summary Sets data around private site access enablement and authorized + * Virtual Networks that can access the site. * - * Get process information by its ID for a specific scaled-out instance in a - * web site. + * Sets data around private site access enablement and authorized Virtual + * Networks that can access the site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Site name. + * @param {string} name The name of the web app. * - * @param {string} processId PID. + * @param {object} access The information for the private access * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API returns deployments for the production slot. + * @param {boolean} [access.enabled] Whether private access is enabled or not. + * + * @param {array} [access.virtualNetworks] The Virtual Networks (and subnets) + * allowed to access the site privately. + * + * @param {string} [access.kind] Kind of resource. + * + * @param {string} slot The name of the slot for the web app. * * @param {object} [options] Optional Parameters. * @@ -46457,13 +47021,13 @@ function _listProcessesSlot(resourceGroupName, name, slot, 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 ProcessInfo} for more information. + * See {@link PrivateAccess} 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 _getProcessSlot(resourceGroupName, name, processId, slot, options, callback) { +function _putPrivateAccessVnetSlot(resourceGroupName, name, access, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46495,8 +47059,8 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { - throw new Error('processId cannot be null or undefined and it must be of type string.'); + if (access === null || access === undefined) { + throw new Error('access cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -46516,10 +47080,9 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -46530,7 +47093,7 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -46548,14 +47111,28 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (access !== null && access !== undefined) { + let requestModelMapper = new client.models['PrivateAccess']().mapper(); + requestModel = client.serialize(requestModelMapper, access, 'access'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(access, 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 !== 200 && statusCode !== 404) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -46565,12 +47142,13 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -46590,7 +47168,7 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessInfo']().mapper(); + let resultMapper = new client.models['PrivateAccess']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -46606,10 +47184,10 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call } /** - * @summary Terminate a process by its ID for a web site, or a deployment slot, - * or specific scaled-out instance in a web site. + * @summary Get list of processes for a web site, or a deployment slot, or for + * a specific scaled-out instance in a web site. * - * Terminate a process by its ID for a web site, or a deployment slot, or + * Get list of processes for a web site, or a deployment slot, or for a * specific scaled-out instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the @@ -46617,8 +47195,6 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call * * @param {string} name Site name. * - * @param {string} processId PID. - * * @param {string} slot Name of the deployment slot. If a slot is not * specified, the API returns deployments for the production slot. * @@ -46633,13 +47209,14 @@ function _getProcessSlot(resourceGroupName, name, processId, slot, options, call * * {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 ProcessInfoCollection} 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 _deleteProcessSlot(resourceGroupName, name, processId, slot, options, callback) { +function _listProcessesSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46671,9 +47248,6 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, options, c if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { - throw new Error('processId cannot be null or undefined and it must be of type string.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -46692,10 +47266,9 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, options, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -46706,7 +47279,7 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, options, c // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -46731,7 +47304,7 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, options, c return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 404) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -46759,17 +47332,34 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, 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['ProcessInfoCollection']().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); }); } /** - * @summary Get a memory dump of a process by its ID for a specific scaled-out + * @summary Get process information by its ID for a specific scaled-out * instance in a web site. * - * Get a memory dump of a process by its ID for a specific scaled-out instance - * in a web site. + * Get process information by its ID for a specific scaled-out instance in a + * web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -46793,12 +47383,13 @@ function _deleteProcessSlot(resourceGroupName, name, processId, slot, 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 ProcessInfo} 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 _getProcessDumpSlot(resourceGroupName, name, processId, slot, options, callback) { +function _getProcessSlot(resourceGroupName, name, processId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46851,7 +47442,7 @@ function _getProcessDumpSlot(resourceGroupName, name, processId, slot, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); @@ -46885,22 +47476,20 @@ function _getProcessDumpSlot(resourceGroupName, name, processId, slot, options, } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 404) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; @@ -46917,19 +47506,37 @@ function _getProcessDumpSlot(resourceGroupName, name, processId, slot, options, } return callback(error); } - // Create Result - let result = response; + 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['ProcessInfo']().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); }); } /** - * @summary List module information for a process by its ID for a specific - * scaled-out instance in a web site. + * @summary Terminate a process by its ID for a web site, or a deployment slot, + * or specific scaled-out instance in a web site. * - * List module information for a process by its ID for a specific scaled-out - * instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or + * specific scaled-out instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -46952,15 +47559,13 @@ function _getProcessDumpSlot(resourceGroupName, name, processId, slot, 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 ProcessModuleInfoCollection} 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. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listProcessModulesSlot(resourceGroupName, name, processId, slot, options, callback) { +function _deleteProcessSlot(resourceGroupName, name, processId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47013,7 +47618,7 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); @@ -47027,7 +47632,7 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, optio // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -47052,7 +47657,7 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, optio return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 404) { + if (statusCode !== 204 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -47080,34 +47685,17 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, 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['ProcessModuleInfoCollection']().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); }); } /** - * @summary Get process information by its ID for a specific scaled-out + * @summary Get a memory dump of a process by its ID for a specific scaled-out * instance in a web site. * - * Get process information by its ID for a specific scaled-out instance in a - * web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance + * in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -47116,8 +47704,6 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, optio * * @param {string} processId PID. * - * @param {string} baseAddress Module base address. - * * @param {string} slot Name of the deployment slot. If a slot is not * specified, the API returns deployments for the production slot. * @@ -47133,13 +47719,12 @@ function _listProcessModulesSlot(resourceGroupName, name, processId, slot, 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 ProcessModuleInfo} 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 _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, options, callback) { +function _getProcessDumpSlot(resourceGroupName, name, processId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47174,9 +47759,6 @@ function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { throw new Error('processId cannot be null or undefined and it must be of type string.'); } - if (baseAddress === null || baseAddress === undefined || typeof baseAddress.valueOf() !== 'string') { - throw new Error('baseAddress cannot be null or undefined and it must be of type string.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -47195,11 +47777,10 @@ function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); - requestUrl = requestUrl.replace('{baseAddress}', encodeURIComponent(baseAddress)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -47230,20 +47811,22 @@ function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, } httpRequest.body = null; // Send Request + httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } + let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 404) { - let error = new Error(responseBody); + let error = new Error(`Unexpected status code: ${statusCode}`); 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 (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; @@ -47260,37 +47843,19 @@ function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, } 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['ProcessModuleInfo']().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); - } - } + // Create Result + let result = response; return callback(null, result, httpRequest, response); }); } /** - * @summary List the threads in a process by its ID for a specific scaled-out - * instance in a web site. + * @summary List module information for a process by its ID for a specific + * scaled-out instance in a web site. * - * List the threads in a process by its ID for a specific scaled-out instance - * in a web site. + * List module information for a process by its ID for a specific scaled-out + * instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -47314,14 +47879,14 @@ function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, * {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 ProcessThreadInfoCollection} for more + * See {@link ProcessModuleInfoCollection} 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 _listProcessThreadsSlot(resourceGroupName, name, processId, slot, options, callback) { +function _listProcessModulesSlot(resourceGroupName, name, processId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47374,7 +47939,7 @@ function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); @@ -47448,7 +48013,7 @@ function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, optio parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessThreadInfoCollection']().mapper(); + let resultMapper = new client.models['ProcessModuleInfoCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -47464,11 +48029,11 @@ function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, optio } /** - * @summary Get thread information by Thread ID for a specific process, in a - * specific scaled-out instance in a web site. + * @summary Get process information by its ID for a specific scaled-out + * instance in a web site. * - * Get thread information by Thread ID for a specific process, in a specific - * scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a + * web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -47477,7 +48042,7 @@ function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, optio * * @param {string} processId PID. * - * @param {string} threadId TID. + * @param {string} baseAddress Module base address. * * @param {string} slot Name of the deployment slot. If a slot is not * specified, the API returns deployments for the production slot. @@ -47494,13 +48059,13 @@ function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, 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 ProcessThreadInfo} for more information. + * See {@link ProcessModuleInfo} 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 _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slot, options, callback) { +function _getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47535,8 +48100,8 @@ function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slo if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { throw new Error('processId cannot be null or undefined and it must be of type string.'); } - if (threadId === null || threadId === undefined || typeof threadId.valueOf() !== 'string') { - throw new Error('threadId cannot be null or undefined and it must be of type string.'); + if (baseAddress === null || baseAddress === undefined || typeof baseAddress.valueOf() !== 'string') { + throw new Error('baseAddress cannot be null or undefined and it must be of type string.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -47556,11 +48121,11 @@ function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slo // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); - requestUrl = requestUrl.replace('{threadId}', encodeURIComponent(threadId)); + requestUrl = requestUrl.replace('{baseAddress}', encodeURIComponent(baseAddress)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -47631,7 +48196,7 @@ function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slo parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ProcessThreadInfo']().mapper(); + let resultMapper = new client.models['ProcessModuleInfo']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -47647,17 +48212,21 @@ function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slo } /** - * @summary Get public certificates for an app or a deployment slot. + * @summary List the threads in a process by its ID for a specific scaled-out + * instance in a web site. * - * Get public certificates for an app or a deployment slot. + * List the threads in a process by its ID for a specific scaled-out instance + * in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Site name. + * + * @param {string} processId PID. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API gets hostname bindings for the production slot. + * specified, the API returns deployments for the production slot. * * @param {object} [options] Optional Parameters. * @@ -47671,14 +48240,14 @@ function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slo * {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 PublicCertificateCollection} for more + * See {@link ProcessThreadInfoCollection} 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 _listPublicCertificatesSlot(resourceGroupName, name, slot, options, callback) { +function _listProcessThreadsSlot(resourceGroupName, name, processId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47710,6 +48279,9 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { + throw new Error('processId cannot be null or undefined and it must be of type string.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -47728,9 +48300,10 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -47766,7 +48339,7 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -47776,13 +48349,12 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -47802,7 +48374,7 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PublicCertificateCollection']().mapper(); + let resultMapper = new client.models['ProcessThreadInfoCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -47818,21 +48390,23 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, cal } /** - * @summary Get the named public certificate for an app (or deployment slot, if - * specified). + * @summary Get thread information by Thread ID for a specific process, in a + * specific scaled-out instance in a web site. * - * Get the named public certificate for an app (or deployment slot, if - * specified). + * Get thread information by Thread ID for a specific process, in a specific + * scaled-out instance in a web site. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Site name. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API the named binding for the production slot. + * @param {string} processId PID. * - * @param {string} publicCertificateName Public certificate name. + * @param {string} threadId TID. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API returns deployments for the production slot. * * @param {object} [options] Optional Parameters. * @@ -47846,13 +48420,13 @@ function _listPublicCertificatesSlot(resourceGroupName, name, slot, 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 PublicCertificate} for more information. + * See {@link ProcessThreadInfo} 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 _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, options, callback) { +function _getProcessThreadSlot(resourceGroupName, name, processId, threadId, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -47884,12 +48458,15 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (processId === null || processId === undefined || typeof processId.valueOf() !== 'string') { + throw new Error('processId cannot be null or undefined and it must be of type string.'); + } + if (threadId === null || threadId === undefined || typeof threadId.valueOf() !== 'string') { + throw new Error('threadId cannot be null or undefined and it must be of type string.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { - throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); - } 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.'); } @@ -47905,11 +48482,12 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{processId}', encodeURIComponent(processId)); + requestUrl = requestUrl.replace('{threadId}', encodeURIComponent(threadId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); - requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -47944,7 +48522,7 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -47954,13 +48532,12 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + 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['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -47980,7 +48557,7 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PublicCertificate']().mapper(); + let resultMapper = new client.models['ProcessThreadInfo']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -47996,30 +48573,17 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific } /** - * @summary Creates a hostname binding for an app. + * @summary Get public certificates for an app or a deployment slot. * - * Creates a hostname binding for an app. + * Get public certificates for an app or a deployment slot. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {string} publicCertificateName Public certificate name. - * - * @param {object} publicCertificate Public certificate details. This is the - * JSON representation of a PublicCertificate object. - * - * @param {buffer} [publicCertificate.blob] Public Certificate byte array - * - * @param {string} [publicCertificate.publicCertificateLocation] Public - * Certificate Location. Possible values include: 'CurrentUserMy', - * 'LocalMachineMy', 'Unknown' - * - * @param {string} [publicCertificate.kind] Kind of resource. - * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will create a binding for the production slot. + * specified, the API gets hostname bindings for the production slot. * * @param {object} [options] Optional Parameters. * @@ -48033,13 +48597,14 @@ function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertific * {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 PublicCertificate} for more information. + * See {@link PublicCertificateCollection} 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 _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCertificateName, publicCertificate, slot, options, callback) { +function _listPublicCertificatesSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -48071,12 +48636,6 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { - throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); - } - if (publicCertificate === null || publicCertificate === undefined) { - throw new Error('publicCertificate cannot be null or undefined.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -48095,10 +48654,9 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -48109,7 +48667,7 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -48127,21 +48685,7 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (publicCertificate !== null && publicCertificate !== undefined) { - let requestModelMapper = new client.models['PublicCertificate']().mapper(); - requestModel = client.serialize(requestModelMapper, publicCertificate, 'publicCertificate'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(publicCertificate, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -48184,7 +48728,7 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PublicCertificate']().mapper(); + let resultMapper = new client.models['PublicCertificateCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -48200,9 +48744,11 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer } /** - * @summary Deletes a hostname binding for an app. + * @summary Get the named public certificate for an app (or deployment slot, if + * specified). * - * Deletes a hostname binding for an app. + * Get the named public certificate for an app (or deployment slot, if + * specified). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -48210,7 +48756,7 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer * @param {string} name Name of the app. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will delete the binding for the production slot. + * specified, the API the named binding for the production slot. * * @param {string} publicCertificateName Public certificate name. * @@ -48225,13 +48771,14 @@ function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCer * * {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 PublicCertificate} 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 _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, options, callback) { +function _getPublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -48298,7 +48845,7 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -48323,7 +48870,7 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -48333,12 +48880,13 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -48351,37 +48899,53 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti // 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['PublicCertificate']().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); }); } /** - * @summary Gets the publishing profile for an app (or deployment slot, if - * specified). + * @summary Creates a hostname binding for an app. * - * Gets the publishing profile for an app (or deployment slot, if specified). + * Creates a hostname binding for an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} publishingProfileOptions Specifies publishingProfileOptions - * for publishing profile. For example, use {"format": "FileZilla3"} to get a - * FileZilla publishing profile. + * @param {string} publicCertificateName Public certificate name. * - * @param {string} [publishingProfileOptions.format] Name of the format. Valid - * values are: - * FileZilla3 - * WebDeploy -- default - * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @param {object} publicCertificate Public certificate details. This is the + * JSON representation of a PublicCertificate object. * - * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] - * Include the DisasterRecover endpoint if true + * @param {buffer} [publicCertificate.blob] Public Certificate byte array + * + * @param {string} [publicCertificate.publicCertificateLocation] Public + * Certificate Location. Possible values include: 'CurrentUserMy', + * 'LocalMachineMy', 'Unknown' + * + * @param {string} [publicCertificate.kind] Kind of resource. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. + * specified, the API will create a binding for the production slot. * * @param {object} [options] Optional Parameters. * @@ -48395,12 +48959,13 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti * {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 PublicCertificate} 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 _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, callback) { +function _createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCertificateName, publicCertificate, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -48432,8 +48997,11 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (publishingProfileOptions === null || publishingProfileOptions === undefined) { - throw new Error('publishingProfileOptions cannot be null or undefined.'); + if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { + throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); + } + if (publicCertificate === null || publicCertificate === undefined) { + throw new Error('publicCertificate cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -48453,9 +49021,10 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -48466,7 +49035,7 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -48488,34 +49057,32 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi let requestContent = null; let requestModel = null; try { - if (publishingProfileOptions !== null && publishingProfileOptions !== undefined) { - let requestModelMapper = new client.models['CsmPublishingProfileOptions']().mapper(); - requestModel = client.serialize(requestModelMapper, publishingProfileOptions, 'publishingProfileOptions'); + if (publicCertificate !== null && publicCertificate !== undefined) { + let requestModelMapper = new client.models['PublicCertificate']().mapper(); + requestModel = client.serialize(requestModelMapper, publicCertificate, 'publicCertificate'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(publishingProfileOptions, null, 2)}.`); + `payload - ${JSON.stringify(publicCertificate, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; @@ -48533,19 +49100,35 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi } return callback(error); } - // Create Result - let result = response; + 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['PublicCertificate']().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); }); } /** - * @summary Resets the configuration settings of the current slot if they were - * previously modified by calling the API with POST. + * @summary Deletes a hostname binding for an app. * - * Resets the configuration settings of the current slot if they were - * previously modified by calling the API with POST. + * Deletes a hostname binding for an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -48553,7 +49136,9 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi * @param {string} name Name of the app. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API resets configuration settings for the production slot. + * specified, the API will delete the binding for the production slot. + * + * @param {string} publicCertificateName Public certificate name. * * @param {object} [options] Optional Parameters. * @@ -48572,7 +49157,7 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publi * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resetSlotConfigurationSlot(resourceGroupName, name, slot, options, callback) { +function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -48607,6 +49192,9 @@ function _resetSlotConfigurationSlot(resourceGroupName, name, slot, options, cal if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } + if (publicCertificateName === null || publicCertificateName === undefined || typeof publicCertificateName.valueOf() !== 'string') { + throw new Error('publicCertificateName cannot be null or undefined and it must be of type string.'); + } 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.'); } @@ -48622,10 +49210,11 @@ function _resetSlotConfigurationSlot(resourceGroupName, name, slot, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{publicCertificateName}', encodeURIComponent(publicCertificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -48635,7 +49224,7 @@ function _resetSlotConfigurationSlot(resourceGroupName, name, slot, options, cal // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -48660,7 +49249,344 @@ function _resetSlotConfigurationSlot(resourceGroupName, name, slot, options, cal return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && 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); + }); +} + +/** + * @summary Gets the publishing profile for an app (or deployment slot, if + * specified). + * + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. + * + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: + * FileZilla3 + * WebDeploy -- default + * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @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. + * + * {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 _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, 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 (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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (publishingProfileOptions === null || publishingProfileOptions === undefined) { + throw new Error('publishingProfileOptions cannot be null or undefined.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/slots/{slot}/publishxml'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (publishingProfileOptions !== null && publishingProfileOptions !== undefined) { + let requestModelMapper = new client.models['CsmPublishingProfileOptions']().mapper(); + requestModel = client.serialize(requestModelMapper, publishingProfileOptions, 'publishingProfileOptions'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(publishingProfileOptions, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + httpRequest.streamedResponse = true; + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(`Unexpected status code: ${statusCode}`); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().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 = response; + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Resets the configuration settings of the current slot if they were + * previously modified by calling the API with POST. + * + * Resets the configuration settings of the current slot if they were + * previously modified by calling the API with POST. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API resets configuration settings for the production slot. + * + * @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 _resetSlotConfigurationSlot(resourceGroupName, name, slot, 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 (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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/slots/{slot}/resetSlotConfig'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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); @@ -61111,8 +62037,204 @@ function _beginMigrateMySql(resourceGroupName, name, migrationRequestEnvelope, o if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (migrationRequestEnvelope === null || migrationRequestEnvelope === undefined) { - throw new Error('migrationRequestEnvelope cannot be null or undefined.'); + if (migrationRequestEnvelope === null || migrationRequestEnvelope === undefined) { + throw new Error('migrationRequestEnvelope cannot be null or undefined.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/migratemysql'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + 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 (migrationRequestEnvelope !== null && migrationRequestEnvelope !== undefined) { + let requestModelMapper = new client.models['MigrateMySqlRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, migrationRequestEnvelope, 'migrationRequestEnvelope'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(migrationRequestEnvelope, 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 !== 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) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().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['Operation']().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); + }); +} + +/** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + * + * {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 _beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, 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 durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; + let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; + let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; + // Validate + try { + 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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { + throw new Error('durationInSeconds must be of type number.'); + } + if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { + throw new Error('maxFrameLength must be of type number.'); + } + if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { + throw new Error('sasUrl must be of type string.'); } 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.'); @@ -61129,11 +62251,20 @@ function _beginMigrateMySql(resourceGroupName, name, migrationRequestEnvelope, o // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (durationInSeconds !== null && durationInSeconds !== undefined) { + queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); + } + if (maxFrameLength !== null && maxFrameLength !== undefined) { + queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); + } + if (sasUrl !== null && sasUrl !== undefined) { + queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -61159,28 +62290,14 @@ function _beginMigrateMySql(resourceGroupName, name, migrationRequestEnvelope, o } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (migrationRequestEnvelope !== null && migrationRequestEnvelope !== undefined) { - let requestModelMapper = new client.models['MigrateMySqlRequest']().mapper(); - requestModel = client.serialize(requestModelMapper, migrationRequestEnvelope, 'migrationRequestEnvelope'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(migrationRequestEnvelope, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -61216,7 +62333,21 @@ function _beginMigrateMySql(resourceGroupName, name, migrationRequestEnvelope, o parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Operation']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -61226,6 +62357,23 @@ function _beginMigrateMySql(resourceGroupName, name, migrationRequestEnvelope, o 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['Operation']().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); }); @@ -63466,11 +64614,213 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (instanceId === null || instanceId === undefined || typeof instanceId.valueOf() !== 'string') { - throw new Error('instanceId cannot be null or undefined and it must be of type string.'); + if (instanceId === null || instanceId === undefined || typeof instanceId.valueOf() !== 'string') { + throw new Error('instanceId cannot be null or undefined and it must be of type string.'); + } + if (mSDeploy === null || mSDeploy === undefined) { + throw new Error('mSDeploy cannot be null or undefined.'); + } + 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{instanceId}', encodeURIComponent(instanceId)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (mSDeploy !== null && mSDeploy !== undefined) { + let requestModelMapper = new client.models['MSDeploy']().mapper(); + requestModel = client.serialize(requestModelMapper, mSDeploy, 'mSDeploy'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(mSDeploy, 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 !== 409) { + 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['MSDeployStatus']().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); + }); +} + +/** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + * + * {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 _beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, 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 durationInSeconds = (options && options.durationInSeconds !== undefined) ? options.durationInSeconds : undefined; + let maxFrameLength = (options && options.maxFrameLength !== undefined) ? options.maxFrameLength : undefined; + let sasUrl = (options && options.sasUrl !== undefined) ? options.sasUrl : undefined; + // Validate + try { + 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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (durationInSeconds !== null && durationInSeconds !== undefined && typeof durationInSeconds !== 'number') { + throw new Error('durationInSeconds must be of type number.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (maxFrameLength !== null && maxFrameLength !== undefined && typeof maxFrameLength !== 'number') { + throw new Error('maxFrameLength must be of type number.'); } - if (mSDeploy === null || mSDeploy === undefined) { - throw new Error('mSDeploy cannot be null or undefined.'); + if (sasUrl !== null && sasUrl !== undefined && typeof sasUrl.valueOf() !== 'string') { + throw new Error('sasUrl must be of type string.'); } 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.'); @@ -63487,13 +64837,21 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); - requestUrl = requestUrl.replace('{instanceId}', encodeURIComponent(instanceId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (durationInSeconds !== null && durationInSeconds !== undefined) { + queryParameters.push('durationInSeconds=' + encodeURIComponent(durationInSeconds.toString())); + } + if (maxFrameLength !== null && maxFrameLength !== undefined) { + queryParameters.push('maxFrameLength=' + encodeURIComponent(maxFrameLength.toString())); + } + if (sasUrl !== null && sasUrl !== undefined) { + queryParameters.push('sasUrl=' + encodeURIComponent(sasUrl)); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -63501,7 +64859,7 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -63519,28 +64877,14 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (mSDeploy !== null && mSDeploy !== undefined) { - let requestModelMapper = new client.models['MSDeploy']().mapper(); - requestModel = client.serialize(requestModelMapper, mSDeploy, 'mSDeploy'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(mSDeploy, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 409) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -63550,12 +64894,13 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot 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; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -63569,13 +64914,27 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + 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['MSDeployStatus']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkTraceElementType', + type: { + name: 'Composite', + className: 'NetworkTrace' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -63585,6 +64944,23 @@ function _beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot 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['Operation']().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); }); @@ -72526,8 +73902,11 @@ class WebApps { this._migrateMySql = _migrateMySql; this._getMigrateMySqlStatus = _getMigrateMySqlStatus; this._listNetworkFeatures = _listNetworkFeatures; + this._getNetworkTraceOperation = _getNetworkTraceOperation; this._startWebSiteNetworkTrace = _startWebSiteNetworkTrace; + this._startWebSiteNetworkTraceOperation = _startWebSiteNetworkTraceOperation; this._stopWebSiteNetworkTrace = _stopWebSiteNetworkTrace; + this._getNetworkTraces = _getNetworkTraces; this._generateNewSitePublishingPassword = _generateNewSitePublishingPassword; this._listPerfMonCounters = _listPerfMonCounters; this._getSitePhpErrorLogFlag = _getSitePhpErrorLogFlag; @@ -72662,8 +74041,11 @@ class WebApps { this._listMetricsSlot = _listMetricsSlot; this._getMigrateMySqlStatusSlot = _getMigrateMySqlStatusSlot; this._listNetworkFeaturesSlot = _listNetworkFeaturesSlot; + this._getNetworkTraceOperationSlot = _getNetworkTraceOperationSlot; this._startWebSiteNetworkTraceSlot = _startWebSiteNetworkTraceSlot; + this._startWebSiteNetworkTraceOperationSlot = _startWebSiteNetworkTraceOperationSlot; this._stopWebSiteNetworkTraceSlot = _stopWebSiteNetworkTraceSlot; + this._getNetworkTracesSlot = _getNetworkTracesSlot; this._generateNewSitePublishingPasswordSlot = _generateNewSitePublishingPasswordSlot; this._listPerfMonCountersSlot = _listPerfMonCountersSlot; this._getSitePhpErrorLogFlagSlot = _getSitePhpErrorLogFlagSlot; @@ -72760,6 +74142,7 @@ class WebApps { this._beginCreateInstanceMSDeployOperation = _beginCreateInstanceMSDeployOperation; this._beginMigrateStorage = _beginMigrateStorage; this._beginMigrateMySql = _beginMigrateMySql; + this._beginStartWebSiteNetworkTraceOperation = _beginStartWebSiteNetworkTraceOperation; this._beginRestoreFromBackupBlob = _beginRestoreFromBackupBlob; this._beginRestoreFromDeletedApp = _beginRestoreFromDeletedApp; this._beginRestoreSnapshot = _beginRestoreSnapshot; @@ -72770,6 +74153,7 @@ class WebApps { this._beginCreateMSDeployOperationSlot = _beginCreateMSDeployOperationSlot; this._beginCreateInstanceFunctionSlot = _beginCreateInstanceFunctionSlot; this._beginCreateInstanceMSDeployOperationSlot = _beginCreateInstanceMSDeployOperationSlot; + this._beginStartWebSiteNetworkTraceOperationSlot = _beginStartWebSiteNetworkTraceOperationSlot; this._beginRestoreFromBackupBlobSlot = _beginRestoreFromBackupBlobSlot; this._beginRestoreFromDeletedAppSlot = _beginRestoreFromDeletedAppSlot; this._beginRestoreSnapshotSlot = _beginRestoreSnapshotSlot; @@ -87041,9 +88425,108 @@ class WebApps { } /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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. + */ + getNetworkTraceOperationWithHttpOperationResponse(resourceGroupName, name, operationId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getNetworkTraceOperation(resourceGroupName, name, operationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNetworkTraceOperation(resourceGroupName, name, operationId, 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._getNetworkTraceOperation(resourceGroupName, name, operationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNetworkTraceOperation(resourceGroupName, name, operationId, options, optionalCallback); + } + } + + /** + * @summary Start capturing network packets for the site (To be deprecated). + * + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -87084,9 +88567,9 @@ class WebApps { } /** - * @summary Start capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Start capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -87147,6 +88630,113 @@ class WebApps { } } + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + startWebSiteNetworkTraceOperationWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._startWebSiteNetworkTraceOperation(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startWebSiteNetworkTraceOperation(resourceGroupName, name, 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._startWebSiteNetworkTraceOperation(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startWebSiteNetworkTraceOperation(resourceGroupName, name, options, optionalCallback); + } + } + /** * @summary Stop ongoing capturing network packets for the site. * @@ -87164,7 +88754,7 @@ class WebApps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -87204,7 +88794,7 @@ class WebApps { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -87212,7 +88802,7 @@ class WebApps { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -87238,6 +88828,105 @@ class WebApps { } } + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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. + */ + getNetworkTracesWithHttpOperationResponse(resourceGroupName, name, operationId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getNetworkTraces(resourceGroupName, name, operationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the 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 {Array} - 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. + * + * {array} [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. + */ + getNetworkTraces(resourceGroupName, name, operationId, 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._getNetworkTraces(resourceGroupName, name, operationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNetworkTraces(resourceGroupName, name, operationId, options, optionalCallback); + } + } + /** * @summary Generates a new publishing password for an app (or deployment slot, * if specified). @@ -104924,9 +106613,114 @@ class WebApps { } /** - * @summary Start capturing network packets for the site. + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). * - * Start capturing network packets for the site. + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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. + */ + getNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName, name, operationId, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, 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._getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, options, optionalCallback); + } + } + + /** + * @summary Start capturing network packets for the site (To be deprecated). + * + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -104969,9 +106763,9 @@ class WebApps { } /** - * @summary Start capturing network packets for the site. + * @summary Start capturing network packets for the site (To be deprecated). * - * Start capturing network packets for the site. + * Start capturing network packets for the site (To be deprecated). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -105034,6 +106828,117 @@ class WebApps { } } + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + startWebSiteNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, 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._startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, optionalCallback); + } + } + /** * @summary Stop ongoing capturing network packets for the site. * @@ -105053,7 +106958,7 @@ class WebApps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -105095,7 +107000,7 @@ class WebApps { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -105103,7 +107008,7 @@ class WebApps { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -105129,6 +107034,111 @@ class WebApps { } } + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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. + */ + getNetworkTracesSlotWithHttpOperationResponse(resourceGroupName, name, operationId, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getNetworkTracesSlot(resourceGroupName, name, operationId, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets a named operation for a network trace capturing (or deployment + * slot, if specified). + * + * Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} operationId GUID of the operation. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get an operation for the production slot. + * + * @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 {Array} - 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. + * + * {array} [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. + */ + getNetworkTracesSlot(resourceGroupName, name, operationId, slot, 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._getNetworkTracesSlot(resourceGroupName, name, operationId, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNetworkTracesSlot(resourceGroupName, name, operationId, slot, options, optionalCallback); + } + } + /** * @summary Generates a new publishing password for an app (or deployment slot, * if specified). @@ -116526,6 +118536,113 @@ class WebApps { } } + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + beginStartWebSiteNetworkTraceOperationWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, 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._beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, options, optionalCallback); + } + } + /** * @summary Restores an app from a backup blob in Azure Storage. * @@ -118638,6 +120755,117 @@ class WebApps { } } + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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. + */ + beginStartWebSiteNetworkTraceOperationSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Start capturing network packets for the site. + * + * Start capturing network packets for the site. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name The name of the web app. + * + * @param {string} slot The name of the slot for this web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.durationInSeconds] The duration to keep capturing + * in seconds. + * + * @param {number} [options.maxFrameLength] The maximum frame length in bytes + * (Optional). + * + * @param {string} [options.sasUrl] The Blob URL to store capture file. + * + * @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 {Object} - 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. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, 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._beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, options, optionalCallback); + } + } + /** * @summary Restores an app from a backup blob in Azure Storage. * diff --git a/lib/services/websiteManagement2/package.json b/lib/services/websiteManagement2/package.json index 234286cf28..ac4ed79916 100644 --- a/lib/services/websiteManagement2/package.json +++ b/lib/services/websiteManagement2/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/webSiteManagementClient.js", "types": "./lib/webSiteManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/websiteManagement2", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git"