diff --git a/lib/services/devTestLabs/LICENSE.txt b/lib/services/devTestLabs/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/devTestLabs/LICENSE.txt +++ b/lib/services/devTestLabs/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/devTestLabs/README.md b/lib/services/devTestLabs/README.md index ceb7a034d8..eaea4cd6d7 100644 --- a/lib/services/devTestLabs/README.md +++ b/lib/services/devTestLabs/README.md @@ -1,40 +1,40 @@ ---- -uid: azure-arm-devtestlabs -summary: *content - ---- -# Microsoft Azure SDK for Node.js - DevTestLabsClient -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-devtestlabs -``` - -## How to use - -### Authentication, client creation and list providerOperations as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const DevTestLabsClient = require("azure-arm-devtestlabs"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new DevTestLabsClient(creds, subscriptionId); - return client.providerOperations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.log('An error ocurred:'); - 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-devtestlabs +summary: *content + +--- +# Microsoft Azure SDK for Node.js - DevTestLabsClient +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-devtestlabs +``` + +## How to use + +### Authentication, client creation and list providerOperations as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const DevTestLabsClient = require("azure-arm-devtestlabs"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new DevTestLabsClient(creds, subscriptionId); + return client.providerOperations.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/devTestLabs/lib/devTestLabsClient.d.ts b/lib/services/devTestLabs/lib/devTestLabsClient.d.ts index 98409ba3b4..5e8753f55f 100644 --- a/lib/services/devTestLabs/lib/devTestLabsClient.d.ts +++ b/lib/services/devTestLabs/lib/devTestLabsClient.d.ts @@ -34,11 +34,11 @@ export default class DevTestLabsClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @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); @@ -76,6 +76,8 @@ export default class DevTestLabsClient extends AzureServiceClient { disks: operations.Disks; environments: operations.Environments; secrets: operations.Secrets; + serviceFabrics: operations.ServiceFabrics; + serviceFabricSchedules: operations.ServiceFabricSchedules; virtualMachines: operations.VirtualMachines; virtualMachineSchedules: operations.VirtualMachineSchedules; virtualNetworks: operations.VirtualNetworks; diff --git a/lib/services/devTestLabs/lib/devTestLabsClient.js b/lib/services/devTestLabs/lib/devTestLabsClient.js index 7fd826829e..7cb3593578 100644 --- a/lib/services/devTestLabs/lib/devTestLabsClient.js +++ b/lib/services/devTestLabs/lib/devTestLabsClient.js @@ -34,9 +34,9 @@ class DevTestLabsClient extends ServiceClient { * @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] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @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) { @@ -50,7 +50,7 @@ class DevTestLabsClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2016-05-15'; + this.apiVersion = '2018-09-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -92,6 +92,8 @@ class DevTestLabsClient extends ServiceClient { this.disks = new operations.Disks(this); this.environments = new operations.Environments(this); this.secrets = new operations.Secrets(this); + this.serviceFabrics = new operations.ServiceFabrics(this); + this.serviceFabricSchedules = new operations.ServiceFabricSchedules(this); this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineSchedules = new operations.VirtualMachineSchedules(this); this.virtualNetworks = new operations.VirtualNetworks(this); diff --git a/lib/services/devTestLabs/lib/models/applicableSchedule.js b/lib/services/devTestLabs/lib/models/applicableSchedule.js index d333558155..5bc9ed666d 100644 --- a/lib/services/devTestLabs/lib/models/applicableSchedule.js +++ b/lib/services/devTestLabs/lib/models/applicableSchedule.js @@ -47,11 +47,17 @@ class ApplicableSchedule extends models['Resource'] { * settings. * @member {string} [labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsShutdown.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} [labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [labVmsShutdown.createdDate] The creation date of the * schedule. * @member {string} [labVmsShutdown.targetResourceId] The resource ID to @@ -86,11 +92,17 @@ class ApplicableSchedule extends models['Resource'] { * settings. * @member {string} [labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsStartup.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} [labVmsStartup.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [labVmsStartup.createdDate] The creation date of the * schedule. * @member {string} [labVmsStartup.targetResourceId] The resource ID to which diff --git a/lib/services/devTestLabs/lib/models/applicableScheduleFragment.js b/lib/services/devTestLabs/lib/models/applicableScheduleFragment.js index 425cd8ea9e..3dee0d2d39 100644 --- a/lib/services/devTestLabs/lib/models/applicableScheduleFragment.js +++ b/lib/services/devTestLabs/lib/models/applicableScheduleFragment.js @@ -16,9 +16,9 @@ const models = require('./index'); * Schedules applicable to a virtual machine. The schedules may have been * defined on a VM or on lab level. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class ApplicableScheduleFragment extends models['Resource'] { +class ApplicableScheduleFragment extends models['UpdateResource'] { /** * Create a ApplicableScheduleFragment. * @member {object} [labVmsShutdown] The auto-shutdown schedule, if one has @@ -47,17 +47,19 @@ class ApplicableScheduleFragment extends models['Resource'] { * settings. * @member {string} [labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsShutdown.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} [labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {string} [labVmsShutdown.targetResourceId] The resource ID to * which the schedule belongs - * @member {string} [labVmsShutdown.provisioningState] The provisioning - * status of the resource. - * @member {string} [labVmsShutdown.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). * @member {object} [labVmsStartup] The auto-startup schedule, if one has * been set at the lab or lab resource level. * @member {string} [labVmsStartup.status] The status of the schedule (i.e. @@ -84,17 +86,19 @@ class ApplicableScheduleFragment extends models['Resource'] { * settings. * @member {string} [labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsStartup.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} [labVmsStartup.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {string} [labVmsStartup.targetResourceId] The resource ID to which * the schedule belongs - * @member {string} [labVmsStartup.provisioningState] The provisioning status - * of the resource. - * @member {string} [labVmsStartup.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). */ constructor() { super(); @@ -114,37 +118,6 @@ class ApplicableScheduleFragment extends models['Resource'] { name: 'Composite', className: 'ApplicableScheduleFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', diff --git a/lib/services/devTestLabs/lib/models/applyArtifactsRequest.js b/lib/services/devTestLabs/lib/models/applyArtifactsRequest.js index 1f2d4aeb18..7bdb357908 100644 --- a/lib/services/devTestLabs/lib/models/applyArtifactsRequest.js +++ b/lib/services/devTestLabs/lib/models/applyArtifactsRequest.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Request body for applying artifacts to a virtual machine. * diff --git a/lib/services/devTestLabs/lib/models/armTemplate.js b/lib/services/devTestLabs/lib/models/armTemplate.js index 269f68bcf8..0244cc7e1c 100644 --- a/lib/services/devTestLabs/lib/models/armTemplate.js +++ b/lib/services/devTestLabs/lib/models/armTemplate.js @@ -28,6 +28,8 @@ class ArmTemplate extends models['Resource'] { * @member {date} [createdDate] The creation date of the armTemplate. * @member {array} [parametersValueFilesInfo] File name and parameter values * information from all azuredeploy.*.parameters.json for the ARM template. + * @member {boolean} [enabled] Whether or not ARM template is enabled for use + * by lab user. */ constructor() { super(); @@ -155,6 +157,14 @@ class ArmTemplate extends models['Resource'] { } } } + }, + enabled: { + required: false, + readOnly: true, + serializedName: 'properties.enabled', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/devTestLabs/lib/models/armTemplateList.js b/lib/services/devTestLabs/lib/models/armTemplateList.js new file mode 100644 index 0000000000..64a0ab4762 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/armTemplateList.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'; + +/** + * The response of a list operation. + */ +class ArmTemplateList extends Array { + /** + * Create a ArmTemplateList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ArmTemplateList + * + * @returns {object} metadata of ArmTemplateList + * + */ + mapper() { + return { + required: false, + serializedName: 'ArmTemplateList', + type: { + name: 'Composite', + className: 'ArmTemplateList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArmTemplateElementType', + type: { + name: 'Composite', + className: 'ArmTemplate' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ArmTemplateList; diff --git a/lib/services/devTestLabs/lib/models/armTemplateParameterPropertiesFragment.js b/lib/services/devTestLabs/lib/models/armTemplateParameterPropertiesFragment.js new file mode 100644 index 0000000000..33de917348 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/armTemplateParameterPropertiesFragment.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'; + +/** + * Properties of an Azure Resource Manager template parameter. + * + */ +class ArmTemplateParameterPropertiesFragment { + /** + * Create a ArmTemplateParameterPropertiesFragment. + * @member {string} [name] The name of the template parameter. + * @member {string} [value] The value of the template parameter. + */ + constructor() { + } + + /** + * Defines the metadata of ArmTemplateParameterPropertiesFragment + * + * @returns {object} metadata of ArmTemplateParameterPropertiesFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'ArmTemplateParameterPropertiesFragment', + type: { + name: 'Composite', + className: 'ArmTemplateParameterPropertiesFragment', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ArmTemplateParameterPropertiesFragment; diff --git a/lib/services/devTestLabs/lib/models/artifactInstallProperties.js b/lib/services/devTestLabs/lib/models/artifactInstallProperties.js index bd512a08c9..b55d96b4ae 100644 --- a/lib/services/devTestLabs/lib/models/artifactInstallProperties.js +++ b/lib/services/devTestLabs/lib/models/artifactInstallProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of an artifact. * @@ -20,6 +18,7 @@ class ArtifactInstallProperties { /** * Create a ArtifactInstallProperties. * @member {string} [artifactId] The artifact's identifier. + * @member {string} [artifactTitle] The artifact's title. * @member {array} [parameters] The parameters of the artifact. * @member {string} [status] The status of the artifact. * @member {string} [deploymentStatusMessage] The status message from the @@ -53,6 +52,13 @@ class ArtifactInstallProperties { name: 'String' } }, + artifactTitle: { + required: false, + serializedName: 'artifactTitle', + type: { + name: 'String' + } + }, parameters: { required: false, serializedName: 'parameters', diff --git a/lib/services/devTestLabs/lib/models/artifactInstallPropertiesFragment.js b/lib/services/devTestLabs/lib/models/artifactInstallPropertiesFragment.js index a69d566d2e..467afa0287 100644 --- a/lib/services/devTestLabs/lib/models/artifactInstallPropertiesFragment.js +++ b/lib/services/devTestLabs/lib/models/artifactInstallPropertiesFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of an artifact. * @@ -20,6 +18,7 @@ class ArtifactInstallPropertiesFragment { /** * Create a ArtifactInstallPropertiesFragment. * @member {string} [artifactId] The artifact's identifier. + * @member {string} [artifactTitle] The artifact's title. * @member {array} [parameters] The parameters of the artifact. * @member {string} [status] The status of the artifact. * @member {string} [deploymentStatusMessage] The status message from the @@ -53,6 +52,13 @@ class ArtifactInstallPropertiesFragment { name: 'String' } }, + artifactTitle: { + required: false, + serializedName: 'artifactTitle', + type: { + name: 'String' + } + }, parameters: { required: false, serializedName: 'parameters', diff --git a/lib/services/devTestLabs/lib/models/artifactList.js b/lib/services/devTestLabs/lib/models/artifactList.js new file mode 100644 index 0000000000..7bb46e177f --- /dev/null +++ b/lib/services/devTestLabs/lib/models/artifactList.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'; + +/** + * The response of a list operation. + */ +class ArtifactList extends Array { + /** + * Create a ArtifactList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ArtifactList + * + * @returns {object} metadata of ArtifactList + * + */ + mapper() { + return { + required: false, + serializedName: 'ArtifactList', + type: { + name: 'Composite', + className: 'ArtifactList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArtifactElementType', + type: { + name: 'Composite', + className: 'Artifact' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ArtifactList; diff --git a/lib/services/devTestLabs/lib/models/artifactSource.js b/lib/services/devTestLabs/lib/models/artifactSource.js index 35812b8ee3..a48c3343e0 100644 --- a/lib/services/devTestLabs/lib/models/artifactSource.js +++ b/lib/services/devTestLabs/lib/models/artifactSource.js @@ -168,6 +168,7 @@ class ArtifactSource extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -175,6 +176,7 @@ class ArtifactSource extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/artifactSourceFragment.js b/lib/services/devTestLabs/lib/models/artifactSourceFragment.js index af55251142..bbe7a2cd79 100644 --- a/lib/services/devTestLabs/lib/models/artifactSourceFragment.js +++ b/lib/services/devTestLabs/lib/models/artifactSourceFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Properties of an artifact source. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class ArtifactSourceFragment extends models['Resource'] { +class ArtifactSourceFragment extends models['UpdateResource'] { /** * Create a ArtifactSourceFragment. * @member {string} [displayName] The artifact source's display name. @@ -33,10 +33,6 @@ class ArtifactSourceFragment extends models['Resource'] { * @member {string} [status] Indicates if the artifact source is enabled * (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -56,37 +52,6 @@ class ArtifactSourceFragment extends models['Resource'] { name: 'Composite', className: 'ArtifactSourceFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -156,20 +121,6 @@ class ArtifactSourceFragment extends models['Resource'] { type: { name: 'String' } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/artifactSourceList.js b/lib/services/devTestLabs/lib/models/artifactSourceList.js new file mode 100644 index 0000000000..dd56fa4af6 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/artifactSourceList.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'; + +/** + * The response of a list operation. + */ +class ArtifactSourceList extends Array { + /** + * Create a ArtifactSourceList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ArtifactSourceList + * + * @returns {object} metadata of ArtifactSourceList + * + */ + mapper() { + return { + required: false, + serializedName: 'ArtifactSourceList', + type: { + name: 'Composite', + className: 'ArtifactSourceList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArtifactSourceElementType', + type: { + name: 'Composite', + className: 'ArtifactSource' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ArtifactSourceList; diff --git a/lib/services/devTestLabs/lib/models/attachNewDataDiskOptionsFragment.js b/lib/services/devTestLabs/lib/models/attachNewDataDiskOptionsFragment.js new file mode 100644 index 0000000000..5099ee633b --- /dev/null +++ b/lib/services/devTestLabs/lib/models/attachNewDataDiskOptionsFragment.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'; + +/** + * Properties to attach new disk to the Virtual Machine. + * + */ +class AttachNewDataDiskOptionsFragment { + /** + * Create a AttachNewDataDiskOptionsFragment. + * @member {number} [diskSizeGiB] Size of the disk to be attached in + * GibiBytes. + * @member {string} [diskName] The name of the disk to be attached. + * @member {string} [diskType] The storage type for the disk (i.e. Standard, + * Premium). Possible values include: 'Standard', 'Premium' + */ + constructor() { + } + + /** + * Defines the metadata of AttachNewDataDiskOptionsFragment + * + * @returns {object} metadata of AttachNewDataDiskOptionsFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'AttachNewDataDiskOptionsFragment', + type: { + name: 'Composite', + className: 'AttachNewDataDiskOptionsFragment', + modelProperties: { + diskSizeGiB: { + required: false, + serializedName: 'diskSizeGiB', + type: { + name: 'Number' + } + }, + diskName: { + required: false, + serializedName: 'diskName', + type: { + name: 'String' + } + }, + diskType: { + required: false, + serializedName: 'diskType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AttachNewDataDiskOptionsFragment; diff --git a/lib/services/devTestLabs/lib/models/bulkCreationParametersFragment.js b/lib/services/devTestLabs/lib/models/bulkCreationParametersFragment.js new file mode 100644 index 0000000000..8e1cb445cc --- /dev/null +++ b/lib/services/devTestLabs/lib/models/bulkCreationParametersFragment.js @@ -0,0 +1,53 @@ +/* + * 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'; + +/** + * Parameters for creating multiple virtual machines as a single action. + * + */ +class BulkCreationParametersFragment { + /** + * Create a BulkCreationParametersFragment. + * @member {number} [instanceCount] The number of virtual machine instances + * to create. + */ + constructor() { + } + + /** + * Defines the metadata of BulkCreationParametersFragment + * + * @returns {object} metadata of BulkCreationParametersFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'BulkCreationParametersFragment', + type: { + name: 'Composite', + className: 'BulkCreationParametersFragment', + modelProperties: { + instanceCount: { + required: false, + serializedName: 'instanceCount', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = BulkCreationParametersFragment; diff --git a/lib/services/devTestLabs/lib/models/computeVmProperties.js b/lib/services/devTestLabs/lib/models/computeVmProperties.js index f1648baf23..adaddb1d74 100644 --- a/lib/services/devTestLabs/lib/models/computeVmProperties.js +++ b/lib/services/devTestLabs/lib/models/computeVmProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a virtual machine returned by the Microsoft.Compute API. * diff --git a/lib/services/devTestLabs/lib/models/computeVmPropertiesFragment.js b/lib/services/devTestLabs/lib/models/computeVmPropertiesFragment.js index 5b70bacffa..9f27b717d2 100644 --- a/lib/services/devTestLabs/lib/models/computeVmPropertiesFragment.js +++ b/lib/services/devTestLabs/lib/models/computeVmPropertiesFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a virtual machine returned by the Microsoft.Compute API. * diff --git a/lib/services/devTestLabs/lib/models/costThresholdProperties.js b/lib/services/devTestLabs/lib/models/costThresholdProperties.js index dca4c28062..adab572ade 100644 --- a/lib/services/devTestLabs/lib/models/costThresholdProperties.js +++ b/lib/services/devTestLabs/lib/models/costThresholdProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a cost threshold item. * diff --git a/lib/services/devTestLabs/lib/models/customImage.js b/lib/services/devTestLabs/lib/models/customImage.js index 663facd5b9..0e0accf395 100644 --- a/lib/services/devTestLabs/lib/models/customImage.js +++ b/lib/services/devTestLabs/lib/models/customImage.js @@ -44,6 +44,20 @@ class CustomImage extends models['Resource'] { * @member {date} [creationDate] The creation date of the custom image. * @member {string} [managedImageId] The Managed Image Id backing the custom * image. + * @member {string} [managedSnapshotId] The Managed Snapshot Id backing the + * custom image. + * @member {array} [dataDiskStorageInfo] Storage information about the data + * disks present in the custom image + * @member {object} [customImagePlan] Storage information about the plan + * related to this custom image + * @member {string} [customImagePlan.id] The id of the plan, equivalent to + * name of the plan + * @member {string} [customImagePlan.publisher] The publisher for the plan + * from the marketplace image the custom image is derived from + * @member {string} [customImagePlan.offer] The offer for the plan from the + * marketplace image the custom image is derived from + * @member {boolean} [isPlanAuthorized] Whether or not the custom images + * underlying offer/plan has been enabled for programmatic deployment * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -157,8 +171,46 @@ class CustomImage extends models['Resource'] { name: 'String' } }, + managedSnapshotId: { + required: false, + serializedName: 'properties.managedSnapshotId', + type: { + name: 'String' + } + }, + dataDiskStorageInfo: { + required: false, + serializedName: 'properties.dataDiskStorageInfo', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskStorageTypeInfoElementType', + type: { + name: 'Composite', + className: 'DataDiskStorageTypeInfo' + } + } + } + }, + customImagePlan: { + required: false, + serializedName: 'properties.customImagePlan', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromPlan' + } + }, + isPlanAuthorized: { + required: false, + serializedName: 'properties.isPlanAuthorized', + type: { + name: 'Boolean' + } + }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -166,6 +218,7 @@ class CustomImage extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/customImageFragment.js b/lib/services/devTestLabs/lib/models/customImageFragment.js new file mode 100644 index 0000000000..f0e08ac9ae --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImageFragment.js @@ -0,0 +1,173 @@ +/* + * 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'); + +/** + * A custom image. + * + * @extends models['UpdateResource'] + */ +class CustomImageFragment extends models['UpdateResource'] { + /** + * Create a CustomImageFragment. + * @member {object} [vm] The virtual machine from which the image is to be + * created. + * @member {string} [vm.sourceVmId] The source vm identifier. + * @member {object} [vm.windowsOsInfo] The Windows OS information of the VM. + * @member {string} [vm.windowsOsInfo.windowsOsState] The state of the + * Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * @member {object} [vm.linuxOsInfo] The Linux OS information of the VM. + * @member {string} [vm.linuxOsInfo.linuxOsState] The state of the Linux OS + * (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * @member {object} [vhd] The VHD from which the image is to be created. + * @member {string} [vhd.imageName] The image name. + * @member {boolean} [vhd.sysPrep] Indicates whether sysprep has been run on + * the VHD. + * @member {string} [vhd.osType] The OS type of the custom image (i.e. + * Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * @member {string} [description] The description of the custom image. + * @member {string} [author] The author of the custom image. + * @member {string} [managedImageId] The Managed Image Id backing the custom + * image. + * @member {string} [managedSnapshotId] The Managed Snapshot Id backing the + * custom image. + * @member {array} [dataDiskStorageInfo] Storage information about the data + * disks present in the custom image + * @member {object} [customImagePlan] Storage information about the plan + * related to this custom image + * @member {string} [customImagePlan.id] The id of the plan, equivalent to + * name of the plan + * @member {string} [customImagePlan.publisher] The publisher for the plan + * from the marketplace image the custom image is derived from + * @member {string} [customImagePlan.offer] The offer for the plan from the + * marketplace image the custom image is derived from + * @member {boolean} [isPlanAuthorized] Whether or not the custom images + * underlying offer/plan has been enabled for programmatic deployment + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CustomImageFragment + * + * @returns {object} metadata of CustomImageFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImageFragment', + type: { + name: 'Composite', + className: 'CustomImageFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + vm: { + required: false, + serializedName: 'properties.vm', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromVmFragment' + } + }, + vhd: { + required: false, + serializedName: 'properties.vhd', + type: { + name: 'Composite', + className: 'CustomImagePropertiesCustomFragment' + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + author: { + required: false, + serializedName: 'properties.author', + type: { + name: 'String' + } + }, + managedImageId: { + required: false, + serializedName: 'properties.managedImageId', + type: { + name: 'String' + } + }, + managedSnapshotId: { + required: false, + serializedName: 'properties.managedSnapshotId', + type: { + name: 'String' + } + }, + dataDiskStorageInfo: { + required: false, + serializedName: 'properties.dataDiskStorageInfo', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskStorageTypeInfoFragmentElementType', + type: { + name: 'Composite', + className: 'DataDiskStorageTypeInfoFragment' + } + } + } + }, + customImagePlan: { + required: false, + serializedName: 'properties.customImagePlan', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromPlanFragment' + } + }, + isPlanAuthorized: { + required: false, + serializedName: 'properties.isPlanAuthorized', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = CustomImageFragment; diff --git a/lib/services/devTestLabs/lib/models/customImageList.js b/lib/services/devTestLabs/lib/models/customImageList.js new file mode 100644 index 0000000000..da91c8dae0 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImageList.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'; + +/** + * The response of a list operation. + */ +class CustomImageList extends Array { + /** + * Create a CustomImageList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CustomImageList + * + * @returns {object} metadata of CustomImageList + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImageList', + type: { + name: 'Composite', + className: 'CustomImageList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CustomImageElementType', + type: { + name: 'Composite', + className: 'CustomImage' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CustomImageList; diff --git a/lib/services/devTestLabs/lib/models/customImagePropertiesCustomFragment.js b/lib/services/devTestLabs/lib/models/customImagePropertiesCustomFragment.js new file mode 100644 index 0000000000..6f0e62795a --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImagePropertiesCustomFragment.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'; + +/** + * Properties for creating a custom image from a VHD. + * + */ +class CustomImagePropertiesCustomFragment { + /** + * Create a CustomImagePropertiesCustomFragment. + * @member {string} [imageName] The image name. + * @member {boolean} [sysPrep] Indicates whether sysprep has been run on the + * VHD. + * @member {string} [osType] The OS type of the custom image (i.e. Windows, + * Linux). Possible values include: 'Windows', 'Linux', 'None' + */ + constructor() { + } + + /** + * Defines the metadata of CustomImagePropertiesCustomFragment + * + * @returns {object} metadata of CustomImagePropertiesCustomFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImagePropertiesCustomFragment', + type: { + name: 'Composite', + className: 'CustomImagePropertiesCustomFragment', + modelProperties: { + imageName: { + required: false, + serializedName: 'imageName', + type: { + name: 'String' + } + }, + sysPrep: { + required: false, + serializedName: 'sysPrep', + type: { + name: 'Boolean' + } + }, + osType: { + required: false, + serializedName: 'osType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CustomImagePropertiesCustomFragment; diff --git a/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlan.js b/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlan.js new file mode 100644 index 0000000000..5625486692 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlan.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'; + +/** + * Properties for plan on a custom image. + * + */ +class CustomImagePropertiesFromPlan { + /** + * Create a CustomImagePropertiesFromPlan. + * @member {string} [id] The id of the plan, equivalent to name of the plan + * @member {string} [publisher] The publisher for the plan from the + * marketplace image the custom image is derived from + * @member {string} [offer] The offer for the plan from the marketplace image + * the custom image is derived from + */ + constructor() { + } + + /** + * Defines the metadata of CustomImagePropertiesFromPlan + * + * @returns {object} metadata of CustomImagePropertiesFromPlan + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImagePropertiesFromPlan', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromPlan', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + offer: { + required: false, + serializedName: 'offer', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CustomImagePropertiesFromPlan; diff --git a/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlanFragment.js b/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlanFragment.js new file mode 100644 index 0000000000..4e4f751458 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImagePropertiesFromPlanFragment.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'; + +/** + * Properties for plan on a custom image. + * + */ +class CustomImagePropertiesFromPlanFragment { + /** + * Create a CustomImagePropertiesFromPlanFragment. + * @member {string} [id] The id of the plan, equivalent to name of the plan + * @member {string} [publisher] The publisher for the plan from the + * marketplace image the custom image is derived from + * @member {string} [offer] The offer for the plan from the marketplace image + * the custom image is derived from + */ + constructor() { + } + + /** + * Defines the metadata of CustomImagePropertiesFromPlanFragment + * + * @returns {object} metadata of CustomImagePropertiesFromPlanFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImagePropertiesFromPlanFragment', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromPlanFragment', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + offer: { + required: false, + serializedName: 'offer', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CustomImagePropertiesFromPlanFragment; diff --git a/lib/services/devTestLabs/lib/models/customImagePropertiesFromVm.js b/lib/services/devTestLabs/lib/models/customImagePropertiesFromVm.js index 5f9d20e537..87228d00b5 100644 --- a/lib/services/devTestLabs/lib/models/customImagePropertiesFromVm.js +++ b/lib/services/devTestLabs/lib/models/customImagePropertiesFromVm.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties for creating a custom image from a virtual machine. * diff --git a/lib/services/devTestLabs/lib/models/customImagePropertiesFromVmFragment.js b/lib/services/devTestLabs/lib/models/customImagePropertiesFromVmFragment.js new file mode 100644 index 0000000000..2604917df9 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/customImagePropertiesFromVmFragment.js @@ -0,0 +1,77 @@ +/* + * 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'; + +/** + * Properties for creating a custom image from a virtual machine. + * + */ +class CustomImagePropertiesFromVmFragment { + /** + * Create a CustomImagePropertiesFromVmFragment. + * @member {string} [sourceVmId] The source vm identifier. + * @member {object} [windowsOsInfo] The Windows OS information of the VM. + * @member {string} [windowsOsInfo.windowsOsState] The state of the Windows + * OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). Possible values + * include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + * @member {object} [linuxOsInfo] The Linux OS information of the VM. + * @member {string} [linuxOsInfo.linuxOsState] The state of the Linux OS + * (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + */ + constructor() { + } + + /** + * Defines the metadata of CustomImagePropertiesFromVmFragment + * + * @returns {object} metadata of CustomImagePropertiesFromVmFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'CustomImagePropertiesFromVmFragment', + type: { + name: 'Composite', + className: 'CustomImagePropertiesFromVmFragment', + modelProperties: { + sourceVmId: { + required: false, + serializedName: 'sourceVmId', + type: { + name: 'String' + } + }, + windowsOsInfo: { + required: false, + serializedName: 'windowsOsInfo', + type: { + name: 'Composite', + className: 'WindowsOsInfoFragment' + } + }, + linuxOsInfo: { + required: false, + serializedName: 'linuxOsInfo', + type: { + name: 'Composite', + className: 'LinuxOsInfoFragment' + } + } + } + } + }; + } +} + +module.exports = CustomImagePropertiesFromVmFragment; diff --git a/lib/services/devTestLabs/lib/models/dataDiskProperties.js b/lib/services/devTestLabs/lib/models/dataDiskProperties.js index 6fa64796ca..94da92361a 100644 --- a/lib/services/devTestLabs/lib/models/dataDiskProperties.js +++ b/lib/services/devTestLabs/lib/models/dataDiskProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Request body for adding a new or existing data disk to a virtual machine. * diff --git a/lib/services/devTestLabs/lib/models/dataDiskPropertiesFragment.js b/lib/services/devTestLabs/lib/models/dataDiskPropertiesFragment.js new file mode 100644 index 0000000000..c74565f754 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/dataDiskPropertiesFragment.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'; + +/** + * Request body for adding a new or existing data disk to a virtual machine. + * + */ +class DataDiskPropertiesFragment { + /** + * Create a DataDiskPropertiesFragment. + * @member {object} [attachNewDataDiskOptions] Specifies options to attach a + * new disk to the virtual machine. + * @member {number} [attachNewDataDiskOptions.diskSizeGiB] Size of the disk + * to be attached in GibiBytes. + * @member {string} [attachNewDataDiskOptions.diskName] The name of the disk + * to be attached. + * @member {string} [attachNewDataDiskOptions.diskType] The storage type for + * the disk (i.e. Standard, Premium). Possible values include: 'Standard', + * 'Premium' + * @member {string} [existingLabDiskId] Specifies the existing lab disk id to + * attach to virtual machine. + * @member {string} [hostCaching] Caching option for a data disk (i.e. None, + * ReadOnly, ReadWrite). Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + */ + constructor() { + } + + /** + * Defines the metadata of DataDiskPropertiesFragment + * + * @returns {object} metadata of DataDiskPropertiesFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'DataDiskPropertiesFragment', + type: { + name: 'Composite', + className: 'DataDiskPropertiesFragment', + modelProperties: { + attachNewDataDiskOptions: { + required: false, + serializedName: 'attachNewDataDiskOptions', + type: { + name: 'Composite', + className: 'AttachNewDataDiskOptionsFragment' + } + }, + existingLabDiskId: { + required: false, + serializedName: 'existingLabDiskId', + type: { + name: 'String' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataDiskPropertiesFragment; diff --git a/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfo.js b/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfo.js new file mode 100644 index 0000000000..990933e8ec --- /dev/null +++ b/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfo.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'; + +/** + * Storage information about the data disks present in the custom image + * + */ +class DataDiskStorageTypeInfo { + /** + * Create a DataDiskStorageTypeInfo. + * @member {string} [lun] Disk Lun + * @member {string} [storageType] Disk Storage Type. Possible values include: + * 'Standard', 'Premium' + */ + constructor() { + } + + /** + * Defines the metadata of DataDiskStorageTypeInfo + * + * @returns {object} metadata of DataDiskStorageTypeInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'DataDiskStorageTypeInfo', + type: { + name: 'Composite', + className: 'DataDiskStorageTypeInfo', + modelProperties: { + lun: { + required: false, + serializedName: 'lun', + type: { + name: 'String' + } + }, + storageType: { + required: false, + serializedName: 'storageType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataDiskStorageTypeInfo; diff --git a/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfoFragment.js b/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfoFragment.js new file mode 100644 index 0000000000..40ada2ea41 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/dataDiskStorageTypeInfoFragment.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'; + +/** + * Storage information about the data disks present in the custom image + * + */ +class DataDiskStorageTypeInfoFragment { + /** + * Create a DataDiskStorageTypeInfoFragment. + * @member {string} [lun] Disk Lun + * @member {string} [storageType] Disk Storage Type. Possible values include: + * 'Standard', 'Premium' + */ + constructor() { + } + + /** + * Defines the metadata of DataDiskStorageTypeInfoFragment + * + * @returns {object} metadata of DataDiskStorageTypeInfoFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'DataDiskStorageTypeInfoFragment', + type: { + name: 'Composite', + className: 'DataDiskStorageTypeInfoFragment', + modelProperties: { + lun: { + required: false, + serializedName: 'lun', + type: { + name: 'String' + } + }, + storageType: { + required: false, + serializedName: 'storageType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataDiskStorageTypeInfoFragment; diff --git a/lib/services/devTestLabs/lib/models/disk.js b/lib/services/devTestLabs/lib/models/disk.js index f16053aa9c..8be3bac9ae 100644 --- a/lib/services/devTestLabs/lib/models/disk.js +++ b/lib/services/devTestLabs/lib/models/disk.js @@ -161,6 +161,7 @@ class Disk extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -168,6 +169,7 @@ class Disk extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/diskFragment.js b/lib/services/devTestLabs/lib/models/diskFragment.js new file mode 100644 index 0000000000..505b5502d9 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/diskFragment.js @@ -0,0 +1,124 @@ +/* + * 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'); + +/** + * A Disk. + * + * @extends models['UpdateResource'] + */ +class DiskFragment extends models['UpdateResource'] { + /** + * Create a DiskFragment. + * @member {string} [diskType] The storage type for the disk (i.e. Standard, + * Premium). Possible values include: 'Standard', 'Premium' + * @member {number} [diskSizeGiB] The size of the disk in GibiBytes. + * @member {string} [leasedByLabVmId] The resource ID of the VM to which this + * disk is leased. + * @member {string} [diskBlobName] When backed by a blob, the name of the VHD + * blob without extension. + * @member {string} [diskUri] When backed by a blob, the URI of underlying + * blob. + * @member {string} [hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * @member {string} [managedDiskId] When backed by managed disk, this is the + * ID of the compute disk resource. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DiskFragment + * + * @returns {object} metadata of DiskFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'DiskFragment', + type: { + name: 'Composite', + className: 'DiskFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + diskType: { + required: false, + serializedName: 'properties.diskType', + type: { + name: 'String' + } + }, + diskSizeGiB: { + required: false, + serializedName: 'properties.diskSizeGiB', + type: { + name: 'Number' + } + }, + leasedByLabVmId: { + required: false, + serializedName: 'properties.leasedByLabVmId', + type: { + name: 'String' + } + }, + diskBlobName: { + required: false, + serializedName: 'properties.diskBlobName', + type: { + name: 'String' + } + }, + diskUri: { + required: false, + serializedName: 'properties.diskUri', + type: { + name: 'String' + } + }, + hostCaching: { + required: false, + serializedName: 'properties.hostCaching', + type: { + name: 'String' + } + }, + managedDiskId: { + required: false, + serializedName: 'properties.managedDiskId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DiskFragment; diff --git a/lib/services/devTestLabs/lib/models/diskList.js b/lib/services/devTestLabs/lib/models/diskList.js new file mode 100644 index 0000000000..c4930974ee --- /dev/null +++ b/lib/services/devTestLabs/lib/models/diskList.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'; + +/** + * The response of a list operation. + */ +class DiskList extends Array { + /** + * Create a DiskList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DiskList + * + * @returns {object} metadata of DiskList + * + */ + mapper() { + return { + required: false, + serializedName: 'DiskList', + type: { + name: 'Composite', + className: 'DiskList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DiskElementType', + type: { + name: 'Composite', + className: 'Disk' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DiskList; diff --git a/lib/services/devTestLabs/lib/models/dtlEnvironment.js b/lib/services/devTestLabs/lib/models/dtlEnvironment.js index b2435c016a..5a771be5fd 100644 --- a/lib/services/devTestLabs/lib/models/dtlEnvironment.js +++ b/lib/services/devTestLabs/lib/models/dtlEnvironment.js @@ -132,6 +132,7 @@ class DtlEnvironment extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -139,6 +140,7 @@ class DtlEnvironment extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/dtlEnvironmentFragment.js b/lib/services/devTestLabs/lib/models/dtlEnvironmentFragment.js new file mode 100644 index 0000000000..fa09ee54a7 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/dtlEnvironmentFragment.js @@ -0,0 +1,85 @@ +/* + * 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'); + +/** + * An environment, which is essentially an ARM template deployment. + * + * @extends models['UpdateResource'] + */ +class DtlEnvironmentFragment extends models['UpdateResource'] { + /** + * Create a DtlEnvironmentFragment. + * @member {object} [deploymentProperties] The deployment properties of the + * environment. + * @member {string} [deploymentProperties.armTemplateId] The Azure Resource + * Manager template's identifier. + * @member {array} [deploymentProperties.parameters] The parameters of the + * Azure Resource Manager template. + * @member {string} [armTemplateDisplayName] The display name of the Azure + * Resource Manager template that produced the environment. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DtlEnvironmentFragment + * + * @returns {object} metadata of DtlEnvironmentFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'DtlEnvironmentFragment', + type: { + name: 'Composite', + className: 'DtlEnvironmentFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + deploymentProperties: { + required: false, + serializedName: 'properties.deploymentProperties', + type: { + name: 'Composite', + className: 'EnvironmentDeploymentPropertiesFragment' + } + }, + armTemplateDisplayName: { + required: false, + serializedName: 'properties.armTemplateDisplayName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DtlEnvironmentFragment; diff --git a/lib/services/devTestLabs/lib/models/dtlEnvironmentList.js b/lib/services/devTestLabs/lib/models/dtlEnvironmentList.js new file mode 100644 index 0000000000..c392e2b80a --- /dev/null +++ b/lib/services/devTestLabs/lib/models/dtlEnvironmentList.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'; + +/** + * The response of a list operation. + */ +class DtlEnvironmentList extends Array { + /** + * Create a DtlEnvironmentList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DtlEnvironmentList + * + * @returns {object} metadata of DtlEnvironmentList + * + */ + mapper() { + return { + required: false, + serializedName: 'DtlEnvironmentList', + type: { + name: 'Composite', + className: 'DtlEnvironmentList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DtlEnvironmentElementType', + type: { + name: 'Composite', + className: 'DtlEnvironment' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DtlEnvironmentList; diff --git a/lib/services/devTestLabs/lib/models/environmentDeploymentProperties.js b/lib/services/devTestLabs/lib/models/environmentDeploymentProperties.js index ace71f5e92..ab5a70e5d2 100644 --- a/lib/services/devTestLabs/lib/models/environmentDeploymentProperties.js +++ b/lib/services/devTestLabs/lib/models/environmentDeploymentProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of an environment deployment. * diff --git a/lib/services/devTestLabs/lib/models/environmentDeploymentPropertiesFragment.js b/lib/services/devTestLabs/lib/models/environmentDeploymentPropertiesFragment.js new file mode 100644 index 0000000000..43d2b9be2a --- /dev/null +++ b/lib/services/devTestLabs/lib/models/environmentDeploymentPropertiesFragment.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'; + +/** + * Properties of an environment deployment. + * + */ +class EnvironmentDeploymentPropertiesFragment { + /** + * Create a EnvironmentDeploymentPropertiesFragment. + * @member {string} [armTemplateId] The Azure Resource Manager template's + * identifier. + * @member {array} [parameters] The parameters of the Azure Resource Manager + * template. + */ + constructor() { + } + + /** + * Defines the metadata of EnvironmentDeploymentPropertiesFragment + * + * @returns {object} metadata of EnvironmentDeploymentPropertiesFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'EnvironmentDeploymentPropertiesFragment', + type: { + name: 'Composite', + className: 'EnvironmentDeploymentPropertiesFragment', + modelProperties: { + armTemplateId: { + required: false, + serializedName: 'armTemplateId', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serializedName: 'parameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArmTemplateParameterPropertiesFragmentElementType', + type: { + name: 'Composite', + className: 'ArmTemplateParameterPropertiesFragment' + } + } + } + } + } + } + }; + } +} + +module.exports = EnvironmentDeploymentPropertiesFragment; diff --git a/lib/services/devTestLabs/lib/models/evaluatePoliciesProperties.js b/lib/services/devTestLabs/lib/models/evaluatePoliciesProperties.js index 0107de0aa4..6a452b4797 100644 --- a/lib/services/devTestLabs/lib/models/evaluatePoliciesProperties.js +++ b/lib/services/devTestLabs/lib/models/evaluatePoliciesProperties.js @@ -20,6 +20,8 @@ class EvaluatePoliciesProperties { * @member {string} [factName] The fact name. * @member {string} [factData] The fact data. * @member {string} [valueOffset] The value offset. + * @member {string} [userObjectId] The user for which policies will be + * evaluated */ constructor() { } @@ -58,6 +60,13 @@ class EvaluatePoliciesProperties { type: { name: 'String' } + }, + userObjectId: { + required: false, + serializedName: 'userObjectId', + type: { + name: 'String' + } } } } diff --git a/lib/services/devTestLabs/lib/models/evaluatePoliciesRequest.js b/lib/services/devTestLabs/lib/models/evaluatePoliciesRequest.js index e31f109816..0502fcb9b3 100644 --- a/lib/services/devTestLabs/lib/models/evaluatePoliciesRequest.js +++ b/lib/services/devTestLabs/lib/models/evaluatePoliciesRequest.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Request body for evaluating a policy set. * diff --git a/lib/services/devTestLabs/lib/models/evaluatePoliciesResponse.js b/lib/services/devTestLabs/lib/models/evaluatePoliciesResponse.js index bc2be159b9..e38f65a5f3 100644 --- a/lib/services/devTestLabs/lib/models/evaluatePoliciesResponse.js +++ b/lib/services/devTestLabs/lib/models/evaluatePoliciesResponse.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Response body for evaluating a policy set. * diff --git a/lib/services/devTestLabs/lib/models/formula.js b/lib/services/devTestLabs/lib/models/formula.js index 299d06f3d1..fbe29f5696 100644 --- a/lib/services/devTestLabs/lib/models/formula.js +++ b/lib/services/devTestLabs/lib/models/formula.js @@ -40,6 +40,8 @@ class Formula extends models['Resource'] { * creator of the virtual machine. * @member {date} [formulaContent.createdDate] The creation date of the * virtual machine. + * @member {string} [formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. * @member {string} [formulaContent.customImageId] The custom image * identifier of the virtual machine. * @member {string} [formulaContent.osType] The OS type of the virtual @@ -85,22 +87,8 @@ class Formula extends models['Resource'] { * of the gallery image. * @member {string} [formulaContent.galleryImageReference.version] The * version of the gallery image. - * @member {object} [formulaContent.computeVm] The compute virtual machine - * properties. - * @member {array} [formulaContent.computeVm.statuses] Gets the statuses of - * the virtual machine. - * @member {string} [formulaContent.computeVm.osType] Gets the OS type of the - * virtual machine. - * @member {string} [formulaContent.computeVm.vmSize] Gets the size of the - * virtual machine. - * @member {string} [formulaContent.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * @member {string} [formulaContent.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * @member {array} [formulaContent.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * @member {array} [formulaContent.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @member {string} [formulaContent.planId] The id of the plan associated + * with the virtual machine image * @member {object} [formulaContent.networkInterface] The network interface * properties. * @member {string} [formulaContent.networkInterface.virtualNetworkId] The @@ -127,130 +115,6 @@ class Formula extends models['Resource'] { * @member {array} * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules - * @member {object} [formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * @member {object} [formulaContent.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * @member {string} [formulaContent.applicableSchedule.labVmsShutdown.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} - * [formulaContent.applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * @member {date} - * [formulaContent.applicableSchedule.labVmsShutdown.createdDate] The - * creation date of the schedule. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [formulaContent.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource - * level. - * @member {string} [formulaContent.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] The - * time of day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} - * [formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The time zone - * ID (e.g. Pacific Standard time). - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * @member {date} - * [formulaContent.applicableSchedule.labVmsStartup.createdDate] The creation - * date of the schedule. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). * @member {date} [formulaContent.expirationDate] The expiration date for VM. * @member {boolean} [formulaContent.allowClaim] Indicates whether another * user can take ownership of the virtual machine @@ -261,10 +125,12 @@ class Formula extends models['Resource'] { * values include: 'FromCustomImage', 'FromGalleryImage' * @member {string} [formulaContent.environmentId] The resource ID of the * environment that contains this virtual machine, if any. - * @member {string} [formulaContent.provisioningState] The provisioning - * status of the resource. - * @member {string} [formulaContent.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @member {array} [formulaContent.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * @member {array} [formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * @member {string} [formulaContent.lastKnownPowerState] Last known compute + * power state captured in DTL * @member {string} [formulaContent.name] The name of the virtual machine or * environment * @member {string} [formulaContent.location] The location of the new virtual @@ -389,6 +255,7 @@ class Formula extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -396,6 +263,7 @@ class Formula extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/formulaFragment.js b/lib/services/devTestLabs/lib/models/formulaFragment.js new file mode 100644 index 0000000000..f1e729f15e --- /dev/null +++ b/lib/services/devTestLabs/lib/models/formulaFragment.js @@ -0,0 +1,218 @@ +/* + * 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'); + +/** + * A formula for creating a VM, specifying an image base and other parameters + * + * @extends models['UpdateResource'] + */ +class FormulaFragment extends models['UpdateResource'] { + /** + * Create a FormulaFragment. + * @member {string} [description] The description of the formula. + * @member {string} [author] The author of the formula. + * @member {string} [osType] The OS type of the formula. + * @member {object} [formulaContent] The content of the formula. + * @member {object} [formulaContent.bulkCreationParameters] The number of + * virtual machine instances to create. + * @member {number} [formulaContent.bulkCreationParameters.instanceCount] The + * number of virtual machine instances to create. + * @member {string} [formulaContent.notes] The notes of the virtual machine. + * @member {string} [formulaContent.ownerObjectId] The object identifier of + * the owner of the virtual machine. + * @member {string} [formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * @member {string} [formulaContent.createdByUserId] The object identifier of + * the creator of the virtual machine. + * @member {string} [formulaContent.createdByUser] The email address of + * creator of the virtual machine. + * @member {date} [formulaContent.createdDate] The creation date of the + * virtual machine. + * @member {string} [formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * @member {string} [formulaContent.customImageId] The custom image + * identifier of the virtual machine. + * @member {string} [formulaContent.osType] The OS type of the virtual + * machine. + * @member {string} [formulaContent.size] The size of the virtual machine. + * @member {string} [formulaContent.userName] The user name of the virtual + * machine. + * @member {string} [formulaContent.password] The password of the virtual + * machine administrator. + * @member {string} [formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * @member {boolean} [formulaContent.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * @member {string} [formulaContent.fqdn] The fully-qualified domain name of + * the virtual machine. + * @member {string} [formulaContent.labSubnetName] The lab subnet name of the + * virtual machine. + * @member {string} [formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * @member {boolean} [formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * @member {array} [formulaContent.artifacts] The artifacts to be installed + * on the virtual machine. + * @member {object} [formulaContent.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * @member {string} + * [formulaContent.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * @member {number} + * [formulaContent.artifactDeploymentStatus.artifactsApplied] The total count + * of the artifacts that were successfully applied. + * @member {number} [formulaContent.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * @member {object} [formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * @member {string} [formulaContent.galleryImageReference.offer] The offer of + * the gallery image. + * @member {string} [formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * @member {string} [formulaContent.galleryImageReference.sku] The SKU of the + * gallery image. + * @member {string} [formulaContent.galleryImageReference.osType] The OS type + * of the gallery image. + * @member {string} [formulaContent.galleryImageReference.version] The + * version of the gallery image. + * @member {string} [formulaContent.planId] The id of the plan associated + * with the virtual machine image + * @member {object} [formulaContent.networkInterface] The network interface + * properties. + * @member {string} [formulaContent.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. + * @member {string} [formulaContent.networkInterface.subnetId] The resource + * ID of the sub net. + * @member {string} [formulaContent.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. + * @member {string} [formulaContent.networkInterface.publicIpAddress] The + * public IP address. + * @member {string} [formulaContent.networkInterface.privateIpAddress] The + * private IP address. + * @member {string} [formulaContent.networkInterface.dnsName] The DNS name. + * @member {string} [formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * @member {string} [formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * @member {object} + * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * @member {array} + * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * @member {date} [formulaContent.expirationDate] The expiration date for VM. + * @member {boolean} [formulaContent.allowClaim] Indicates whether another + * user can take ownership of the virtual machine + * @member {string} [formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * @member {string} [formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * @member {string} [formulaContent.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. + * @member {array} [formulaContent.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * @member {array} [formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * @member {string} [formulaContent.lastKnownPowerState] Last known compute + * power state captured in DTL + * @member {string} [formulaContent.name] The name of the virtual machine or + * environment + * @member {string} [formulaContent.location] The location of the new virtual + * machine or environment + * @member {object} [formulaContent.tags] The tags of the resource. + * @member {object} [vm] Information about a VM from which a formula is to be + * created. + * @member {string} [vm.labVmId] The identifier of the VM from which a + * formula is to be created. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FormulaFragment + * + * @returns {object} metadata of FormulaFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'FormulaFragment', + type: { + name: 'Composite', + className: 'FormulaFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + author: { + required: false, + serializedName: 'properties.author', + type: { + name: 'String' + } + }, + osType: { + required: false, + serializedName: 'properties.osType', + type: { + name: 'String' + } + }, + formulaContent: { + required: false, + serializedName: 'properties.formulaContent', + type: { + name: 'Composite', + className: 'LabVirtualMachineCreationParameterFragment' + } + }, + vm: { + required: false, + serializedName: 'properties.vm', + type: { + name: 'Composite', + className: 'FormulaPropertiesFromVmFragment' + } + } + } + } + }; + } +} + +module.exports = FormulaFragment; diff --git a/lib/services/devTestLabs/lib/models/formulaList.js b/lib/services/devTestLabs/lib/models/formulaList.js new file mode 100644 index 0000000000..96b4c91ee9 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/formulaList.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'; + +/** + * The response of a list operation. + */ +class FormulaList extends Array { + /** + * Create a FormulaList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FormulaList + * + * @returns {object} metadata of FormulaList + * + */ + mapper() { + return { + required: false, + serializedName: 'FormulaList', + type: { + name: 'Composite', + className: 'FormulaList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FormulaElementType', + type: { + name: 'Composite', + className: 'Formula' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FormulaList; diff --git a/lib/services/devTestLabs/lib/models/formulaPropertiesFromVmFragment.js b/lib/services/devTestLabs/lib/models/formulaPropertiesFromVmFragment.js new file mode 100644 index 0000000000..ffdcaecd17 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/formulaPropertiesFromVmFragment.js @@ -0,0 +1,53 @@ +/* + * 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 about a VM from which a formula is to be created. + * + */ +class FormulaPropertiesFromVmFragment { + /** + * Create a FormulaPropertiesFromVmFragment. + * @member {string} [labVmId] The identifier of the VM from which a formula + * is to be created. + */ + constructor() { + } + + /** + * Defines the metadata of FormulaPropertiesFromVmFragment + * + * @returns {object} metadata of FormulaPropertiesFromVmFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'FormulaPropertiesFromVmFragment', + type: { + name: 'Composite', + className: 'FormulaPropertiesFromVmFragment', + modelProperties: { + labVmId: { + required: false, + serializedName: 'labVmId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FormulaPropertiesFromVmFragment; diff --git a/lib/services/devTestLabs/lib/models/galleryImage.js b/lib/services/devTestLabs/lib/models/galleryImage.js index 3541582343..e5b0b1f4a7 100644 --- a/lib/services/devTestLabs/lib/models/galleryImage.js +++ b/lib/services/devTestLabs/lib/models/galleryImage.js @@ -35,6 +35,9 @@ class GalleryImage extends models['Resource'] { * @member {string} [icon] The icon of the gallery image. * @member {boolean} [enabled] Indicates whether this gallery image is * enabled. + * @member {string} [planId] The third party plan that applies to this image + * @member {boolean} [isPlanAuthorized] Indicates if the plan has been + * authorized for programmatic deployment. */ constructor() { super(); @@ -142,6 +145,20 @@ class GalleryImage extends models['Resource'] { type: { name: 'Boolean' } + }, + planId: { + required: false, + serializedName: 'properties.planId', + type: { + name: 'String' + } + }, + isPlanAuthorized: { + required: false, + serializedName: 'properties.isPlanAuthorized', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/devTestLabs/lib/models/galleryImageList.js b/lib/services/devTestLabs/lib/models/galleryImageList.js new file mode 100644 index 0000000000..7900c1a0ac --- /dev/null +++ b/lib/services/devTestLabs/lib/models/galleryImageList.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'; + +/** + * The response of a list operation. + */ +class GalleryImageList extends Array { + /** + * Create a GalleryImageList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageList + * + * @returns {object} metadata of GalleryImageList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageList', + type: { + name: 'Composite', + className: 'GalleryImageList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryImageElementType', + type: { + name: 'Composite', + className: 'GalleryImage' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageList; diff --git a/lib/services/devTestLabs/lib/models/generateArmTemplateRequest.js b/lib/services/devTestLabs/lib/models/generateArmTemplateRequest.js index 4d8d205b16..35ca4fb892 100644 --- a/lib/services/devTestLabs/lib/models/generateArmTemplateRequest.js +++ b/lib/services/devTestLabs/lib/models/generateArmTemplateRequest.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Parameters for generating an ARM template for deploying artifacts. * diff --git a/lib/services/devTestLabs/lib/models/importLabVirtualMachineRequest.js b/lib/services/devTestLabs/lib/models/importLabVirtualMachineRequest.js new file mode 100644 index 0000000000..aa193ac3e0 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/importLabVirtualMachineRequest.js @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This represents the payload required to import a virtual machine from a + * different lab into the current one + * + */ +class ImportLabVirtualMachineRequest { + /** + * Create a ImportLabVirtualMachineRequest. + * @member {string} [sourceVirtualMachineResourceId] The full resource ID of + * the virtual machine to be imported. + * @member {string} [destinationVirtualMachineName] The name of the virtual + * machine in the destination lab + */ + constructor() { + } + + /** + * Defines the metadata of ImportLabVirtualMachineRequest + * + * @returns {object} metadata of ImportLabVirtualMachineRequest + * + */ + mapper() { + return { + required: false, + serializedName: 'ImportLabVirtualMachineRequest', + type: { + name: 'Composite', + className: 'ImportLabVirtualMachineRequest', + modelProperties: { + sourceVirtualMachineResourceId: { + required: false, + serializedName: 'sourceVirtualMachineResourceId', + type: { + name: 'String' + } + }, + destinationVirtualMachineName: { + required: false, + serializedName: 'destinationVirtualMachineName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ImportLabVirtualMachineRequest; diff --git a/lib/services/devTestLabs/lib/models/index.d.ts b/lib/services/devTestLabs/lib/models/index.d.ts index 0ef3f417ca..9924323616 100644 --- a/lib/services/devTestLabs/lib/models/index.d.ts +++ b/lib/services/devTestLabs/lib/models/index.d.ts @@ -62,16 +62,22 @@ export interface HourDetails { * Notification settings for a schedule. * * @member {string} [status] If notifications are enabled for this schedule - * (i.e. Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' + * (i.e. Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' * @member {number} [timeInMinutes] Time in minutes before event at which * notification will be sent. * @member {string} [webhookUrl] The webhook URL to which the notification will * be sent. + * @member {string} [emailRecipient] The email recipient to send notifications + * to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). */ export interface NotificationSettings { status?: string; timeInMinutes?: number; webhookUrl?: string; + emailRecipient?: string; + notificationLocale?: string; } /** @@ -122,11 +128,16 @@ export interface Resource extends BaseResource { * @member {object} [notificationSettings] Notification settings. * @member {string} [notificationSettings.status] If notifications are enabled * for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * @member {number} [notificationSettings.timeInMinutes] Time in minutes before * event at which notification will be sent. * @member {string} [notificationSettings.webhookUrl] The webhook URL to which * the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). * @member {date} [createdDate] The creation date of the schedule. * @member {string} [targetResourceId] The resource ID to which the schedule * belongs @@ -145,8 +156,8 @@ export interface Schedule extends Resource { notificationSettings?: NotificationSettings; readonly createdDate?: Date; targetResourceId?: string; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -182,11 +193,17 @@ export interface Schedule extends Resource { * settings. * @member {string} [labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsShutdown.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. * @member {string} [labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [labVmsShutdown.createdDate] The creation date of the * schedule. * @member {string} [labVmsShutdown.targetResourceId] The resource ID to which @@ -220,11 +237,17 @@ export interface Schedule extends Resource { * @member {object} [labVmsStartup.notificationSettings] Notification settings. * @member {string} [labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsStartup.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. * @member {string} [labVmsStartup.notificationSettings.webhookUrl] The webhook * URL to which the notification will be sent. + * @member {string} [labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsStartup.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [labVmsStartup.createdDate] The creation date of the * schedule. * @member {string} [labVmsStartup.targetResourceId] The resource ID to which @@ -285,16 +308,34 @@ export interface HourDetailsFragment { * Notification settings for a schedule. * * @member {string} [status] If notifications are enabled for this schedule - * (i.e. Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' + * (i.e. Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' * @member {number} [timeInMinutes] Time in minutes before event at which * notification will be sent. * @member {string} [webhookUrl] The webhook URL to which the notification will * be sent. + * @member {string} [emailRecipient] The email recipient to send notifications + * to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). */ export interface NotificationSettingsFragment { status?: string; timeInMinutes?: number; webhookUrl?: string; + emailRecipient?: string; + notificationLocale?: string; +} + +/** + * @class + * Initializes a new instance of the UpdateResource class. + * @constructor + * Represents an update resource + * + * @member {object} [tags] The tags of the resource. + */ +export interface UpdateResource { + tags?: { [propertyName: string]: string }; } /** @@ -325,19 +366,20 @@ export interface NotificationSettingsFragment { * @member {object} [notificationSettings] Notification settings. * @member {string} [notificationSettings.status] If notifications are enabled * for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * @member {number} [notificationSettings.timeInMinutes] Time in minutes before * event at which notification will be sent. * @member {string} [notificationSettings.webhookUrl] The webhook URL to which * the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). * @member {string} [targetResourceId] The resource ID to which the schedule * belongs - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface ScheduleFragment extends Resource { +export interface ScheduleFragment extends UpdateResource { status?: string; taskType?: string; weeklyRecurrence?: WeekDetailsFragment; @@ -346,8 +388,6 @@ export interface ScheduleFragment extends Resource { timeZoneId?: string; notificationSettings?: NotificationSettingsFragment; targetResourceId?: string; - provisioningState?: string; - uniqueIdentifier?: string; } /** @@ -383,17 +423,19 @@ export interface ScheduleFragment extends Resource { * settings. * @member {string} [labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsShutdown.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. * @member {string} [labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} [labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {string} [labVmsShutdown.targetResourceId] The resource ID to which * the schedule belongs - * @member {string} [labVmsShutdown.provisioningState] The provisioning status - * of the resource. - * @member {string} [labVmsShutdown.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). * @member {object} [labVmsStartup] The auto-startup schedule, if one has been * set at the lab or lab resource level. * @member {string} [labVmsStartup.status] The status of the schedule (i.e. @@ -419,19 +461,21 @@ export interface ScheduleFragment extends Resource { * @member {object} [labVmsStartup.notificationSettings] Notification settings. * @member {string} [labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} [labVmsStartup.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. * @member {string} [labVmsStartup.notificationSettings.webhookUrl] The webhook * URL to which the notification will be sent. + * @member {string} [labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} [labVmsStartup.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {string} [labVmsStartup.targetResourceId] The resource ID to which * the schedule belongs - * @member {string} [labVmsStartup.provisioningState] The provisioning status - * of the resource. - * @member {string} [labVmsStartup.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). */ -export interface ApplicableScheduleFragment extends Resource { +export interface ApplicableScheduleFragment extends UpdateResource { labVmsShutdown?: ScheduleFragment; labVmsStartup?: ScheduleFragment; } @@ -457,6 +501,7 @@ export interface ArtifactParameterProperties { * Properties of an artifact. * * @member {string} [artifactId] The artifact's identifier. + * @member {string} [artifactTitle] The artifact's title. * @member {array} [parameters] The parameters of the artifact. * @member {string} [status] The status of the artifact. * @member {string} [deploymentStatusMessage] The status message from the @@ -468,6 +513,7 @@ export interface ArtifactParameterProperties { */ export interface ArtifactInstallProperties { artifactId?: string; + artifactTitle?: string; parameters?: ArtifactParameterProperties[]; status?: string; deploymentStatusMessage?: string; @@ -515,6 +561,8 @@ export interface ParametersValueFileInfo { * @member {date} [createdDate] The creation date of the armTemplate. * @member {array} [parametersValueFilesInfo] File name and parameter values * information from all azuredeploy.*.parameters.json for the ARM template. + * @member {boolean} [enabled] Whether or not ARM template is enabled for use + * by lab user. */ export interface ArmTemplate extends Resource { readonly displayName?: string; @@ -524,6 +572,7 @@ export interface ArmTemplate extends Resource { readonly contents?: any; readonly createdDate?: Date; readonly parametersValueFilesInfo?: ParametersValueFileInfo[]; + readonly enabled?: boolean; } /** @@ -554,6 +603,20 @@ export interface ArmTemplateParameterProperties { value?: string; } +/** + * @class + * Initializes a new instance of the ArmTemplateParameterPropertiesFragment class. + * @constructor + * Properties of an Azure Resource Manager template parameter. + * + * @member {string} [name] The name of the template parameter. + * @member {string} [value] The value of the template parameter. + */ +export interface ArmTemplateParameterPropertiesFragment { + name?: string; + value?: string; +} + /** * @class * Initializes a new instance of the Artifact class. @@ -637,6 +700,7 @@ export interface ArtifactParameterPropertiesFragment { * Properties of an artifact. * * @member {string} [artifactId] The artifact's identifier. + * @member {string} [artifactTitle] The artifact's title. * @member {array} [parameters] The parameters of the artifact. * @member {string} [status] The status of the artifact. * @member {string} [deploymentStatusMessage] The status message from the @@ -648,6 +712,7 @@ export interface ArtifactParameterPropertiesFragment { */ export interface ArtifactInstallPropertiesFragment { artifactId?: string; + artifactTitle?: string; parameters?: ArtifactParameterPropertiesFragment[]; status?: string; deploymentStatusMessage?: string; @@ -689,8 +754,8 @@ export interface ArtifactSource extends Resource { securityToken?: string; status?: string; readonly createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -711,12 +776,8 @@ export interface ArtifactSource extends Resource { * artifact source. * @member {string} [status] Indicates if the artifact source is enabled * (values: Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface ArtifactSourceFragment extends Resource { +export interface ArtifactSourceFragment extends UpdateResource { displayName?: string; uri?: string; sourceType?: string; @@ -725,8 +786,6 @@ export interface ArtifactSourceFragment extends Resource { branchRef?: string; securityToken?: string; status?: string; - provisioningState?: string; - uniqueIdentifier?: string; } /** @@ -759,6 +818,23 @@ export interface AttachNewDataDiskOptions { diskType?: string; } +/** + * @class + * Initializes a new instance of the AttachNewDataDiskOptionsFragment class. + * @constructor + * Properties to attach new disk to the Virtual Machine. + * + * @member {number} [diskSizeGiB] Size of the disk to be attached in GibiBytes. + * @member {string} [diskName] The name of the disk to be attached. + * @member {string} [diskType] The storage type for the disk (i.e. Standard, + * Premium). Possible values include: 'Standard', 'Premium' + */ +export interface AttachNewDataDiskOptionsFragment { + diskSizeGiB?: number; + diskName?: string; + diskType?: string; +} + /** * @class * Initializes a new instance of the BulkCreationParameters class. @@ -772,6 +848,19 @@ export interface BulkCreationParameters { instanceCount?: number; } +/** + * @class + * Initializes a new instance of the BulkCreationParametersFragment class. + * @constructor + * Parameters for creating multiple virtual machines as a single action. + * + * @member {number} [instanceCount] The number of virtual machine instances to + * create. + */ +export interface BulkCreationParametersFragment { + instanceCount?: number; +} + /** * @class * Initializes a new instance of the ComputeDataDisk class. @@ -1007,6 +1096,39 @@ export interface CustomImagePropertiesCustom { osType: string; } +/** + * @class + * Initializes a new instance of the DataDiskStorageTypeInfo class. + * @constructor + * Storage information about the data disks present in the custom image + * + * @member {string} [lun] Disk Lun + * @member {string} [storageType] Disk Storage Type. Possible values include: + * 'Standard', 'Premium' + */ +export interface DataDiskStorageTypeInfo { + lun?: string; + storageType?: string; +} + +/** + * @class + * Initializes a new instance of the CustomImagePropertiesFromPlan class. + * @constructor + * Properties for plan on a custom image. + * + * @member {string} [id] The id of the plan, equivalent to name of the plan + * @member {string} [publisher] The publisher for the plan from the marketplace + * image the custom image is derived from + * @member {string} [offer] The offer for the plan from the marketplace image + * the custom image is derived from + */ +export interface CustomImagePropertiesFromPlan { + id?: string; + publisher?: string; + offer?: string; +} + /** * @class * Initializes a new instance of the CustomImage class. @@ -1036,6 +1158,20 @@ export interface CustomImagePropertiesCustom { * @member {date} [creationDate] The creation date of the custom image. * @member {string} [managedImageId] The Managed Image Id backing the custom * image. + * @member {string} [managedSnapshotId] The Managed Snapshot Id backing the + * custom image. + * @member {array} [dataDiskStorageInfo] Storage information about the data + * disks present in the custom image + * @member {object} [customImagePlan] Storage information about the plan + * related to this custom image + * @member {string} [customImagePlan.id] The id of the plan, equivalent to name + * of the plan + * @member {string} [customImagePlan.publisher] The publisher for the plan from + * the marketplace image the custom image is derived from + * @member {string} [customImagePlan.offer] The offer for the plan from the + * marketplace image the custom image is derived from + * @member {boolean} [isPlanAuthorized] Whether or not the custom images + * underlying offer/plan has been enabled for programmatic deployment * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -1048,8 +1184,168 @@ export interface CustomImage extends Resource { author?: string; readonly creationDate?: Date; managedImageId?: string; - provisioningState?: string; - uniqueIdentifier?: string; + managedSnapshotId?: string; + dataDiskStorageInfo?: DataDiskStorageTypeInfo[]; + customImagePlan?: CustomImagePropertiesFromPlan; + isPlanAuthorized?: boolean; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the WindowsOsInfoFragment class. + * @constructor + * Information about a Windows OS. + * + * @member {string} [windowsOsState] The state of the Windows OS (i.e. + * NonSysprepped, SysprepRequested, SysprepApplied). Possible values include: + * 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + */ +export interface WindowsOsInfoFragment { + windowsOsState?: string; +} + +/** + * @class + * Initializes a new instance of the LinuxOsInfoFragment class. + * @constructor + * Information about a Linux OS. + * + * @member {string} [linuxOsState] The state of the Linux OS (i.e. + * NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible values + * include: 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + */ +export interface LinuxOsInfoFragment { + linuxOsState?: string; +} + +/** + * @class + * Initializes a new instance of the CustomImagePropertiesFromVmFragment class. + * @constructor + * Properties for creating a custom image from a virtual machine. + * + * @member {string} [sourceVmId] The source vm identifier. + * @member {object} [windowsOsInfo] The Windows OS information of the VM. + * @member {string} [windowsOsInfo.windowsOsState] The state of the Windows OS + * (i.e. NonSysprepped, SysprepRequested, SysprepApplied). Possible values + * include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + * @member {object} [linuxOsInfo] The Linux OS information of the VM. + * @member {string} [linuxOsInfo.linuxOsState] The state of the Linux OS (i.e. + * NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible values + * include: 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + */ +export interface CustomImagePropertiesFromVmFragment { + sourceVmId?: string; + windowsOsInfo?: WindowsOsInfoFragment; + linuxOsInfo?: LinuxOsInfoFragment; +} + +/** + * @class + * Initializes a new instance of the CustomImagePropertiesCustomFragment class. + * @constructor + * Properties for creating a custom image from a VHD. + * + * @member {string} [imageName] The image name. + * @member {boolean} [sysPrep] Indicates whether sysprep has been run on the + * VHD. + * @member {string} [osType] The OS type of the custom image (i.e. Windows, + * Linux). Possible values include: 'Windows', 'Linux', 'None' + */ +export interface CustomImagePropertiesCustomFragment { + imageName?: string; + sysPrep?: boolean; + osType?: string; +} + +/** + * @class + * Initializes a new instance of the DataDiskStorageTypeInfoFragment class. + * @constructor + * Storage information about the data disks present in the custom image + * + * @member {string} [lun] Disk Lun + * @member {string} [storageType] Disk Storage Type. Possible values include: + * 'Standard', 'Premium' + */ +export interface DataDiskStorageTypeInfoFragment { + lun?: string; + storageType?: string; +} + +/** + * @class + * Initializes a new instance of the CustomImagePropertiesFromPlanFragment class. + * @constructor + * Properties for plan on a custom image. + * + * @member {string} [id] The id of the plan, equivalent to name of the plan + * @member {string} [publisher] The publisher for the plan from the marketplace + * image the custom image is derived from + * @member {string} [offer] The offer for the plan from the marketplace image + * the custom image is derived from + */ +export interface CustomImagePropertiesFromPlanFragment { + id?: string; + publisher?: string; + offer?: string; +} + +/** + * @class + * Initializes a new instance of the CustomImageFragment class. + * @constructor + * A custom image. + * + * @member {object} [vm] The virtual machine from which the image is to be + * created. + * @member {string} [vm.sourceVmId] The source vm identifier. + * @member {object} [vm.windowsOsInfo] The Windows OS information of the VM. + * @member {string} [vm.windowsOsInfo.windowsOsState] The state of the Windows + * OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). Possible values + * include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + * @member {object} [vm.linuxOsInfo] The Linux OS information of the VM. + * @member {string} [vm.linuxOsInfo.linuxOsState] The state of the Linux OS + * (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible + * values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * @member {object} [vhd] The VHD from which the image is to be created. + * @member {string} [vhd.imageName] The image name. + * @member {boolean} [vhd.sysPrep] Indicates whether sysprep has been run on + * the VHD. + * @member {string} [vhd.osType] The OS type of the custom image (i.e. Windows, + * Linux). Possible values include: 'Windows', 'Linux', 'None' + * @member {string} [description] The description of the custom image. + * @member {string} [author] The author of the custom image. + * @member {string} [managedImageId] The Managed Image Id backing the custom + * image. + * @member {string} [managedSnapshotId] The Managed Snapshot Id backing the + * custom image. + * @member {array} [dataDiskStorageInfo] Storage information about the data + * disks present in the custom image + * @member {object} [customImagePlan] Storage information about the plan + * related to this custom image + * @member {string} [customImagePlan.id] The id of the plan, equivalent to name + * of the plan + * @member {string} [customImagePlan.publisher] The publisher for the plan from + * the marketplace image the custom image is derived from + * @member {string} [customImagePlan.offer] The offer for the plan from the + * marketplace image the custom image is derived from + * @member {boolean} [isPlanAuthorized] Whether or not the custom images + * underlying offer/plan has been enabled for programmatic deployment + */ +export interface CustomImageFragment extends UpdateResource { + vm?: CustomImagePropertiesFromVmFragment; + vhd?: CustomImagePropertiesCustomFragment; + description?: string; + author?: string; + managedImageId?: string; + managedSnapshotId?: string; + dataDiskStorageInfo?: DataDiskStorageTypeInfoFragment[]; + customImagePlan?: CustomImagePropertiesFromPlanFragment; + isPlanAuthorized?: boolean; } /** @@ -1079,6 +1375,33 @@ export interface DataDiskProperties { hostCaching?: string; } +/** + * @class + * Initializes a new instance of the DataDiskPropertiesFragment class. + * @constructor + * Request body for adding a new or existing data disk to a virtual machine. + * + * @member {object} [attachNewDataDiskOptions] Specifies options to attach a + * new disk to the virtual machine. + * @member {number} [attachNewDataDiskOptions.diskSizeGiB] Size of the disk to + * be attached in GibiBytes. + * @member {string} [attachNewDataDiskOptions.diskName] The name of the disk to + * be attached. + * @member {string} [attachNewDataDiskOptions.diskType] The storage type for + * the disk (i.e. Standard, Premium). Possible values include: 'Standard', + * 'Premium' + * @member {string} [existingLabDiskId] Specifies the existing lab disk id to + * attach to virtual machine. + * @member {string} [hostCaching] Caching option for a data disk (i.e. None, + * ReadOnly, ReadWrite). Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + */ +export interface DataDiskPropertiesFragment { + attachNewDataDiskOptions?: AttachNewDataDiskOptionsFragment; + existingLabDiskId?: string; + hostCaching?: string; +} + /** * @class * Initializes a new instance of the DetachDataDiskProperties class. @@ -1139,8 +1462,38 @@ export interface Disk extends Resource { readonly createdDate?: Date; hostCaching?: string; managedDiskId?: string; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the DiskFragment class. + * @constructor + * A Disk. + * + * @member {string} [diskType] The storage type for the disk (i.e. Standard, + * Premium). Possible values include: 'Standard', 'Premium' + * @member {number} [diskSizeGiB] The size of the disk in GibiBytes. + * @member {string} [leasedByLabVmId] The resource ID of the VM to which this + * disk is leased. + * @member {string} [diskBlobName] When backed by a blob, the name of the VHD + * blob without extension. + * @member {string} [diskUri] When backed by a blob, the URI of underlying + * blob. + * @member {string} [hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * @member {string} [managedDiskId] When backed by managed disk, this is the ID + * of the compute disk resource. + */ +export interface DiskFragment extends UpdateResource { + diskType?: string; + diskSizeGiB?: number; + leasedByLabVmId?: string; + diskBlobName?: string; + diskUri?: string; + hostCaching?: string; + managedDiskId?: string; } /** @@ -1186,24 +1539,63 @@ export interface DtlEnvironment extends Resource { armTemplateDisplayName?: string; readonly resourceGroupId?: string; readonly createdByUser?: string; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** * @class - * Initializes a new instance of the EvaluatePoliciesProperties class. + * Initializes a new instance of the EnvironmentDeploymentPropertiesFragment class. * @constructor - * Properties for evaluating a policy set. + * Properties of an environment deployment. * - * @member {string} [factName] The fact name. - * @member {string} [factData] The fact data. - * @member {string} [valueOffset] The value offset. + * @member {string} [armTemplateId] The Azure Resource Manager template's + * identifier. + * @member {array} [parameters] The parameters of the Azure Resource Manager + * template. */ -export interface EvaluatePoliciesProperties { - factName?: string; +export interface EnvironmentDeploymentPropertiesFragment { + armTemplateId?: string; + parameters?: ArmTemplateParameterPropertiesFragment[]; +} + +/** + * @class + * Initializes a new instance of the DtlEnvironmentFragment class. + * @constructor + * An environment, which is essentially an ARM template deployment. + * + * @member {object} [deploymentProperties] The deployment properties of the + * environment. + * @member {string} [deploymentProperties.armTemplateId] The Azure Resource + * Manager template's identifier. + * @member {array} [deploymentProperties.parameters] The parameters of the + * Azure Resource Manager template. + * @member {string} [armTemplateDisplayName] The display name of the Azure + * Resource Manager template that produced the environment. + */ +export interface DtlEnvironmentFragment extends UpdateResource { + deploymentProperties?: EnvironmentDeploymentPropertiesFragment; + armTemplateDisplayName?: string; +} + +/** + * @class + * Initializes a new instance of the EvaluatePoliciesProperties class. + * @constructor + * Properties for evaluating a policy set. + * + * @member {string} [factName] The fact name. + * @member {string} [factData] The fact data. + * @member {string} [valueOffset] The value offset. + * @member {string} [userObjectId] The user for which policies will be + * evaluated + */ +export interface EvaluatePoliciesProperties { + factName?: string; factData?: string; valueOffset?: string; + userObjectId?: string; } /** @@ -1421,6 +1813,65 @@ export interface NetworkInterfaceProperties { sharedPublicIpAddressConfiguration?: SharedPublicIpAddressConfiguration; } +/** + * @class + * Initializes a new instance of the ScheduleCreationParameter class. + * @constructor + * Properties for creating a schedule. + * + * @member {string} [status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * @member {string} [taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [weeklyRecurrence] If the schedule will occur only some + * days of the week, specify the weekly recurrence. + * @member {array} [weeklyRecurrence.weekdays] The days of the week for which + * the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * @member {string} [weeklyRecurrence.time] The time of the day the schedule + * will occur. + * @member {object} [dailyRecurrence] If the schedule will occur once each day + * of the week, specify the daily recurrence. + * @member {string} [dailyRecurrence.time] The time of day the schedule will + * occur. + * @member {object} [hourlyRecurrence] If the schedule will occur multiple + * times a day, specify the hourly recurrence. + * @member {number} [hourlyRecurrence.minute] Minutes of the hour the schedule + * will run. + * @member {string} [timeZoneId] The time zone ID (e.g. Pacific Standard time). + * @member {object} [notificationSettings] Notification settings. + * @member {string} [notificationSettings.status] If notifications are enabled + * for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * @member {number} [notificationSettings.timeInMinutes] Time in minutes before + * event at which notification will be sent. + * @member {string} [notificationSettings.webhookUrl] The webhook URL to which + * the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * @member {string} [targetResourceId] The resource ID to which the schedule + * belongs + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ +export interface ScheduleCreationParameter { + status?: string; + taskType?: string; + weeklyRecurrence?: WeekDetails; + dailyRecurrence?: DayDetails; + hourlyRecurrence?: HourDetails; + timeZoneId?: string; + notificationSettings?: NotificationSettings; + targetResourceId?: string; + name?: string; + location?: string; + tags?: { [propertyName: string]: string }; +} + /** * @class * Initializes a new instance of the LabVirtualMachineCreationParameter class. @@ -1441,6 +1892,8 @@ export interface NetworkInterfaceProperties { * @member {string} [createdByUser] The email address of creator of the virtual * machine. * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) of + * the virtual machine. * @member {string} [customImageId] The custom image identifier of the virtual * machine. * @member {string} [osType] The OS type of the virtual machine. @@ -1479,19 +1932,8 @@ export interface NetworkInterfaceProperties { * image. * @member {string} [galleryImageReference.version] The version of the gallery * image. - * @member {object} [computeVm] The compute virtual machine properties. - * @member {array} [computeVm.statuses] Gets the statuses of the virtual - * machine. - * @member {string} [computeVm.osType] Gets the OS type of the virtual machine. - * @member {string} [computeVm.vmSize] Gets the size of the virtual machine. - * @member {string} [computeVm.networkInterfaceId] Gets the network interface - * ID of the virtual machine. - * @member {string} [computeVm.osDiskId] Gets OS disk blob uri for the virtual - * machine. - * @member {array} [computeVm.dataDiskIds] Gets data disks blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDisks] Gets all data disks attached to the - * virtual machine. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [networkInterface] The network interface properties. * @member {string} [networkInterface.virtualNetworkId] The resource ID of the * virtual network. @@ -1513,98 +1955,447 @@ export interface NetworkInterfaceProperties { * @member {array} * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The * incoming NAT rules - * @member {object} [applicableSchedule] The applicable schedule for the + * @member {date} [expirationDate] The expiration date for VM. + * @member {boolean} [allowClaim] Indicates whether another user can take + * ownership of the virtual machine + * @member {string} [storageType] Storage type to use for virtual machine (i.e. + * Standard, Premium). + * @member {string} [virtualMachineCreationSource] Tells source of creation of + * lab virtual machine. Output property only. Possible values include: + * 'FromCustomImage', 'FromGalleryImage' + * @member {string} [environmentId] The resource ID of the environment that + * contains this virtual machine, if any. + * @member {array} [dataDiskParameters] New or existing data disks to attach to + * the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ +export interface LabVirtualMachineCreationParameter { + bulkCreationParameters?: BulkCreationParameters; + notes?: string; + ownerObjectId?: string; + ownerUserPrincipalName?: string; + createdByUserId?: string; + createdByUser?: string; + createdDate?: Date; + computeId?: string; + customImageId?: string; + osType?: string; + size?: string; + userName?: string; + password?: string; + sshKey?: string; + isAuthenticationWithSshKey?: boolean; + fqdn?: string; + labSubnetName?: string; + labVirtualNetworkId?: string; + disallowPublicIpAddress?: boolean; + artifacts?: ArtifactInstallProperties[]; + artifactDeploymentStatus?: ArtifactDeploymentStatusProperties; + galleryImageReference?: GalleryImageReference; + planId?: string; + networkInterface?: NetworkInterfaceProperties; + expirationDate?: Date; + allowClaim?: boolean; + storageType?: string; + virtualMachineCreationSource?: string; + environmentId?: string; + dataDiskParameters?: DataDiskProperties[]; + scheduleParameters?: ScheduleCreationParameter[]; + lastKnownPowerState?: string; + name?: string; + location?: string; + tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the FormulaPropertiesFromVm class. + * @constructor + * Information about a VM from which a formula is to be created. + * + * @member {string} [labVmId] The identifier of the VM from which a formula is + * to be created. + */ +export interface FormulaPropertiesFromVm { + labVmId?: string; +} + +/** + * @class + * Initializes a new instance of the Formula class. + * @constructor + * A formula for creating a VM, specifying an image base and other parameters + * + * @member {string} [description] The description of the formula. + * @member {string} [author] The author of the formula. + * @member {string} [osType] The OS type of the formula. + * @member {date} [creationDate] The creation date of the formula. + * @member {object} [formulaContent] The content of the formula. + * @member {object} [formulaContent.bulkCreationParameters] The number of + * virtual machine instances to create. + * @member {number} [formulaContent.bulkCreationParameters.instanceCount] The + * number of virtual machine instances to create. + * @member {string} [formulaContent.notes] The notes of the virtual machine. + * @member {string} [formulaContent.ownerObjectId] The object identifier of the + * owner of the virtual machine. + * @member {string} [formulaContent.ownerUserPrincipalName] The user principal + * name of the virtual machine owner. + * @member {string} [formulaContent.createdByUserId] The object identifier of + * the creator of the virtual machine. + * @member {string} [formulaContent.createdByUser] The email address of creator + * of the virtual machine. + * @member {date} [formulaContent.createdDate] The creation date of the virtual + * machine. + * @member {string} [formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * @member {string} [formulaContent.customImageId] The custom image identifier + * of the virtual machine. + * @member {string} [formulaContent.osType] The OS type of the virtual machine. + * @member {string} [formulaContent.size] The size of the virtual machine. + * @member {string} [formulaContent.userName] The user name of the virtual + * machine. + * @member {string} [formulaContent.password] The password of the virtual + * machine administrator. + * @member {string} [formulaContent.sshKey] The SSH key of the virtual machine + * administrator. + * @member {boolean} [formulaContent.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * @member {string} [formulaContent.fqdn] The fully-qualified domain name of + * the virtual machine. + * @member {string} [formulaContent.labSubnetName] The lab subnet name of the * virtual machine. - * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsShutdown.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The creation - * date of the schedule. - * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [applicableSchedule.labVmsStartup] The auto-startup - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsStartup.status] The status of the - * schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] The - * time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time zone - * ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation - * date of the schedule. - * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @member {string} [formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * @member {boolean} [formulaContent.disallowPublicIpAddress] Indicates whether + * the virtual machine is to be created without a public IP address. + * @member {array} [formulaContent.artifacts] The artifacts to be installed on + * the virtual machine. + * @member {object} [formulaContent.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * @member {string} [formulaContent.artifactDeploymentStatus.deploymentStatus] + * The deployment status of the artifact. + * @member {number} [formulaContent.artifactDeploymentStatus.artifactsApplied] + * The total count of the artifacts that were successfully applied. + * @member {number} [formulaContent.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * @member {object} [formulaContent.galleryImageReference] The Microsoft Azure + * Marketplace image reference of the virtual machine. + * @member {string} [formulaContent.galleryImageReference.offer] The offer of + * the gallery image. + * @member {string} [formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * @member {string} [formulaContent.galleryImageReference.sku] The SKU of the + * gallery image. + * @member {string} [formulaContent.galleryImageReference.osType] The OS type + * of the gallery image. + * @member {string} [formulaContent.galleryImageReference.version] The version + * of the gallery image. + * @member {string} [formulaContent.planId] The id of the plan associated with + * the virtual machine image + * @member {object} [formulaContent.networkInterface] The network interface + * properties. + * @member {string} [formulaContent.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. + * @member {string} [formulaContent.networkInterface.subnetId] The resource ID + * of the sub net. + * @member {string} [formulaContent.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. + * @member {string} [formulaContent.networkInterface.publicIpAddress] The + * public IP address. + * @member {string} [formulaContent.networkInterface.privateIpAddress] The + * private IP address. + * @member {string} [formulaContent.networkInterface.dnsName] The DNS name. + * @member {string} [formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * @member {string} [formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * @member {object} + * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * @member {array} + * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * @member {date} [formulaContent.expirationDate] The expiration date for VM. + * @member {boolean} [formulaContent.allowClaim] Indicates whether another user + * can take ownership of the virtual machine + * @member {string} [formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * @member {string} [formulaContent.virtualMachineCreationSource] Tells source + * of creation of lab virtual machine. Output property only. Possible values + * include: 'FromCustomImage', 'FromGalleryImage' + * @member {string} [formulaContent.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. + * @member {array} [formulaContent.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * @member {array} [formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * @member {string} [formulaContent.lastKnownPowerState] Last known compute + * power state captured in DTL + * @member {string} [formulaContent.name] The name of the virtual machine or + * environment + * @member {string} [formulaContent.location] The location of the new virtual + * machine or environment + * @member {object} [formulaContent.tags] The tags of the resource. + * @member {object} [vm] Information about a VM from which a formula is to be + * created. + * @member {string} [vm.labVmId] The identifier of the VM from which a formula + * is to be created. + * @member {string} [provisioningState] The provisioning status of the + * resource. + * @member {string} [uniqueIdentifier] The unique immutable identifier of a + * resource (Guid). + */ +export interface Formula extends Resource { + description?: string; + author?: string; + osType?: string; + readonly creationDate?: Date; + formulaContent?: LabVirtualMachineCreationParameter; + vm?: FormulaPropertiesFromVm; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the GalleryImageReferenceFragment class. + * @constructor + * The reference information for an Azure Marketplace image. + * + * @member {string} [offer] The offer of the gallery image. + * @member {string} [publisher] The publisher of the gallery image. + * @member {string} [sku] The SKU of the gallery image. + * @member {string} [osType] The OS type of the gallery image. + * @member {string} [version] The version of the gallery image. + */ +export interface GalleryImageReferenceFragment { + offer?: string; + publisher?: string; + sku?: string; + osType?: string; + version?: string; +} + +/** + * @class + * Initializes a new instance of the InboundNatRuleFragment class. + * @constructor + * A rule for NAT - exposing a VM's port (backendPort) on the public IP address + * using a load balancer. + * + * @member {string} [transportProtocol] The transport protocol for the + * endpoint. Possible values include: 'Tcp', 'Udp' + * @member {number} [frontendPort] The external endpoint port of the inbound + * connection. Possible values range between 1 and 65535, inclusive. If + * unspecified, a value will be allocated automatically. + * @member {number} [backendPort] The port to which the external traffic will + * be redirected. + */ +export interface InboundNatRuleFragment { + transportProtocol?: string; + frontendPort?: number; + backendPort?: number; +} + +/** + * @class + * Initializes a new instance of the SharedPublicIpAddressConfigurationFragment class. + * @constructor + * Properties of a virtual machine that determine how it is connected to a load + * balancer. + * + * @member {array} [inboundNatRules] The incoming NAT rules + */ +export interface SharedPublicIpAddressConfigurationFragment { + inboundNatRules?: InboundNatRuleFragment[]; +} + +/** + * @class + * Initializes a new instance of the NetworkInterfacePropertiesFragment class. + * @constructor + * Properties of a network interface. + * + * @member {string} [virtualNetworkId] The resource ID of the virtual network. + * @member {string} [subnetId] The resource ID of the sub net. + * @member {string} [publicIpAddressId] The resource ID of the public IP + * address. + * @member {string} [publicIpAddress] The public IP address. + * @member {string} [privateIpAddress] The private IP address. + * @member {string} [dnsName] The DNS name. + * @member {string} [rdpAuthority] The RdpAuthority property is a server DNS + * host name or IP address followed by the service port number for RDP (Remote + * Desktop Protocol). + * @member {string} [sshAuthority] The SshAuthority property is a server DNS + * host name or IP address followed by the service port number for SSH. + * @member {object} [sharedPublicIpAddressConfiguration] The configuration for + * sharing a public IP address across multiple virtual machines. + * @member {array} [sharedPublicIpAddressConfiguration.inboundNatRules] The + * incoming NAT rules + */ +export interface NetworkInterfacePropertiesFragment { + virtualNetworkId?: string; + subnetId?: string; + publicIpAddressId?: string; + publicIpAddress?: string; + privateIpAddress?: string; + dnsName?: string; + rdpAuthority?: string; + sshAuthority?: string; + sharedPublicIpAddressConfiguration?: SharedPublicIpAddressConfigurationFragment; +} + +/** + * @class + * Initializes a new instance of the ScheduleCreationParameterFragment class. + * @constructor + * Properties for creating a schedule. + * + * @member {string} [status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * @member {string} [taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [weeklyRecurrence] If the schedule will occur only some + * days of the week, specify the weekly recurrence. + * @member {array} [weeklyRecurrence.weekdays] The days of the week for which + * the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * @member {string} [weeklyRecurrence.time] The time of the day the schedule + * will occur. + * @member {object} [dailyRecurrence] If the schedule will occur once each day + * of the week, specify the daily recurrence. + * @member {string} [dailyRecurrence.time] The time of day the schedule will + * occur. + * @member {object} [hourlyRecurrence] If the schedule will occur multiple + * times a day, specify the hourly recurrence. + * @member {number} [hourlyRecurrence.minute] Minutes of the hour the schedule + * will run. + * @member {string} [timeZoneId] The time zone ID (e.g. Pacific Standard time). + * @member {object} [notificationSettings] Notification settings. + * @member {string} [notificationSettings.status] If notifications are enabled + * for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * @member {number} [notificationSettings.timeInMinutes] Time in minutes before + * event at which notification will be sent. + * @member {string} [notificationSettings.webhookUrl] The webhook URL to which + * the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * @member {string} [targetResourceId] The resource ID to which the schedule + * belongs + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ +export interface ScheduleCreationParameterFragment { + status?: string; + taskType?: string; + weeklyRecurrence?: WeekDetailsFragment; + dailyRecurrence?: DayDetailsFragment; + hourlyRecurrence?: HourDetailsFragment; + timeZoneId?: string; + notificationSettings?: NotificationSettingsFragment; + targetResourceId?: string; + name?: string; + location?: string; + tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the LabVirtualMachineCreationParameterFragment class. + * @constructor + * Properties for creating a virtual machine. + * + * @member {object} [bulkCreationParameters] The number of virtual machine + * instances to create. + * @member {number} [bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * @member {string} [notes] The notes of the virtual machine. + * @member {string} [ownerObjectId] The object identifier of the owner of the + * virtual machine. + * @member {string} [ownerUserPrincipalName] The user principal name of the + * virtual machine owner. + * @member {string} [createdByUserId] The object identifier of the creator of + * the virtual machine. + * @member {string} [createdByUser] The email address of creator of the virtual + * machine. + * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) of + * the virtual machine. + * @member {string} [customImageId] The custom image identifier of the virtual + * machine. + * @member {string} [osType] The OS type of the virtual machine. + * @member {string} [size] The size of the virtual machine. + * @member {string} [userName] The user name of the virtual machine. + * @member {string} [password] The password of the virtual machine + * administrator. + * @member {string} [sshKey] The SSH key of the virtual machine administrator. + * @member {boolean} [isAuthenticationWithSshKey] Indicates whether this + * virtual machine uses an SSH key for authentication. + * @member {string} [fqdn] The fully-qualified domain name of the virtual + * machine. + * @member {string} [labSubnetName] The lab subnet name of the virtual machine. + * @member {string} [labVirtualNetworkId] The lab virtual network identifier of + * the virtual machine. + * @member {boolean} [disallowPublicIpAddress] Indicates whether the virtual + * machine is to be created without a public IP address. + * @member {array} [artifacts] The artifacts to be installed on the virtual + * machine. + * @member {object} [artifactDeploymentStatus] The artifact deployment status + * for the virtual machine. + * @member {string} [artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * @member {number} [artifactDeploymentStatus.artifactsApplied] The total count + * of the artifacts that were successfully applied. + * @member {number} [artifactDeploymentStatus.totalArtifacts] The total count + * of the artifacts that were tentatively applied. + * @member {object} [galleryImageReference] The Microsoft Azure Marketplace + * image reference of the virtual machine. + * @member {string} [galleryImageReference.offer] The offer of the gallery + * image. + * @member {string} [galleryImageReference.publisher] The publisher of the + * gallery image. + * @member {string} [galleryImageReference.sku] The SKU of the gallery image. + * @member {string} [galleryImageReference.osType] The OS type of the gallery + * image. + * @member {string} [galleryImageReference.version] The version of the gallery + * image. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image + * @member {object} [networkInterface] The network interface properties. + * @member {string} [networkInterface.virtualNetworkId] The resource ID of the + * virtual network. + * @member {string} [networkInterface.subnetId] The resource ID of the sub net. + * @member {string} [networkInterface.publicIpAddressId] The resource ID of the + * public IP address. + * @member {string} [networkInterface.publicIpAddress] The public IP address. + * @member {string} [networkInterface.privateIpAddress] The private IP address. + * @member {string} [networkInterface.dnsName] The DNS name. + * @member {string} [networkInterface.rdpAuthority] The RdpAuthority property + * is a server DNS host name or IP address followed by the service port number + * for RDP (Remote Desktop Protocol). + * @member {string} [networkInterface.sshAuthority] The SshAuthority property + * is a server DNS host name or IP address followed by the service port number + * for SSH. + * @member {object} [networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * @member {array} + * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The + * incoming NAT rules * @member {date} [expirationDate] The expiration date for VM. * @member {boolean} [allowClaim] Indicates whether another user can take * ownership of the virtual machine @@ -1615,23 +2406,25 @@ export interface NetworkInterfaceProperties { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @member {array} [dataDiskParameters] New or existing data disks to attach to + * the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL * @member {string} [name] The name of the virtual machine or environment * @member {string} [location] The location of the new virtual machine or * environment * @member {object} [tags] The tags of the resource. */ -export interface LabVirtualMachineCreationParameter { - bulkCreationParameters?: BulkCreationParameters; +export interface LabVirtualMachineCreationParameterFragment { + bulkCreationParameters?: BulkCreationParametersFragment; notes?: string; ownerObjectId?: string; ownerUserPrincipalName?: string; createdByUserId?: string; createdByUser?: string; createdDate?: Date; + computeId?: string; customImageId?: string; osType?: string; size?: string; @@ -1643,19 +2436,19 @@ export interface LabVirtualMachineCreationParameter { labSubnetName?: string; labVirtualNetworkId?: string; disallowPublicIpAddress?: boolean; - artifacts?: ArtifactInstallProperties[]; - artifactDeploymentStatus?: ArtifactDeploymentStatusProperties; - galleryImageReference?: GalleryImageReference; - computeVm?: ComputeVmProperties; - networkInterface?: NetworkInterfaceProperties; - applicableSchedule?: ApplicableSchedule; + artifacts?: ArtifactInstallPropertiesFragment[]; + artifactDeploymentStatus?: ArtifactDeploymentStatusPropertiesFragment; + galleryImageReference?: GalleryImageReferenceFragment; + planId?: string; + networkInterface?: NetworkInterfacePropertiesFragment; expirationDate?: Date; allowClaim?: boolean; storageType?: string; virtualMachineCreationSource?: string; environmentId?: string; - provisioningState?: string; - uniqueIdentifier?: string; + dataDiskParameters?: DataDiskPropertiesFragment[]; + scheduleParameters?: ScheduleCreationParameterFragment[]; + lastKnownPowerState?: string; name?: string; location?: string; tags?: { [propertyName: string]: string }; @@ -1663,27 +2456,26 @@ export interface LabVirtualMachineCreationParameter { /** * @class - * Initializes a new instance of the FormulaPropertiesFromVm class. + * Initializes a new instance of the FormulaPropertiesFromVmFragment class. * @constructor * Information about a VM from which a formula is to be created. * * @member {string} [labVmId] The identifier of the VM from which a formula is * to be created. */ -export interface FormulaPropertiesFromVm { +export interface FormulaPropertiesFromVmFragment { labVmId?: string; } /** * @class - * Initializes a new instance of the Formula class. + * Initializes a new instance of the FormulaFragment class. * @constructor * A formula for creating a VM, specifying an image base and other parameters * * @member {string} [description] The description of the formula. * @member {string} [author] The author of the formula. * @member {string} [osType] The OS type of the formula. - * @member {date} [creationDate] The creation date of the formula. * @member {object} [formulaContent] The content of the formula. * @member {object} [formulaContent.bulkCreationParameters] The number of * virtual machine instances to create. @@ -1700,6 +2492,8 @@ export interface FormulaPropertiesFromVm { * of the virtual machine. * @member {date} [formulaContent.createdDate] The creation date of the virtual * machine. + * @member {string} [formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. * @member {string} [formulaContent.customImageId] The custom image identifier * of the virtual machine. * @member {string} [formulaContent.osType] The OS type of the virtual machine. @@ -1742,22 +2536,8 @@ export interface FormulaPropertiesFromVm { * of the gallery image. * @member {string} [formulaContent.galleryImageReference.version] The version * of the gallery image. - * @member {object} [formulaContent.computeVm] The compute virtual machine - * properties. - * @member {array} [formulaContent.computeVm.statuses] Gets the statuses of the - * virtual machine. - * @member {string} [formulaContent.computeVm.osType] Gets the OS type of the - * virtual machine. - * @member {string} [formulaContent.computeVm.vmSize] Gets the size of the - * virtual machine. - * @member {string} [formulaContent.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * @member {string} [formulaContent.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * @member {array} [formulaContent.computeVm.dataDiskIds] Gets data disks blob - * uri for the virtual machine. - * @member {array} [formulaContent.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @member {string} [formulaContent.planId] The id of the plan associated with + * the virtual machine image * @member {object} [formulaContent.networkInterface] The network interface * properties. * @member {string} [formulaContent.networkInterface.virtualNetworkId] The @@ -1784,124 +2564,6 @@ export interface FormulaPropertiesFromVm { * @member {array} * [formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules - * @member {object} [formulaContent.applicableSchedule] The applicable schedule - * for the virtual machine. - * @member {object} [formulaContent.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * @member {string} [formulaContent.applicableSchedule.labVmsShutdown.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * @member {string} [formulaContent.applicableSchedule.labVmsShutdown.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.weeklyRecurrence.time] The - * time of the day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.dailyRecurrence.time] The - * time of day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} - * [formulaContent.applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.timeZoneId] The time zone - * ID (e.g. Pacific Standard time). - * @member {object} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * @member {date} - * [formulaContent.applicableSchedule.labVmsShutdown.createdDate] The creation - * date of the schedule. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} - * [formulaContent.applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [formulaContent.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * @member {string} [formulaContent.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * @member {string} [formulaContent.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] The - * time of the day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] The - * time of day the schedule will occur. - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} - * [formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The time zone - * ID (e.g. Pacific Standard time). - * @member {object} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * @member {date} [formulaContent.applicableSchedule.labVmsStartup.createdDate] - * The creation date of the schedule. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} - * [formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). * @member {date} [formulaContent.expirationDate] The expiration date for VM. * @member {boolean} [formulaContent.allowClaim] Indicates whether another user * can take ownership of the virtual machine @@ -1912,10 +2574,12 @@ export interface FormulaPropertiesFromVm { * include: 'FromCustomImage', 'FromGalleryImage' * @member {string} [formulaContent.environmentId] The resource ID of the * environment that contains this virtual machine, if any. - * @member {string} [formulaContent.provisioningState] The provisioning status - * of the resource. - * @member {string} [formulaContent.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @member {array} [formulaContent.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * @member {array} [formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * @member {string} [formulaContent.lastKnownPowerState] Last known compute + * power state captured in DTL * @member {string} [formulaContent.name] The name of the virtual machine or * environment * @member {string} [formulaContent.location] The location of the new virtual @@ -1925,20 +2589,13 @@ export interface FormulaPropertiesFromVm { * created. * @member {string} [vm.labVmId] The identifier of the VM from which a formula * is to be created. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface Formula extends Resource { +export interface FormulaFragment extends UpdateResource { description?: string; author?: string; osType?: string; - readonly creationDate?: Date; - formulaContent?: LabVirtualMachineCreationParameter; - vm?: FormulaPropertiesFromVm; - provisioningState?: string; - uniqueIdentifier?: string; + formulaContent?: LabVirtualMachineCreationParameterFragment; + vm?: FormulaPropertiesFromVmFragment; } /** @@ -1959,6 +2616,9 @@ export interface Formula extends Resource { * @member {string} [imageReference.version] The version of the gallery image. * @member {string} [icon] The icon of the gallery image. * @member {boolean} [enabled] Indicates whether this gallery image is enabled. + * @member {string} [planId] The third party plan that applies to this image + * @member {boolean} [isPlanAuthorized] Indicates if the plan has been + * authorized for programmatic deployment. */ export interface GalleryImage extends Resource { author?: string; @@ -1967,26 +2627,8 @@ export interface GalleryImage extends Resource { imageReference?: GalleryImageReference; icon?: string; enabled?: boolean; -} - -/** - * @class - * Initializes a new instance of the GalleryImageReferenceFragment class. - * @constructor - * The reference information for an Azure Marketplace image. - * - * @member {string} [offer] The offer of the gallery image. - * @member {string} [publisher] The publisher of the gallery image. - * @member {string} [sku] The SKU of the gallery image. - * @member {string} [osType] The OS type of the gallery image. - * @member {string} [version] The version of the gallery image. - */ -export interface GalleryImageReferenceFragment { - offer?: string; - publisher?: string; - sku?: string; - osType?: string; - version?: string; + planId?: string; + isPlanAuthorized?: boolean; } /** @@ -2068,23 +2710,64 @@ export interface IdentityProperties { /** * @class - * Initializes a new instance of the InboundNatRuleFragment class. + * Initializes a new instance of the ImportLabVirtualMachineRequest class. * @constructor - * A rule for NAT - exposing a VM's port (backendPort) on the public IP address - * using a load balancer. + * This represents the payload required to import a virtual machine from a + * different lab into the current one * - * @member {string} [transportProtocol] The transport protocol for the - * endpoint. Possible values include: 'Tcp', 'Udp' - * @member {number} [frontendPort] The external endpoint port of the inbound - * connection. Possible values range between 1 and 65535, inclusive. If - * unspecified, a value will be allocated automatically. - * @member {number} [backendPort] The port to which the external traffic will - * be redirected. + * @member {string} [sourceVirtualMachineResourceId] The full resource ID of + * the virtual machine to be imported. + * @member {string} [destinationVirtualMachineName] The name of the virtual + * machine in the destination lab */ -export interface InboundNatRuleFragment { - transportProtocol?: string; - frontendPort?: number; - backendPort?: number; +export interface ImportLabVirtualMachineRequest { + sourceVirtualMachineResourceId?: string; + destinationVirtualMachineName?: string; +} + +/** + * @class + * Initializes a new instance of the LabAnnouncementProperties class. + * @constructor + * Properties of a lab's announcement banner + * + * @member {string} [title] The plain text title for the lab announcement + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [enabled] Is the lab announcement active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [expirationDate] The time at which the announcement expires + * (null for never) + * @member {boolean} [expired] Has this announcement expired? + * @member {string} [provisioningState] The provisioning status of the + * resource. + * @member {string} [uniqueIdentifier] The unique immutable identifier of a + * resource (Guid). + */ +export interface LabAnnouncementProperties { + title?: string; + markdown?: string; + enabled?: string; + expirationDate?: Date; + expired?: boolean; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the LabSupportProperties class. + * @constructor + * Properties of a lab's support banner + * + * @member {string} [enabled] Is the lab support banner active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + */ +export interface LabSupportProperties { + enabled?: string; + markdown?: string; } /** @@ -2104,6 +2787,12 @@ export interface InboundNatRuleFragment { * @member {string} [labStorageType] Type of storage used by the lab. It can be * either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' + * @member {array} [mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * @member {array} [mandatoryArtifactsResourceIdsWindows] The ordered list of + * artifact resource IDs that should be applied on all Windows VM creations by + * default, prior to the artifacts specified by the user. * @member {date} [createdDate] The creation date of the lab. * @member {string} [premiumDataDisks] The setting to enable usage of premium * data disks. @@ -2111,6 +2800,40 @@ export interface InboundNatRuleFragment { * allowed. * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' + * @member {string} [environmentPermission] The access rights to be granted to + * the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * @member {object} [announcement] The properties of any lab announcement + * associated with this lab + * @member {string} [announcement.title] The plain text title for the lab + * announcement + * @member {string} [announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [announcement.expirationDate] The time at which the + * announcement expires (null for never) + * @member {boolean} [announcement.expired] Has this announcement expired? + * @member {string} [announcement.provisioningState] The provisioning status of + * the resource. + * @member {string} [announcement.uniqueIdentifier] The unique immutable + * identifier of a resource (Guid). + * @member {object} [support] The properties of any lab support message + * associated with this lab + * @member {string} [support.enabled] Is the lab support banner active/enabled + * at this time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [support.markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [vmCreationResourceGroup] The resource group in which lab + * virtual machines will be created in. + * @member {string} [publicIpId] The public IP address for the lab's load + * balancer. + * @member {string} [loadBalancerId] The load balancer used to for lab VMs that + * use shared IP address. + * @member {string} [networkSecurityGroupId] The Network Security Group + * attached to the lab VMs Network interfaces to restrict open ports. + * @member {object} [extendedProperties] Extended properties of the lab used + * for experimental features * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -2123,10 +2846,43 @@ export interface Lab extends Resource { readonly premiumDataDiskStorageAccount?: string; readonly vaultName?: string; labStorageType?: string; + mandatoryArtifactsResourceIdsLinux?: string[]; + mandatoryArtifactsResourceIdsWindows?: string[]; readonly createdDate?: Date; premiumDataDisks?: string; - provisioningState?: string; - uniqueIdentifier?: string; + environmentPermission?: string; + announcement?: LabAnnouncementProperties; + support?: LabSupportProperties; + readonly vmCreationResourceGroup?: string; + readonly publicIpId?: string; + readonly loadBalancerId?: string; + readonly networkSecurityGroupId?: string; + extendedProperties?: { [propertyName: string]: string }; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the LabAnnouncementPropertiesFragment class. + * @constructor + * Properties of a lab's announcement banner + * + * @member {string} [title] The plain text title for the lab announcement + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [enabled] Is the lab announcement active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [expirationDate] The time at which the announcement expires + * (null for never) + * @member {boolean} [expired] Has this announcement expired? + */ +export interface LabAnnouncementPropertiesFragment { + title?: string; + markdown?: string; + enabled?: string; + expirationDate?: Date; + expired?: boolean; } /** @@ -2255,8 +3011,24 @@ export interface LabCost extends Resource { startDateTime?: Date; endDateTime?: Date; createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the LabSupportPropertiesFragment class. + * @constructor + * Properties of a lab's support banner + * + * @member {string} [enabled] Is the lab support banner active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + */ +export interface LabSupportPropertiesFragment { + enabled?: string; + markdown?: string; } /** @@ -2268,22 +3040,50 @@ export interface LabCost extends Resource { * @member {string} [labStorageType] Type of storage used by the lab. It can be * either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' + * @member {array} [mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * @member {array} [mandatoryArtifactsResourceIdsWindows] The ordered list of + * artifact resource IDs that should be applied on all Windows VM creations by + * default, prior to the artifacts specified by the user. * @member {string} [premiumDataDisks] The setting to enable usage of premium * data disks. * When its value is 'Enabled', creation of standard or premium data disks is * allowed. * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - */ -export interface LabFragment extends Resource { + * @member {string} [environmentPermission] The access rights to be granted to + * the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * @member {object} [announcement] The properties of any lab announcement + * associated with this lab + * @member {string} [announcement.title] The plain text title for the lab + * announcement + * @member {string} [announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [announcement.expirationDate] The time at which the + * announcement expires (null for never) + * @member {boolean} [announcement.expired] Has this announcement expired? + * @member {object} [support] The properties of any lab support message + * associated with this lab + * @member {string} [support.enabled] Is the lab support banner active/enabled + * at this time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [support.markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {object} [extendedProperties] Extended properties of the lab used + * for experimental features + */ +export interface LabFragment extends UpdateResource { labStorageType?: string; + mandatoryArtifactsResourceIdsLinux?: string[]; + mandatoryArtifactsResourceIdsWindows?: string[]; premiumDataDisks?: string; - provisioningState?: string; - uniqueIdentifier?: string; + environmentPermission?: string; + announcement?: LabAnnouncementPropertiesFragment; + support?: LabSupportPropertiesFragment; + extendedProperties?: { [propertyName: string]: string }; } /** @@ -2354,6 +3154,8 @@ export interface LabVhd { * image. * @member {string} [galleryImageReference.version] The version of the gallery * image. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [computeVm] The compute virtual machine properties. * @member {array} [computeVm.statuses] Gets the statuses of the virtual * machine. @@ -2420,13 +3222,21 @@ export interface LabVhd { * @member {string} * [applicableSchedule.labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The creation * date of the schedule. * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The @@ -2465,13 +3275,21 @@ export interface LabVhd { * @member {string} * [applicableSchedule.labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation * date of the schedule. * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The @@ -2490,6 +3308,11 @@ export interface LabVhd { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. + * @member {array} [dataDiskParameters] New or existing data disks to attach to + * the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -2502,7 +3325,7 @@ export interface LabVirtualMachine extends Resource { createdByUserId?: string; createdByUser?: string; createdDate?: Date; - readonly computeId?: string; + computeId?: string; customImageId?: string; osType?: string; size?: string; @@ -2517,64 +3340,20 @@ export interface LabVirtualMachine extends Resource { artifacts?: ArtifactInstallProperties[]; artifactDeploymentStatus?: ArtifactDeploymentStatusProperties; galleryImageReference?: GalleryImageReference; - computeVm?: ComputeVmProperties; + planId?: string; + readonly computeVm?: ComputeVmProperties; networkInterface?: NetworkInterfaceProperties; - applicableSchedule?: ApplicableSchedule; + readonly applicableSchedule?: ApplicableSchedule; expirationDate?: Date; allowClaim?: boolean; storageType?: string; virtualMachineCreationSource?: string; environmentId?: string; - provisioningState?: string; - uniqueIdentifier?: string; -} - -/** - * @class - * Initializes a new instance of the SharedPublicIpAddressConfigurationFragment class. - * @constructor - * Properties of a virtual machine that determine how it is connected to a load - * balancer. - * - * @member {array} [inboundNatRules] The incoming NAT rules - */ -export interface SharedPublicIpAddressConfigurationFragment { - inboundNatRules?: InboundNatRuleFragment[]; -} - -/** - * @class - * Initializes a new instance of the NetworkInterfacePropertiesFragment class. - * @constructor - * Properties of a network interface. - * - * @member {string} [virtualNetworkId] The resource ID of the virtual network. - * @member {string} [subnetId] The resource ID of the sub net. - * @member {string} [publicIpAddressId] The resource ID of the public IP - * address. - * @member {string} [publicIpAddress] The public IP address. - * @member {string} [privateIpAddress] The private IP address. - * @member {string} [dnsName] The DNS name. - * @member {string} [rdpAuthority] The RdpAuthority property is a server DNS - * host name or IP address followed by the service port number for RDP (Remote - * Desktop Protocol). - * @member {string} [sshAuthority] The SshAuthority property is a server DNS - * host name or IP address followed by the service port number for SSH. - * @member {object} [sharedPublicIpAddressConfiguration] The configuration for - * sharing a public IP address across multiple virtual machines. - * @member {array} [sharedPublicIpAddressConfiguration.inboundNatRules] The - * incoming NAT rules - */ -export interface NetworkInterfacePropertiesFragment { - virtualNetworkId?: string; - subnetId?: string; - publicIpAddressId?: string; - publicIpAddress?: string; - privateIpAddress?: string; - dnsName?: string; - rdpAuthority?: string; - sshAuthority?: string; - sharedPublicIpAddressConfiguration?: SharedPublicIpAddressConfigurationFragment; + dataDiskParameters?: DataDiskProperties[]; + scheduleParameters?: ScheduleCreationParameter[]; + lastKnownPowerState?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -2593,6 +3372,8 @@ export interface NetworkInterfacePropertiesFragment { * @member {string} [createdByUser] The email address of creator of the virtual * machine. * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) of + * the virtual machine. * @member {string} [customImageId] The custom image identifier of the virtual * machine. * @member {string} [osType] The OS type of the virtual machine. @@ -2631,19 +3412,8 @@ export interface NetworkInterfacePropertiesFragment { * image. * @member {string} [galleryImageReference.version] The version of the gallery * image. - * @member {object} [computeVm] The compute virtual machine properties. - * @member {array} [computeVm.statuses] Gets the statuses of the virtual - * machine. - * @member {string} [computeVm.osType] Gets the OS type of the virtual machine. - * @member {string} [computeVm.vmSize] Gets the size of the virtual machine. - * @member {string} [computeVm.networkInterfaceId] Gets the network interface - * ID of the virtual machine. - * @member {string} [computeVm.osDiskId] Gets OS disk blob uri for the virtual - * machine. - * @member {array} [computeVm.dataDiskIds] Gets data disks blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDisks] Gets all data disks attached to the - * virtual machine. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [networkInterface] The network interface properties. * @member {string} [networkInterface.virtualNetworkId] The resource ID of the * virtual network. @@ -2665,94 +3435,6 @@ export interface NetworkInterfacePropertiesFragment { * @member {array} * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The * incoming NAT rules - * @member {object} [applicableSchedule] The applicable schedule for the - * virtual machine. - * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsShutdown.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [applicableSchedule.labVmsStartup] The auto-startup - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsStartup.status] The status of the - * schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] The - * time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * @member {number} [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time zone - * ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). * @member {date} [expirationDate] The expiration date for VM. * @member {boolean} [allowClaim] Indicates whether another user can take * ownership of the virtual machine @@ -2763,18 +3445,20 @@ export interface NetworkInterfacePropertiesFragment { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @member {array} [dataDiskParameters] New or existing data disks to attach to + * the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL */ -export interface LabVirtualMachineFragment extends Resource { +export interface LabVirtualMachineFragment extends UpdateResource { notes?: string; ownerObjectId?: string; ownerUserPrincipalName?: string; createdByUserId?: string; createdByUser?: string; createdDate?: Date; + computeId?: string; customImageId?: string; osType?: string; size?: string; @@ -2789,16 +3473,16 @@ export interface LabVirtualMachineFragment extends Resource { artifacts?: ArtifactInstallPropertiesFragment[]; artifactDeploymentStatus?: ArtifactDeploymentStatusPropertiesFragment; galleryImageReference?: GalleryImageReferenceFragment; - computeVm?: ComputeVmPropertiesFragment; + planId?: string; networkInterface?: NetworkInterfacePropertiesFragment; - applicableSchedule?: ApplicableScheduleFragment; expirationDate?: Date; allowClaim?: boolean; storageType?: string; virtualMachineCreationSource?: string; environmentId?: string; - provisioningState?: string; - uniqueIdentifier?: string; + dataDiskParameters?: DataDiskPropertiesFragment[]; + scheduleParameters?: ScheduleCreationParameterFragment[]; + lastKnownPowerState?: string; } /** @@ -2808,6 +3492,10 @@ export interface LabVirtualMachineFragment extends Resource { * A notification. * * @member {string} [webHookUrl] The webhook URL to send notifications to. + * @member {string} [emailRecipient] The email recipient to send notifications + * to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). * @member {string} [description] Description of notification. * @member {array} [events] The list of event for which this notification is * enabled. @@ -2819,11 +3507,13 @@ export interface LabVirtualMachineFragment extends Resource { */ export interface NotificationChannel extends Resource { webHookUrl?: string; + emailRecipient?: string; + notificationLocale?: string; description?: string; events?: Event[]; readonly createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -2833,20 +3523,20 @@ export interface NotificationChannel extends Resource { * A notification. * * @member {string} [webHookUrl] The webhook URL to send notifications to. + * @member {string} [emailRecipient] The email recipient to send notifications + * to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). * @member {string} [description] Description of notification. * @member {array} [events] The list of event for which this notification is * enabled. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface NotificationChannelFragment extends Resource { +export interface NotificationChannelFragment extends UpdateResource { webHookUrl?: string; + emailRecipient?: string; + notificationLocale?: string; description?: string; events?: EventFragment[]; - provisioningState?: string; - uniqueIdentifier?: string; } /** @@ -2962,7 +3652,8 @@ export interface OperationResult { * LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * @member {string} [factData] The fact data of the policy. * @member {string} [threshold] The threshold of the policy (i.e. a number for * MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). @@ -2983,8 +3674,8 @@ export interface Policy extends Resource { threshold?: string; evaluatorType?: string; readonly createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -3000,27 +3691,22 @@ export interface Policy extends Resource { * LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * @member {string} [factData] The fact data of the policy. * @member {string} [threshold] The threshold of the policy (i.e. a number for * MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). * @member {string} [evaluatorType] The evaluator type of the policy (i.e. * AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface PolicyFragment extends Resource { +export interface PolicyFragment extends UpdateResource { description?: string; status?: string; factName?: string; factData?: string; threshold?: string; evaluatorType?: string; - provisioningState?: string; - uniqueIdentifier?: string; } /** @@ -3053,6 +3739,30 @@ export interface PortFragment { backendPort?: number; } +/** + * @class + * Initializes a new instance of the RdpConnection class. + * @constructor + * Represents a .rdp file + * + * @member {string} [contents] The contents of the .rdp file + */ +export interface RdpConnection { + contents?: string; +} + +/** + * @class + * Initializes a new instance of the ResizeLabVirtualMachineProperties class. + * @constructor + * Request body for resizing a virtual machine. + * + * @member {string} [size] Specifies the size of the virtual machine. + */ +export interface ResizeLabVirtualMachineProperties { + size?: string; +} + /** * @class * Initializes a new instance of the RetargetScheduleProperties class. @@ -3083,8 +3793,167 @@ export interface RetargetScheduleProperties { */ export interface Secret extends Resource { value?: string; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the SecretFragment class. + * @constructor + * A secret. + * + * @member {string} [value] The value of the secret for secret creation. + */ +export interface SecretFragment extends UpdateResource { + value?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceFabric class. + * @constructor + * A Service Fabric. + * + * @member {string} [externalServiceFabricId] The backing service fabric + * resource's id + * @member {string} [environmentId] The resource id of the environment under + * which the service fabric resource is present + * @member {object} [applicableSchedule] The applicable schedule for the + * virtual machine. + * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown + * schedule, if one has been set at the lab or lab resource level. + * @member {string} [applicableSchedule.labVmsShutdown.status] The status of + * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task type + * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If the + * schedule will occur only some days of the week, specify the weekly + * recurrence. + * @member {array} + * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of + * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] + * The time of the day the schedule will occur. + * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If the + * schedule will occur once each day of the week, specify the daily recurrence. + * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] + * The time of day the schedule will occur. + * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If the + * schedule will occur multiple times a day, specify the hourly recurrence. + * @member {number} [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] + * Minutes of the hour the schedule will run. + * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time + * zone ID (e.g. Pacific Standard time). + * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] + * Notification settings. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.status] If + * notifications are enabled for this schedule (i.e. Enabled, Disabled). + * Possible values include: 'Enabled', 'Disabled' + * @member {number} + * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] Time + * in minutes before event at which notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The + * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The creation + * date of the schedule. + * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The + * resource ID to which the schedule belongs + * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The + * provisioning status of the resource. + * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The + * unique immutable identifier of a resource (Guid). + * @member {object} [applicableSchedule.labVmsStartup] The auto-startup + * schedule, if one has been set at the lab or lab resource level. + * @member {string} [applicableSchedule.labVmsStartup.status] The status of the + * schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type + * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If the + * schedule will occur only some days of the week, specify the weekly + * recurrence. + * @member {array} [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] + * The days of the week for which the schedule is set (e.g. Sunday, Monday, + * Tuesday, etc.). + * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] + * The time of the day the schedule will occur. + * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the + * schedule will occur once each day of the week, specify the daily recurrence. + * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] The + * time of day the schedule will occur. + * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If the + * schedule will occur multiple times a day, specify the hourly recurrence. + * @member {number} [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] + * Minutes of the hour the schedule will run. + * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time zone + * ID (e.g. Pacific Standard time). + * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] + * Notification settings. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.status] If + * notifications are enabled for this schedule (i.e. Enabled, Disabled). + * Possible values include: 'Enabled', 'Disabled' + * @member {number} + * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time + * in minutes before event at which notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The + * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation + * date of the schedule. + * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The + * resource ID to which the schedule belongs + * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The + * provisioning status of the resource. + * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The + * unique immutable identifier of a resource (Guid). + * @member {string} [provisioningState] The provisioning status of the + * resource. + * @member {string} [uniqueIdentifier] The unique immutable identifier of a + * resource (Guid). + */ +export interface ServiceFabric extends Resource { + externalServiceFabricId?: string; + environmentId?: string; + readonly applicableSchedule?: ApplicableSchedule; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceFabricFragment class. + * @constructor + * A Service Fabric. + * + * @member {string} [externalServiceFabricId] The backing service fabric + * resource's id + * @member {string} [environmentId] The resource id of the environment under + * which the service fabric resource is present + */ +export interface ServiceFabricFragment extends UpdateResource { + externalServiceFabricId?: string; + environmentId?: string; } /** @@ -3118,6 +3987,8 @@ export interface ServiceRunner extends Resource { * @member {string} [vmName] The virtual machine to be shut down. * @member {string} [guid] The GUID for the virtual machine to be shut down. * @member {string} [owner] The owner of the virtual machine. + * @member {string} [vmUrl] The URL of the virtual machine. + * @member {string} [minutesUntilShutdown] Minutes remaining until shutdown * @member {string} [eventType] The event for which a notification will be * sent. * @member {string} [text] The text for the notification. @@ -3133,6 +4004,8 @@ export interface ShutdownNotificationContent { vmName?: string; guid?: string; owner?: string; + vmUrl?: string; + minutesUntilShutdown?: string; eventType?: string; text?: string; subscriptionId?: string; @@ -3336,8 +4209,8 @@ export interface User extends Resource { identity?: UserIdentity; secretStore?: UserSecretStore; readonly createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -3402,16 +4275,10 @@ export interface UserSecretStoreFragment { * @member {object} [secretStore] The secret store of the user. * @member {string} [secretStore.keyVaultUri] The URI of the user's Key vault. * @member {string} [secretStore.keyVaultId] The ID of the user's Key vault. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface UserFragment extends Resource { +export interface UserFragment extends UpdateResource { identity?: UserIdentityFragment; secretStore?: UserSecretStoreFragment; - provisioningState?: string; - uniqueIdentifier?: string; } /** @@ -3437,11 +4304,11 @@ export interface VirtualNetwork extends Resource { allowedSubnets?: Subnet[]; description?: string; externalProviderResourceId?: string; - externalSubnets?: ExternalSubnet[]; + readonly externalSubnets?: ExternalSubnet[]; subnetOverrides?: SubnetOverride[]; readonly createdDate?: Date; - provisioningState?: string; - uniqueIdentifier?: string; + readonly provisioningState?: string; + readonly uniqueIdentifier?: string; } /** @@ -3454,22 +4321,14 @@ export interface VirtualNetwork extends Resource { * @member {string} [description] The description of the virtual network. * @member {string} [externalProviderResourceId] The Microsoft.Network resource * identifier of the virtual network. - * @member {array} [externalSubnets] The external subnet properties. * @member {array} [subnetOverrides] The subnet overrides of the virtual * network. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ -export interface VirtualNetworkFragment extends Resource { +export interface VirtualNetworkFragment extends UpdateResource { allowedSubnets?: SubnetFragment[]; description?: string; externalProviderResourceId?: string; - externalSubnets?: ExternalSubnetFragment[]; subnetOverrides?: SubnetOverrideFragment[]; - provisioningState?: string; - uniqueIdentifier?: string; } @@ -3488,216 +4347,228 @@ export interface ProviderOperationResult extends Array { /** * @class - * Initializes a new instance of the ResponseWithContinuationLab class. + * Initializes a new instance of the LabList class. + * @constructor + * The response of a list operation. + * + * @member {string} [nextLink] Link for next set of results. + */ +export interface LabList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the LabVhdList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationLab extends Array { +export interface LabVhdList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationLabVhd class. + * Initializes a new instance of the ScheduleList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationLabVhd extends Array { +export interface ScheduleList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationSchedule class. + * Initializes a new instance of the ArtifactSourceList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationSchedule extends Array { +export interface ArtifactSourceList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationArtifactSource class. + * Initializes a new instance of the ArmTemplateList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationArtifactSource extends Array { +export interface ArmTemplateList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationArmTemplate class. + * Initializes a new instance of the ArtifactList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationArmTemplate extends Array { +export interface ArtifactList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationArtifact class. + * Initializes a new instance of the CustomImageList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationArtifact extends Array { +export interface CustomImageList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationCustomImage class. + * Initializes a new instance of the FormulaList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationCustomImage extends Array { +export interface FormulaList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationFormula class. + * Initializes a new instance of the GalleryImageList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationFormula extends Array { +export interface GalleryImageList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationGalleryImage class. + * Initializes a new instance of the NotificationChannelList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationGalleryImage extends Array { +export interface NotificationChannelList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationNotificationChannel class. + * Initializes a new instance of the PolicyList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationNotificationChannel extends Array { +export interface PolicyList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationPolicy class. + * Initializes a new instance of the ServiceRunnerList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationPolicy extends Array { +export interface ServiceRunnerList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationServiceRunner class. + * Initializes a new instance of the UserList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationServiceRunner extends Array { +export interface UserList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationUser class. + * Initializes a new instance of the DiskList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationUser extends Array { +export interface DiskList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationDisk class. + * Initializes a new instance of the DtlEnvironmentList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationDisk extends Array { +export interface DtlEnvironmentList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationDtlEnvironment class. + * Initializes a new instance of the SecretList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationDtlEnvironment extends Array { +export interface SecretList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationSecret class. + * Initializes a new instance of the ServiceFabricList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationSecret extends Array { +export interface ServiceFabricList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationLabVirtualMachine class. + * Initializes a new instance of the LabVirtualMachineList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationLabVirtualMachine extends Array { +export interface LabVirtualMachineList extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the ResponseWithContinuationVirtualNetwork class. + * Initializes a new instance of the VirtualNetworkList class. * @constructor * The response of a list operation. * * @member {string} [nextLink] Link for next set of results. */ -export interface ResponseWithContinuationVirtualNetwork extends Array { +export interface VirtualNetworkList extends Array { nextLink?: string; } diff --git a/lib/services/devTestLabs/lib/models/index.js b/lib/services/devTestLabs/lib/models/index.js index 4b2d4cf373..7069ca7628 100644 --- a/lib/services/devTestLabs/lib/models/index.js +++ b/lib/services/devTestLabs/lib/models/index.js @@ -29,6 +29,7 @@ exports.WeekDetailsFragment = require('./weekDetailsFragment'); exports.DayDetailsFragment = require('./dayDetailsFragment'); exports.HourDetailsFragment = require('./hourDetailsFragment'); exports.NotificationSettingsFragment = require('./notificationSettingsFragment'); +exports.UpdateResource = require('./updateResource'); exports.ScheduleFragment = require('./scheduleFragment'); exports.ApplicableScheduleFragment = require('./applicableScheduleFragment'); exports.ArtifactParameterProperties = require('./artifactParameterProperties'); @@ -38,6 +39,7 @@ exports.ParametersValueFileInfo = require('./parametersValueFileInfo'); exports.ArmTemplate = require('./armTemplate'); exports.ArmTemplateInfo = require('./armTemplateInfo'); exports.ArmTemplateParameterProperties = require('./armTemplateParameterProperties'); +exports.ArmTemplateParameterPropertiesFragment = require('./armTemplateParameterPropertiesFragment'); exports.Artifact = require('./artifact'); exports.ArtifactDeploymentStatusProperties = require('./artifactDeploymentStatusProperties'); exports.ArtifactDeploymentStatusPropertiesFragment = require('./artifactDeploymentStatusPropertiesFragment'); @@ -47,7 +49,9 @@ exports.ArtifactSource = require('./artifactSource'); exports.ArtifactSourceFragment = require('./artifactSourceFragment'); exports.AttachDiskProperties = require('./attachDiskProperties'); exports.AttachNewDataDiskOptions = require('./attachNewDataDiskOptions'); +exports.AttachNewDataDiskOptionsFragment = require('./attachNewDataDiskOptionsFragment'); exports.BulkCreationParameters = require('./bulkCreationParameters'); +exports.BulkCreationParametersFragment = require('./bulkCreationParametersFragment'); exports.ComputeDataDisk = require('./computeDataDisk'); exports.ComputeDataDiskFragment = require('./computeDataDiskFragment'); exports.ComputeVmInstanceViewStatus = require('./computeVmInstanceViewStatus'); @@ -60,13 +64,26 @@ exports.WindowsOsInfo = require('./windowsOsInfo'); exports.LinuxOsInfo = require('./linuxOsInfo'); exports.CustomImagePropertiesFromVm = require('./customImagePropertiesFromVm'); exports.CustomImagePropertiesCustom = require('./customImagePropertiesCustom'); +exports.DataDiskStorageTypeInfo = require('./dataDiskStorageTypeInfo'); +exports.CustomImagePropertiesFromPlan = require('./customImagePropertiesFromPlan'); exports.CustomImage = require('./customImage'); +exports.WindowsOsInfoFragment = require('./windowsOsInfoFragment'); +exports.LinuxOsInfoFragment = require('./linuxOsInfoFragment'); +exports.CustomImagePropertiesFromVmFragment = require('./customImagePropertiesFromVmFragment'); +exports.CustomImagePropertiesCustomFragment = require('./customImagePropertiesCustomFragment'); +exports.DataDiskStorageTypeInfoFragment = require('./dataDiskStorageTypeInfoFragment'); +exports.CustomImagePropertiesFromPlanFragment = require('./customImagePropertiesFromPlanFragment'); +exports.CustomImageFragment = require('./customImageFragment'); exports.DataDiskProperties = require('./dataDiskProperties'); +exports.DataDiskPropertiesFragment = require('./dataDiskPropertiesFragment'); exports.DetachDataDiskProperties = require('./detachDataDiskProperties'); exports.DetachDiskProperties = require('./detachDiskProperties'); exports.Disk = require('./disk'); +exports.DiskFragment = require('./diskFragment'); exports.EnvironmentDeploymentProperties = require('./environmentDeploymentProperties'); exports.DtlEnvironment = require('./dtlEnvironment'); +exports.EnvironmentDeploymentPropertiesFragment = require('./environmentDeploymentPropertiesFragment'); +exports.DtlEnvironmentFragment = require('./dtlEnvironmentFragment'); exports.EvaluatePoliciesProperties = require('./evaluatePoliciesProperties'); exports.EvaluatePoliciesRequest = require('./evaluatePoliciesRequest'); exports.PolicyViolation = require('./policyViolation'); @@ -81,28 +98,38 @@ exports.GalleryImageReference = require('./galleryImageReference'); exports.InboundNatRule = require('./inboundNatRule'); exports.SharedPublicIpAddressConfiguration = require('./sharedPublicIpAddressConfiguration'); exports.NetworkInterfaceProperties = require('./networkInterfaceProperties'); +exports.ScheduleCreationParameter = require('./scheduleCreationParameter'); exports.LabVirtualMachineCreationParameter = require('./labVirtualMachineCreationParameter'); exports.FormulaPropertiesFromVm = require('./formulaPropertiesFromVm'); exports.Formula = require('./formula'); -exports.GalleryImage = require('./galleryImage'); exports.GalleryImageReferenceFragment = require('./galleryImageReferenceFragment'); +exports.InboundNatRuleFragment = require('./inboundNatRuleFragment'); +exports.SharedPublicIpAddressConfigurationFragment = require('./sharedPublicIpAddressConfigurationFragment'); +exports.NetworkInterfacePropertiesFragment = require('./networkInterfacePropertiesFragment'); +exports.ScheduleCreationParameterFragment = require('./scheduleCreationParameterFragment'); +exports.LabVirtualMachineCreationParameterFragment = require('./labVirtualMachineCreationParameterFragment'); +exports.FormulaPropertiesFromVmFragment = require('./formulaPropertiesFromVmFragment'); +exports.FormulaFragment = require('./formulaFragment'); +exports.GalleryImage = require('./galleryImage'); exports.ParameterInfo = require('./parameterInfo'); exports.GenerateArmTemplateRequest = require('./generateArmTemplateRequest'); exports.GenerateUploadUriParameter = require('./generateUploadUriParameter'); exports.GenerateUploadUriResponse = require('./generateUploadUriResponse'); exports.IdentityProperties = require('./identityProperties'); -exports.InboundNatRuleFragment = require('./inboundNatRuleFragment'); +exports.ImportLabVirtualMachineRequest = require('./importLabVirtualMachineRequest'); +exports.LabAnnouncementProperties = require('./labAnnouncementProperties'); +exports.LabSupportProperties = require('./labSupportProperties'); exports.Lab = require('./lab'); +exports.LabAnnouncementPropertiesFragment = require('./labAnnouncementPropertiesFragment'); exports.TargetCostProperties = require('./targetCostProperties'); exports.LabCostSummaryProperties = require('./labCostSummaryProperties'); exports.LabCostDetailsProperties = require('./labCostDetailsProperties'); exports.LabResourceCostProperties = require('./labResourceCostProperties'); exports.LabCost = require('./labCost'); +exports.LabSupportPropertiesFragment = require('./labSupportPropertiesFragment'); exports.LabFragment = require('./labFragment'); exports.LabVhd = require('./labVhd'); exports.LabVirtualMachine = require('./labVirtualMachine'); -exports.SharedPublicIpAddressConfigurationFragment = require('./sharedPublicIpAddressConfigurationFragment'); -exports.NetworkInterfacePropertiesFragment = require('./networkInterfacePropertiesFragment'); exports.LabVirtualMachineFragment = require('./labVirtualMachineFragment'); exports.NotificationChannel = require('./notificationChannel'); exports.NotificationChannelFragment = require('./notificationChannelFragment'); @@ -115,8 +142,13 @@ exports.Policy = require('./policy'); exports.PolicyFragment = require('./policyFragment'); exports.Port = require('./port'); exports.PortFragment = require('./portFragment'); +exports.RdpConnection = require('./rdpConnection'); +exports.ResizeLabVirtualMachineProperties = require('./resizeLabVirtualMachineProperties'); exports.RetargetScheduleProperties = require('./retargetScheduleProperties'); exports.Secret = require('./secret'); +exports.SecretFragment = require('./secretFragment'); +exports.ServiceFabric = require('./serviceFabric'); +exports.ServiceFabricFragment = require('./serviceFabricFragment'); exports.ServiceRunner = require('./serviceRunner'); exports.ShutdownNotificationContent = require('./shutdownNotificationContent'); exports.Subnet = require('./subnet'); @@ -134,21 +166,22 @@ exports.UserFragment = require('./userFragment'); exports.VirtualNetwork = require('./virtualNetwork'); exports.VirtualNetworkFragment = require('./virtualNetworkFragment'); exports.ProviderOperationResult = require('./providerOperationResult'); -exports.ResponseWithContinuationLab = require('./responseWithContinuationLab'); -exports.ResponseWithContinuationLabVhd = require('./responseWithContinuationLabVhd'); -exports.ResponseWithContinuationSchedule = require('./responseWithContinuationSchedule'); -exports.ResponseWithContinuationArtifactSource = require('./responseWithContinuationArtifactSource'); -exports.ResponseWithContinuationArmTemplate = require('./responseWithContinuationArmTemplate'); -exports.ResponseWithContinuationArtifact = require('./responseWithContinuationArtifact'); -exports.ResponseWithContinuationCustomImage = require('./responseWithContinuationCustomImage'); -exports.ResponseWithContinuationFormula = require('./responseWithContinuationFormula'); -exports.ResponseWithContinuationGalleryImage = require('./responseWithContinuationGalleryImage'); -exports.ResponseWithContinuationNotificationChannel = require('./responseWithContinuationNotificationChannel'); -exports.ResponseWithContinuationPolicy = require('./responseWithContinuationPolicy'); -exports.ResponseWithContinuationServiceRunner = require('./responseWithContinuationServiceRunner'); -exports.ResponseWithContinuationUser = require('./responseWithContinuationUser'); -exports.ResponseWithContinuationDisk = require('./responseWithContinuationDisk'); -exports.ResponseWithContinuationDtlEnvironment = require('./responseWithContinuationDtlEnvironment'); -exports.ResponseWithContinuationSecret = require('./responseWithContinuationSecret'); -exports.ResponseWithContinuationLabVirtualMachine = require('./responseWithContinuationLabVirtualMachine'); -exports.ResponseWithContinuationVirtualNetwork = require('./responseWithContinuationVirtualNetwork'); +exports.LabList = require('./labList'); +exports.LabVhdList = require('./labVhdList'); +exports.ScheduleList = require('./scheduleList'); +exports.ArtifactSourceList = require('./artifactSourceList'); +exports.ArmTemplateList = require('./armTemplateList'); +exports.ArtifactList = require('./artifactList'); +exports.CustomImageList = require('./customImageList'); +exports.FormulaList = require('./formulaList'); +exports.GalleryImageList = require('./galleryImageList'); +exports.NotificationChannelList = require('./notificationChannelList'); +exports.PolicyList = require('./policyList'); +exports.ServiceRunnerList = require('./serviceRunnerList'); +exports.UserList = require('./userList'); +exports.DiskList = require('./diskList'); +exports.DtlEnvironmentList = require('./dtlEnvironmentList'); +exports.SecretList = require('./secretList'); +exports.ServiceFabricList = require('./serviceFabricList'); +exports.LabVirtualMachineList = require('./labVirtualMachineList'); +exports.VirtualNetworkList = require('./virtualNetworkList'); diff --git a/lib/services/devTestLabs/lib/models/lab.js b/lib/services/devTestLabs/lib/models/lab.js index 6d7a53a8eb..e95a38c06c 100644 --- a/lib/services/devTestLabs/lib/models/lab.js +++ b/lib/services/devTestLabs/lib/models/lab.js @@ -32,6 +32,12 @@ class Lab extends models['Resource'] { * @member {string} [labStorageType] Type of storage used by the lab. It can * be either Premium or Standard. Default is Premium. Possible values * include: 'Standard', 'Premium' + * @member {array} [mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * @member {array} [mandatoryArtifactsResourceIdsWindows] The ordered list of + * artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. * @member {date} [createdDate] The creation date of the lab. * @member {string} [premiumDataDisks] The setting to enable usage of premium * data disks. @@ -39,6 +45,42 @@ class Lab extends models['Resource'] { * allowed. * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' + * @member {string} [environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * @member {object} [announcement] The properties of any lab announcement + * associated with this lab + * @member {string} [announcement.title] The plain text title for the lab + * announcement + * @member {string} [announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', + * 'Disabled' + * @member {date} [announcement.expirationDate] The time at which the + * announcement expires (null for never) + * @member {boolean} [announcement.expired] Has this announcement expired? + * @member {string} [announcement.provisioningState] The provisioning status + * of the resource. + * @member {string} [announcement.uniqueIdentifier] The unique immutable + * identifier of a resource (Guid). + * @member {object} [support] The properties of any lab support message + * associated with this lab + * @member {string} [support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [vmCreationResourceGroup] The resource group in which lab + * virtual machines will be created in. + * @member {string} [publicIpId] The public IP address for the lab's load + * balancer. + * @member {string} [loadBalancerId] The load balancer used to for lab VMs + * that use shared IP address. + * @member {string} [networkSecurityGroupId] The Network Security Group + * attached to the lab VMs Network interfaces to restrict open ports. + * @member {object} [extendedProperties] Extended properties of the lab used + * for experimental features * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -154,6 +196,34 @@ class Lab extends models['Resource'] { name: 'String' } }, + mandatoryArtifactsResourceIdsLinux: { + required: false, + serializedName: 'properties.mandatoryArtifactsResourceIdsLinux', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + mandatoryArtifactsResourceIdsWindows: { + required: false, + serializedName: 'properties.mandatoryArtifactsResourceIdsWindows', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, createdDate: { required: false, readOnly: true, @@ -169,8 +239,78 @@ class Lab extends models['Resource'] { name: 'String' } }, + environmentPermission: { + required: false, + serializedName: 'properties.environmentPermission', + type: { + name: 'String' + } + }, + announcement: { + required: false, + serializedName: 'properties.announcement', + type: { + name: 'Composite', + className: 'LabAnnouncementProperties' + } + }, + support: { + required: false, + serializedName: 'properties.support', + type: { + name: 'Composite', + className: 'LabSupportProperties' + } + }, + vmCreationResourceGroup: { + required: false, + readOnly: true, + serializedName: 'properties.vmCreationResourceGroup', + type: { + name: 'String' + } + }, + publicIpId: { + required: false, + readOnly: true, + serializedName: 'properties.publicIpId', + type: { + name: 'String' + } + }, + loadBalancerId: { + required: false, + readOnly: true, + serializedName: 'properties.loadBalancerId', + type: { + name: 'String' + } + }, + networkSecurityGroupId: { + required: false, + readOnly: true, + serializedName: 'properties.networkSecurityGroupId', + type: { + name: 'String' + } + }, + extendedProperties: { + required: false, + serializedName: 'properties.extendedProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -178,6 +318,7 @@ class Lab extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/labAnnouncementProperties.js b/lib/services/devTestLabs/lib/models/labAnnouncementProperties.js new file mode 100644 index 0000000000..e4289902f3 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labAnnouncementProperties.js @@ -0,0 +1,107 @@ +/* + * 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'; + +/** + * Properties of a lab's announcement banner + * + */ +class LabAnnouncementProperties { + /** + * Create a LabAnnouncementProperties. + * @member {string} [title] The plain text title for the lab announcement + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [enabled] Is the lab announcement active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [expirationDate] The time at which the announcement expires + * (null for never) + * @member {boolean} [expired] Has this announcement expired? + * @member {string} [provisioningState] The provisioning status of the + * resource. + * @member {string} [uniqueIdentifier] The unique immutable identifier of a + * resource (Guid). + */ + constructor() { + } + + /** + * Defines the metadata of LabAnnouncementProperties + * + * @returns {object} metadata of LabAnnouncementProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'LabAnnouncementProperties', + type: { + name: 'Composite', + className: 'LabAnnouncementProperties', + modelProperties: { + title: { + required: false, + serializedName: 'title', + type: { + name: 'String' + } + }, + markdown: { + required: false, + serializedName: 'markdown', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serializedName: 'enabled', + type: { + name: 'String' + } + }, + expirationDate: { + required: false, + serializedName: 'expirationDate', + type: { + name: 'DateTime' + } + }, + expired: { + required: false, + serializedName: 'expired', + type: { + name: 'Boolean' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + uniqueIdentifier: { + required: false, + readOnly: true, + serializedName: 'uniqueIdentifier', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabAnnouncementProperties; diff --git a/lib/services/devTestLabs/lib/models/labAnnouncementPropertiesFragment.js b/lib/services/devTestLabs/lib/models/labAnnouncementPropertiesFragment.js new file mode 100644 index 0000000000..9f06d2f072 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labAnnouncementPropertiesFragment.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. + */ + +'use strict'; + +/** + * Properties of a lab's announcement banner + * + */ +class LabAnnouncementPropertiesFragment { + /** + * Create a LabAnnouncementPropertiesFragment. + * @member {string} [title] The plain text title for the lab announcement + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [enabled] Is the lab announcement active/enabled at this + * time?. Possible values include: 'Enabled', 'Disabled' + * @member {date} [expirationDate] The time at which the announcement expires + * (null for never) + * @member {boolean} [expired] Has this announcement expired? + */ + constructor() { + } + + /** + * Defines the metadata of LabAnnouncementPropertiesFragment + * + * @returns {object} metadata of LabAnnouncementPropertiesFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'LabAnnouncementPropertiesFragment', + type: { + name: 'Composite', + className: 'LabAnnouncementPropertiesFragment', + modelProperties: { + title: { + required: false, + serializedName: 'title', + type: { + name: 'String' + } + }, + markdown: { + required: false, + serializedName: 'markdown', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serializedName: 'enabled', + type: { + name: 'String' + } + }, + expirationDate: { + required: false, + serializedName: 'expirationDate', + type: { + name: 'DateTime' + } + }, + expired: { + required: false, + serializedName: 'expired', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = LabAnnouncementPropertiesFragment; diff --git a/lib/services/devTestLabs/lib/models/labCost.js b/lib/services/devTestLabs/lib/models/labCost.js index 635ed6554d..db99e8396d 100644 --- a/lib/services/devTestLabs/lib/models/labCost.js +++ b/lib/services/devTestLabs/lib/models/labCost.js @@ -188,6 +188,7 @@ class LabCost extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -195,6 +196,7 @@ class LabCost extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/labFragment.js b/lib/services/devTestLabs/lib/models/labFragment.js index f752b908ee..ad1413351a 100644 --- a/lib/services/devTestLabs/lib/models/labFragment.js +++ b/lib/services/devTestLabs/lib/models/labFragment.js @@ -15,24 +15,50 @@ const models = require('./index'); /** * A lab. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class LabFragment extends models['Resource'] { +class LabFragment extends models['UpdateResource'] { /** * Create a LabFragment. * @member {string} [labStorageType] Type of storage used by the lab. It can * be either Premium or Standard. Default is Premium. Possible values * include: 'Standard', 'Premium' + * @member {array} [mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * @member {array} [mandatoryArtifactsResourceIdsWindows] The ordered list of + * artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. * @member {string} [premiumDataDisks] The setting to enable usage of premium * data disks. * When its value is 'Enabled', creation of standard or premium data disks is * allowed. * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @member {string} [environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * @member {object} [announcement] The properties of any lab announcement + * associated with this lab + * @member {string} [announcement.title] The plain text title for the lab + * announcement + * @member {string} [announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * @member {string} [announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', + * 'Disabled' + * @member {date} [announcement.expirationDate] The time at which the + * announcement expires (null for never) + * @member {boolean} [announcement.expired] Has this announcement expired? + * @member {object} [support] The properties of any lab support message + * associated with this lab + * @member {string} [support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * @member {object} [extendedProperties] Extended properties of the lab used + * for experimental features */ constructor() { super(); @@ -52,43 +78,47 @@ class LabFragment extends models['Resource'] { name: 'Composite', className: 'LabFragment', modelProperties: { - id: { + tags: { required: false, - readOnly: true, - serializedName: 'id', + serializedName: 'tags', type: { - name: 'String' + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } }, - name: { + labStorageType: { required: false, - readOnly: true, - serializedName: 'name', + serializedName: 'properties.labStorageType', type: { name: 'String' } }, - type: { + mandatoryArtifactsResourceIdsLinux: { required: false, - readOnly: true, - serializedName: 'type', + serializedName: 'properties.mandatoryArtifactsResourceIdsLinux', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } }, - location: { + mandatoryArtifactsResourceIdsWindows: { required: false, - serializedName: 'location', + serializedName: 'properties.mandatoryArtifactsResourceIdsWindows', type: { - name: 'String' - } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, serializedName: 'StringElementType', type: { @@ -97,32 +127,48 @@ class LabFragment extends models['Resource'] { } } }, - labStorageType: { + premiumDataDisks: { required: false, - serializedName: 'properties.labStorageType', + serializedName: 'properties.premiumDataDisks', type: { name: 'String' } }, - premiumDataDisks: { + environmentPermission: { required: false, - serializedName: 'properties.premiumDataDisks', + serializedName: 'properties.environmentPermission', type: { name: 'String' } }, - provisioningState: { + announcement: { required: false, - serializedName: 'properties.provisioningState', + serializedName: 'properties.announcement', type: { - name: 'String' + name: 'Composite', + className: 'LabAnnouncementPropertiesFragment' } }, - uniqueIdentifier: { + support: { required: false, - serializedName: 'properties.uniqueIdentifier', + serializedName: 'properties.support', type: { - name: 'String' + name: 'Composite', + className: 'LabSupportPropertiesFragment' + } + }, + extendedProperties: { + required: false, + serializedName: 'properties.extendedProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } } } diff --git a/lib/services/devTestLabs/lib/models/labList.js b/lib/services/devTestLabs/lib/models/labList.js new file mode 100644 index 0000000000..2dc7a239bf --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labList.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'; + +/** + * The response of a list operation. + */ +class LabList extends Array { + /** + * Create a LabList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LabList + * + * @returns {object} metadata of LabList + * + */ + mapper() { + return { + required: false, + serializedName: 'LabList', + type: { + name: 'Composite', + className: 'LabList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LabElementType', + type: { + name: 'Composite', + className: 'Lab' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabList; diff --git a/lib/services/devTestLabs/lib/models/labSupportProperties.js b/lib/services/devTestLabs/lib/models/labSupportProperties.js new file mode 100644 index 0000000000..f51bd228a5 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labSupportProperties.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'; + +/** + * Properties of a lab's support banner + * + */ +class LabSupportProperties { + /** + * Create a LabSupportProperties. + * @member {string} [enabled] Is the lab support banner active/enabled at + * this time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + */ + constructor() { + } + + /** + * Defines the metadata of LabSupportProperties + * + * @returns {object} metadata of LabSupportProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'LabSupportProperties', + type: { + name: 'Composite', + className: 'LabSupportProperties', + modelProperties: { + enabled: { + required: false, + serializedName: 'enabled', + type: { + name: 'String' + } + }, + markdown: { + required: false, + serializedName: 'markdown', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabSupportProperties; diff --git a/lib/services/devTestLabs/lib/models/labSupportPropertiesFragment.js b/lib/services/devTestLabs/lib/models/labSupportPropertiesFragment.js new file mode 100644 index 0000000000..a617f9c15e --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labSupportPropertiesFragment.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'; + +/** + * Properties of a lab's support banner + * + */ +class LabSupportPropertiesFragment { + /** + * Create a LabSupportPropertiesFragment. + * @member {string} [enabled] Is the lab support banner active/enabled at + * this time?. Possible values include: 'Enabled', 'Disabled' + * @member {string} [markdown] The markdown text (if any) that this lab + * displays in the UI. If left empty/null, nothing will be shown. + */ + constructor() { + } + + /** + * Defines the metadata of LabSupportPropertiesFragment + * + * @returns {object} metadata of LabSupportPropertiesFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'LabSupportPropertiesFragment', + type: { + name: 'Composite', + className: 'LabSupportPropertiesFragment', + modelProperties: { + enabled: { + required: false, + serializedName: 'enabled', + type: { + name: 'String' + } + }, + markdown: { + required: false, + serializedName: 'markdown', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabSupportPropertiesFragment; diff --git a/lib/services/devTestLabs/lib/models/labVhdList.js b/lib/services/devTestLabs/lib/models/labVhdList.js new file mode 100644 index 0000000000..cd432c696b --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labVhdList.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'; + +/** + * The response of a list operation. + */ +class LabVhdList extends Array { + /** + * Create a LabVhdList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LabVhdList + * + * @returns {object} metadata of LabVhdList + * + */ + mapper() { + return { + required: false, + serializedName: 'LabVhdList', + type: { + name: 'Composite', + className: 'LabVhdList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LabVhdElementType', + type: { + name: 'Composite', + className: 'LabVhd' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabVhdList; diff --git a/lib/services/devTestLabs/lib/models/labVirtualMachine.js b/lib/services/devTestLabs/lib/models/labVirtualMachine.js index ae8030a4c6..f4b8c62ecc 100644 --- a/lib/services/devTestLabs/lib/models/labVirtualMachine.js +++ b/lib/services/devTestLabs/lib/models/labVirtualMachine.js @@ -72,6 +72,8 @@ class LabVirtualMachine extends models['Resource'] { * image. * @member {string} [galleryImageReference.version] The version of the * gallery image. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [computeVm] The compute virtual machine properties. * @member {array} [computeVm.statuses] Gets the statuses of the virtual * machine. @@ -145,13 +147,21 @@ class LabVirtualMachine extends models['Resource'] { * @member {string} * [applicableSchedule.labVmsShutdown.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] * Time in minutes before event at which notification will be sent. * @member {string} * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.emailRecipient] + * The email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The * creation date of the schedule. * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The @@ -194,13 +204,21 @@ class LabVirtualMachine extends models['Resource'] { * @member {string} * [applicableSchedule.labVmsStartup.notificationSettings.status] If * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Enabled', 'Disabled' * @member {number} * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time * in minutes before event at which notification will be sent. * @member {string} * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation * date of the schedule. * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The @@ -219,6 +237,12 @@ class LabVirtualMachine extends models['Resource'] { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. + * @member {array} [dataDiskParameters] New or existing data disks to attach + * to the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be + * created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL * @member {string} [provisioningState] The provisioning status of the * resource. * @member {string} [uniqueIdentifier] The unique immutable identifier of a @@ -331,7 +355,6 @@ class LabVirtualMachine extends models['Resource'] { }, computeId: { required: false, - readOnly: true, serializedName: 'properties.computeId', type: { name: 'String' @@ -445,8 +468,16 @@ class LabVirtualMachine extends models['Resource'] { className: 'GalleryImageReference' } }, + planId: { + required: false, + serializedName: 'properties.planId', + type: { + name: 'String' + } + }, computeVm: { required: false, + readOnly: true, serializedName: 'properties.computeVm', type: { name: 'Composite', @@ -463,6 +494,7 @@ class LabVirtualMachine extends models['Resource'] { }, applicableSchedule: { required: false, + readOnly: true, serializedName: 'properties.applicableSchedule', type: { name: 'Composite', @@ -504,8 +536,46 @@ class LabVirtualMachine extends models['Resource'] { name: 'String' } }, + dataDiskParameters: { + required: false, + serializedName: 'properties.dataDiskParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskPropertiesElementType', + type: { + name: 'Composite', + className: 'DataDiskProperties' + } + } + } + }, + scheduleParameters: { + required: false, + serializedName: 'properties.scheduleParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScheduleCreationParameterElementType', + type: { + name: 'Composite', + className: 'ScheduleCreationParameter' + } + } + } + }, + lastKnownPowerState: { + required: false, + serializedName: 'properties.lastKnownPowerState', + type: { + name: 'String' + } + }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -513,6 +583,7 @@ class LabVirtualMachine extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameter.js b/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameter.js index 73753740a1..7eec3312e3 100644 --- a/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameter.js +++ b/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameter.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties for creating a virtual machine. * @@ -33,6 +31,8 @@ class LabVirtualMachineCreationParameter { * @member {string} [createdByUser] The email address of creator of the * virtual machine. * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) + * of the virtual machine. * @member {string} [customImageId] The custom image identifier of the * virtual machine. * @member {string} [osType] The OS type of the virtual machine. @@ -73,20 +73,8 @@ class LabVirtualMachineCreationParameter { * image. * @member {string} [galleryImageReference.version] The version of the * gallery image. - * @member {object} [computeVm] The compute virtual machine properties. - * @member {array} [computeVm.statuses] Gets the statuses of the virtual - * machine. - * @member {string} [computeVm.osType] Gets the OS type of the virtual - * machine. - * @member {string} [computeVm.vmSize] Gets the size of the virtual machine. - * @member {string} [computeVm.networkInterfaceId] Gets the network interface - * ID of the virtual machine. - * @member {string} [computeVm.osDiskId] Gets OS disk blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDiskIds] Gets data disks blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDisks] Gets all data disks attached to the - * virtual machine. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [networkInterface] The network interface properties. * @member {string} [networkInterface.virtualNetworkId] The resource ID of * the virtual network. @@ -110,106 +98,6 @@ class LabVirtualMachineCreationParameter { * @member {array} * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The * incoming NAT rules - * @member {object} [applicableSchedule] The applicable schedule for the - * virtual machine. - * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsShutdown.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If - * the schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, - * etc.). - * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If - * the schedule will occur multiple times a day, specify the hourly - * recurrence. - * @member {number} - * [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] Minutes of the - * hour the schedule will run. - * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The - * creation date of the schedule. - * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [applicableSchedule.labVmsStartup] The auto-startup - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsStartup.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If - * the schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, - * etc.). - * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If - * the schedule will occur multiple times a day, specify the hourly - * recurrence. - * @member {number} - * [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] Minutes of the - * hour the schedule will run. - * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation - * date of the schedule. - * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). * @member {date} [expirationDate] The expiration date for VM. * @member {boolean} [allowClaim] Indicates whether another user can take * ownership of the virtual machine @@ -220,10 +108,12 @@ class LabVirtualMachineCreationParameter { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @member {array} [dataDiskParameters] New or existing data disks to attach + * to the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be + * created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL * @member {string} [name] The name of the virtual machine or environment * @member {string} [location] The location of the new virtual machine or * environment @@ -296,6 +186,13 @@ class LabVirtualMachineCreationParameter { name: 'DateTime' } }, + computeId: { + required: false, + serializedName: 'properties.computeId', + type: { + name: 'String' + } + }, customImageId: { required: false, serializedName: 'properties.customImageId', @@ -404,12 +301,11 @@ class LabVirtualMachineCreationParameter { className: 'GalleryImageReference' } }, - computeVm: { + planId: { required: false, - serializedName: 'properties.computeVm', + serializedName: 'properties.planId', type: { - name: 'Composite', - className: 'ComputeVmProperties' + name: 'String' } }, networkInterface: { @@ -420,14 +316,6 @@ class LabVirtualMachineCreationParameter { className: 'NetworkInterfaceProperties' } }, - applicableSchedule: { - required: false, - serializedName: 'properties.applicableSchedule', - type: { - name: 'Composite', - className: 'ApplicableSchedule' - } - }, expirationDate: { required: false, serializedName: 'properties.expirationDate', @@ -463,16 +351,39 @@ class LabVirtualMachineCreationParameter { name: 'String' } }, - provisioningState: { + dataDiskParameters: { required: false, - serializedName: 'properties.provisioningState', + serializedName: 'properties.dataDiskParameters', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskPropertiesElementType', + type: { + name: 'Composite', + className: 'DataDiskProperties' + } + } + } + }, + scheduleParameters: { + required: false, + serializedName: 'properties.scheduleParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScheduleCreationParameterElementType', + type: { + name: 'Composite', + className: 'ScheduleCreationParameter' + } + } } }, - uniqueIdentifier: { + lastKnownPowerState: { required: false, - serializedName: 'properties.uniqueIdentifier', + serializedName: 'properties.lastKnownPowerState', type: { name: 'String' } diff --git a/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameterFragment.js b/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameterFragment.js new file mode 100644 index 0000000000..637176d064 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labVirtualMachineCreationParameterFragment.js @@ -0,0 +1,425 @@ +/* + * 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'; + +/** + * Properties for creating a virtual machine. + * + */ +class LabVirtualMachineCreationParameterFragment { + /** + * Create a LabVirtualMachineCreationParameterFragment. + * @member {object} [bulkCreationParameters] The number of virtual machine + * instances to create. + * @member {number} [bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * @member {string} [notes] The notes of the virtual machine. + * @member {string} [ownerObjectId] The object identifier of the owner of the + * virtual machine. + * @member {string} [ownerUserPrincipalName] The user principal name of the + * virtual machine owner. + * @member {string} [createdByUserId] The object identifier of the creator of + * the virtual machine. + * @member {string} [createdByUser] The email address of creator of the + * virtual machine. + * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) + * of the virtual machine. + * @member {string} [customImageId] The custom image identifier of the + * virtual machine. + * @member {string} [osType] The OS type of the virtual machine. + * @member {string} [size] The size of the virtual machine. + * @member {string} [userName] The user name of the virtual machine. + * @member {string} [password] The password of the virtual machine + * administrator. + * @member {string} [sshKey] The SSH key of the virtual machine + * administrator. + * @member {boolean} [isAuthenticationWithSshKey] Indicates whether this + * virtual machine uses an SSH key for authentication. + * @member {string} [fqdn] The fully-qualified domain name of the virtual + * machine. + * @member {string} [labSubnetName] The lab subnet name of the virtual + * machine. + * @member {string} [labVirtualNetworkId] The lab virtual network identifier + * of the virtual machine. + * @member {boolean} [disallowPublicIpAddress] Indicates whether the virtual + * machine is to be created without a public IP address. + * @member {array} [artifacts] The artifacts to be installed on the virtual + * machine. + * @member {object} [artifactDeploymentStatus] The artifact deployment status + * for the virtual machine. + * @member {string} [artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. + * @member {number} [artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * @member {number} [artifactDeploymentStatus.totalArtifacts] The total count + * of the artifacts that were tentatively applied. + * @member {object} [galleryImageReference] The Microsoft Azure Marketplace + * image reference of the virtual machine. + * @member {string} [galleryImageReference.offer] The offer of the gallery + * image. + * @member {string} [galleryImageReference.publisher] The publisher of the + * gallery image. + * @member {string} [galleryImageReference.sku] The SKU of the gallery image. + * @member {string} [galleryImageReference.osType] The OS type of the gallery + * image. + * @member {string} [galleryImageReference.version] The version of the + * gallery image. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image + * @member {object} [networkInterface] The network interface properties. + * @member {string} [networkInterface.virtualNetworkId] The resource ID of + * the virtual network. + * @member {string} [networkInterface.subnetId] The resource ID of the sub + * net. + * @member {string} [networkInterface.publicIpAddressId] The resource ID of + * the public IP address. + * @member {string} [networkInterface.publicIpAddress] The public IP address. + * @member {string} [networkInterface.privateIpAddress] The private IP + * address. + * @member {string} [networkInterface.dnsName] The DNS name. + * @member {string} [networkInterface.rdpAuthority] The RdpAuthority property + * is a server DNS host name or IP address followed by the service port + * number for RDP (Remote Desktop Protocol). + * @member {string} [networkInterface.sshAuthority] The SshAuthority property + * is a server DNS host name or IP address followed by the service port + * number for SSH. + * @member {object} [networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * @member {array} + * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The + * incoming NAT rules + * @member {date} [expirationDate] The expiration date for VM. + * @member {boolean} [allowClaim] Indicates whether another user can take + * ownership of the virtual machine + * @member {string} [storageType] Storage type to use for virtual machine + * (i.e. Standard, Premium). + * @member {string} [virtualMachineCreationSource] Tells source of creation + * of lab virtual machine. Output property only. Possible values include: + * 'FromCustomImage', 'FromGalleryImage' + * @member {string} [environmentId] The resource ID of the environment that + * contains this virtual machine, if any. + * @member {array} [dataDiskParameters] New or existing data disks to attach + * to the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be + * created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of LabVirtualMachineCreationParameterFragment + * + * @returns {object} metadata of LabVirtualMachineCreationParameterFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'LabVirtualMachineCreationParameterFragment', + type: { + name: 'Composite', + className: 'LabVirtualMachineCreationParameterFragment', + modelProperties: { + bulkCreationParameters: { + required: false, + serializedName: 'properties.bulkCreationParameters', + type: { + name: 'Composite', + className: 'BulkCreationParametersFragment' + } + }, + notes: { + required: false, + serializedName: 'properties.notes', + type: { + name: 'String' + } + }, + ownerObjectId: { + required: false, + serializedName: 'properties.ownerObjectId', + type: { + name: 'String' + } + }, + ownerUserPrincipalName: { + required: false, + serializedName: 'properties.ownerUserPrincipalName', + type: { + name: 'String' + } + }, + createdByUserId: { + required: false, + serializedName: 'properties.createdByUserId', + type: { + name: 'String' + } + }, + createdByUser: { + required: false, + serializedName: 'properties.createdByUser', + type: { + name: 'String' + } + }, + createdDate: { + required: false, + serializedName: 'properties.createdDate', + type: { + name: 'DateTime' + } + }, + computeId: { + required: false, + serializedName: 'properties.computeId', + type: { + name: 'String' + } + }, + customImageId: { + required: false, + serializedName: 'properties.customImageId', + type: { + name: 'String' + } + }, + osType: { + required: false, + serializedName: 'properties.osType', + type: { + name: 'String' + } + }, + size: { + required: false, + serializedName: 'properties.size', + type: { + name: 'String' + } + }, + userName: { + required: false, + serializedName: 'properties.userName', + type: { + name: 'String' + } + }, + password: { + required: false, + serializedName: 'properties.password', + type: { + name: 'String' + } + }, + sshKey: { + required: false, + serializedName: 'properties.sshKey', + type: { + name: 'String' + } + }, + isAuthenticationWithSshKey: { + required: false, + serializedName: 'properties.isAuthenticationWithSshKey', + type: { + name: 'Boolean' + } + }, + fqdn: { + required: false, + serializedName: 'properties.fqdn', + type: { + name: 'String' + } + }, + labSubnetName: { + required: false, + serializedName: 'properties.labSubnetName', + type: { + name: 'String' + } + }, + labVirtualNetworkId: { + required: false, + serializedName: 'properties.labVirtualNetworkId', + type: { + name: 'String' + } + }, + disallowPublicIpAddress: { + required: false, + serializedName: 'properties.disallowPublicIpAddress', + type: { + name: 'Boolean' + } + }, + artifacts: { + required: false, + serializedName: 'properties.artifacts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArtifactInstallPropertiesFragmentElementType', + type: { + name: 'Composite', + className: 'ArtifactInstallPropertiesFragment' + } + } + } + }, + artifactDeploymentStatus: { + required: false, + serializedName: 'properties.artifactDeploymentStatus', + type: { + name: 'Composite', + className: 'ArtifactDeploymentStatusPropertiesFragment' + } + }, + galleryImageReference: { + required: false, + serializedName: 'properties.galleryImageReference', + type: { + name: 'Composite', + className: 'GalleryImageReferenceFragment' + } + }, + planId: { + required: false, + serializedName: 'properties.planId', + type: { + name: 'String' + } + }, + networkInterface: { + required: false, + serializedName: 'properties.networkInterface', + type: { + name: 'Composite', + className: 'NetworkInterfacePropertiesFragment' + } + }, + expirationDate: { + required: false, + serializedName: 'properties.expirationDate', + type: { + name: 'DateTime' + } + }, + allowClaim: { + required: false, + serializedName: 'properties.allowClaim', + type: { + name: 'Boolean' + } + }, + storageType: { + required: false, + serializedName: 'properties.storageType', + type: { + name: 'String' + } + }, + virtualMachineCreationSource: { + required: false, + serializedName: 'properties.virtualMachineCreationSource', + type: { + name: 'String' + } + }, + environmentId: { + required: false, + serializedName: 'properties.environmentId', + type: { + name: 'String' + } + }, + dataDiskParameters: { + required: false, + serializedName: 'properties.dataDiskParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskPropertiesFragmentElementType', + type: { + name: 'Composite', + className: 'DataDiskPropertiesFragment' + } + } + } + }, + scheduleParameters: { + required: false, + serializedName: 'properties.scheduleParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScheduleCreationParameterFragmentElementType', + type: { + name: 'Composite', + className: 'ScheduleCreationParameterFragment' + } + } + } + }, + lastKnownPowerState: { + required: false, + serializedName: 'properties.lastKnownPowerState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + 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 = LabVirtualMachineCreationParameterFragment; diff --git a/lib/services/devTestLabs/lib/models/labVirtualMachineFragment.js b/lib/services/devTestLabs/lib/models/labVirtualMachineFragment.js index fc9e86afab..8e04993af7 100644 --- a/lib/services/devTestLabs/lib/models/labVirtualMachineFragment.js +++ b/lib/services/devTestLabs/lib/models/labVirtualMachineFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * A virtual machine. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class LabVirtualMachineFragment extends models['Resource'] { +class LabVirtualMachineFragment extends models['UpdateResource'] { /** * Create a LabVirtualMachineFragment. * @member {string} [notes] The notes of the virtual machine. @@ -30,6 +30,8 @@ class LabVirtualMachineFragment extends models['Resource'] { * @member {string} [createdByUser] The email address of creator of the * virtual machine. * @member {date} [createdDate] The creation date of the virtual machine. + * @member {string} [computeId] The resource identifier (Microsoft.Compute) + * of the virtual machine. * @member {string} [customImageId] The custom image identifier of the * virtual machine. * @member {string} [osType] The OS type of the virtual machine. @@ -70,20 +72,8 @@ class LabVirtualMachineFragment extends models['Resource'] { * image. * @member {string} [galleryImageReference.version] The version of the * gallery image. - * @member {object} [computeVm] The compute virtual machine properties. - * @member {array} [computeVm.statuses] Gets the statuses of the virtual - * machine. - * @member {string} [computeVm.osType] Gets the OS type of the virtual - * machine. - * @member {string} [computeVm.vmSize] Gets the size of the virtual machine. - * @member {string} [computeVm.networkInterfaceId] Gets the network interface - * ID of the virtual machine. - * @member {string} [computeVm.osDiskId] Gets OS disk blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDiskIds] Gets data disks blob uri for the - * virtual machine. - * @member {array} [computeVm.dataDisks] Gets all data disks attached to the - * virtual machine. + * @member {string} [planId] The id of the plan associated with the virtual + * machine image * @member {object} [networkInterface] The network interface properties. * @member {string} [networkInterface.virtualNetworkId] The resource ID of * the virtual network. @@ -107,102 +97,6 @@ class LabVirtualMachineFragment extends models['Resource'] { * @member {array} * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The * incoming NAT rules - * @member {object} [applicableSchedule] The applicable schedule for the - * virtual machine. - * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsShutdown.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If - * the schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, - * etc.). - * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If - * the schedule will occur multiple times a day, specify the hourly - * recurrence. - * @member {number} - * [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] Minutes of the - * hour the schedule will run. - * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * @member {object} [applicableSchedule.labVmsStartup] The auto-startup - * schedule, if one has been set at the lab or lab resource level. - * @member {string} [applicableSchedule.labVmsStartup.status] The status of - * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', - * 'Disabled' - * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If - * the schedule will occur only some days of the week, specify the weekly - * recurrence. - * @member {array} - * [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] The days of - * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, - * etc.). - * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily - * recurrence. - * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If - * the schedule will occur multiple times a day, specify the hourly - * recurrence. - * @member {number} - * [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] Minutes of the - * hour the schedule will run. - * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.status] If - * notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * @member {number} - * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time - * in minutes before event at which notification will be sent. - * @member {string} - * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The - * webhook URL to which the notification will be sent. - * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). * @member {date} [expirationDate] The expiration date for VM. * @member {boolean} [allowClaim] Indicates whether another user can take * ownership of the virtual machine @@ -213,10 +107,12 @@ class LabVirtualMachineFragment extends models['Resource'] { * 'FromCustomImage', 'FromGalleryImage' * @member {string} [environmentId] The resource ID of the environment that * contains this virtual machine, if any. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @member {array} [dataDiskParameters] New or existing data disks to attach + * to the virtual machine after creation + * @member {array} [scheduleParameters] Virtual Machine schedules to be + * created + * @member {string} [lastKnownPowerState] Last known compute power state + * captured in DTL */ constructor() { super(); @@ -236,37 +132,6 @@ class LabVirtualMachineFragment extends models['Resource'] { name: 'Composite', className: 'LabVirtualMachineFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -323,6 +188,13 @@ class LabVirtualMachineFragment extends models['Resource'] { name: 'DateTime' } }, + computeId: { + required: false, + serializedName: 'properties.computeId', + type: { + name: 'String' + } + }, customImageId: { required: false, serializedName: 'properties.customImageId', @@ -431,12 +303,11 @@ class LabVirtualMachineFragment extends models['Resource'] { className: 'GalleryImageReferenceFragment' } }, - computeVm: { + planId: { required: false, - serializedName: 'properties.computeVm', + serializedName: 'properties.planId', type: { - name: 'Composite', - className: 'ComputeVmPropertiesFragment' + name: 'String' } }, networkInterface: { @@ -447,14 +318,6 @@ class LabVirtualMachineFragment extends models['Resource'] { className: 'NetworkInterfacePropertiesFragment' } }, - applicableSchedule: { - required: false, - serializedName: 'properties.applicableSchedule', - type: { - name: 'Composite', - className: 'ApplicableScheduleFragment' - } - }, expirationDate: { required: false, serializedName: 'properties.expirationDate', @@ -490,16 +353,39 @@ class LabVirtualMachineFragment extends models['Resource'] { name: 'String' } }, - provisioningState: { + dataDiskParameters: { required: false, - serializedName: 'properties.provisioningState', + serializedName: 'properties.dataDiskParameters', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'DataDiskPropertiesFragmentElementType', + type: { + name: 'Composite', + className: 'DataDiskPropertiesFragment' + } + } + } + }, + scheduleParameters: { + required: false, + serializedName: 'properties.scheduleParameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScheduleCreationParameterFragmentElementType', + type: { + name: 'Composite', + className: 'ScheduleCreationParameterFragment' + } + } } }, - uniqueIdentifier: { + lastKnownPowerState: { required: false, - serializedName: 'properties.uniqueIdentifier', + serializedName: 'properties.lastKnownPowerState', type: { name: 'String' } diff --git a/lib/services/devTestLabs/lib/models/labVirtualMachineList.js b/lib/services/devTestLabs/lib/models/labVirtualMachineList.js new file mode 100644 index 0000000000..5dedf5f19b --- /dev/null +++ b/lib/services/devTestLabs/lib/models/labVirtualMachineList.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'; + +/** + * The response of a list operation. + */ +class LabVirtualMachineList extends Array { + /** + * Create a LabVirtualMachineList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LabVirtualMachineList + * + * @returns {object} metadata of LabVirtualMachineList + * + */ + mapper() { + return { + required: false, + serializedName: 'LabVirtualMachineList', + type: { + name: 'Composite', + className: 'LabVirtualMachineList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LabVirtualMachineElementType', + type: { + name: 'Composite', + className: 'LabVirtualMachine' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LabVirtualMachineList; diff --git a/lib/services/devTestLabs/lib/models/linuxOsInfoFragment.js b/lib/services/devTestLabs/lib/models/linuxOsInfoFragment.js new file mode 100644 index 0000000000..d206cee339 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/linuxOsInfoFragment.js @@ -0,0 +1,55 @@ +/* + * 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 about a Linux OS. + * + */ +class LinuxOsInfoFragment { + /** + * Create a LinuxOsInfoFragment. + * @member {string} [linuxOsState] The state of the Linux OS (i.e. + * NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible + * values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + */ + constructor() { + } + + /** + * Defines the metadata of LinuxOsInfoFragment + * + * @returns {object} metadata of LinuxOsInfoFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'LinuxOsInfoFragment', + type: { + name: 'Composite', + className: 'LinuxOsInfoFragment', + modelProperties: { + linuxOsState: { + required: false, + serializedName: 'linuxOsState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinuxOsInfoFragment; diff --git a/lib/services/devTestLabs/lib/models/networkInterfaceProperties.js b/lib/services/devTestLabs/lib/models/networkInterfaceProperties.js index c523329c03..477e139667 100644 --- a/lib/services/devTestLabs/lib/models/networkInterfaceProperties.js +++ b/lib/services/devTestLabs/lib/models/networkInterfaceProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a network interface. * diff --git a/lib/services/devTestLabs/lib/models/networkInterfacePropertiesFragment.js b/lib/services/devTestLabs/lib/models/networkInterfacePropertiesFragment.js index a53e90fab1..60d380c3e2 100644 --- a/lib/services/devTestLabs/lib/models/networkInterfacePropertiesFragment.js +++ b/lib/services/devTestLabs/lib/models/networkInterfacePropertiesFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a network interface. * diff --git a/lib/services/devTestLabs/lib/models/notificationChannel.js b/lib/services/devTestLabs/lib/models/notificationChannel.js index ee6320853b..659eee15aa 100644 --- a/lib/services/devTestLabs/lib/models/notificationChannel.js +++ b/lib/services/devTestLabs/lib/models/notificationChannel.js @@ -21,6 +21,10 @@ class NotificationChannel extends models['Resource'] { /** * Create a NotificationChannel. * @member {string} [webHookUrl] The webhook URL to send notifications to. + * @member {string} [emailRecipient] The email recipient to send + * notifications to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). * @member {string} [description] Description of notification. * @member {array} [events] The list of event for which this notification is * enabled. @@ -101,6 +105,20 @@ class NotificationChannel extends models['Resource'] { name: 'String' } }, + emailRecipient: { + required: false, + serializedName: 'properties.emailRecipient', + type: { + name: 'String' + } + }, + notificationLocale: { + required: false, + serializedName: 'properties.notificationLocale', + type: { + name: 'String' + } + }, description: { required: false, serializedName: 'properties.description', @@ -133,6 +151,7 @@ class NotificationChannel extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -140,6 +159,7 @@ class NotificationChannel extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/notificationChannelFragment.js b/lib/services/devTestLabs/lib/models/notificationChannelFragment.js index 742f1b92c1..468d34dc11 100644 --- a/lib/services/devTestLabs/lib/models/notificationChannelFragment.js +++ b/lib/services/devTestLabs/lib/models/notificationChannelFragment.js @@ -15,19 +15,19 @@ const models = require('./index'); /** * A notification. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class NotificationChannelFragment extends models['Resource'] { +class NotificationChannelFragment extends models['UpdateResource'] { /** * Create a NotificationChannelFragment. * @member {string} [webHookUrl] The webhook URL to send notifications to. + * @member {string} [emailRecipient] The email recipient to send + * notifications to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). * @member {string} [description] Description of notification. * @member {array} [events] The list of event for which this notification is * enabled. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -47,37 +47,6 @@ class NotificationChannelFragment extends models['Resource'] { name: 'Composite', className: 'NotificationChannelFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -99,6 +68,20 @@ class NotificationChannelFragment extends models['Resource'] { name: 'String' } }, + emailRecipient: { + required: false, + serializedName: 'properties.emailRecipient', + type: { + name: 'String' + } + }, + notificationLocale: { + required: false, + serializedName: 'properties.notificationLocale', + type: { + name: 'String' + } + }, description: { required: false, serializedName: 'properties.description', @@ -120,20 +103,6 @@ class NotificationChannelFragment extends models['Resource'] { } } } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/notificationChannelList.js b/lib/services/devTestLabs/lib/models/notificationChannelList.js new file mode 100644 index 0000000000..12000b67aa --- /dev/null +++ b/lib/services/devTestLabs/lib/models/notificationChannelList.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'; + +/** + * The response of a list operation. + */ +class NotificationChannelList extends Array { + /** + * Create a NotificationChannelList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NotificationChannelList + * + * @returns {object} metadata of NotificationChannelList + * + */ + mapper() { + return { + required: false, + serializedName: 'NotificationChannelList', + type: { + name: 'Composite', + className: 'NotificationChannelList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NotificationChannelElementType', + type: { + name: 'Composite', + className: 'NotificationChannel' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NotificationChannelList; diff --git a/lib/services/devTestLabs/lib/models/notificationSettings.js b/lib/services/devTestLabs/lib/models/notificationSettings.js index 7f8c8270c9..6131afebbe 100644 --- a/lib/services/devTestLabs/lib/models/notificationSettings.js +++ b/lib/services/devTestLabs/lib/models/notificationSettings.js @@ -18,11 +18,15 @@ class NotificationSettings { /** * Create a NotificationSettings. * @member {string} [status] If notifications are enabled for this schedule - * (i.e. Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' + * (i.e. Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' * @member {number} [timeInMinutes] Time in minutes before event at which * notification will be sent. * @member {string} [webhookUrl] The webhook URL to which the notification * will be sent. + * @member {string} [emailRecipient] The email recipient to send + * notifications to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). */ constructor() { } @@ -61,6 +65,20 @@ class NotificationSettings { type: { name: 'String' } + }, + emailRecipient: { + required: false, + serializedName: 'emailRecipient', + type: { + name: 'String' + } + }, + notificationLocale: { + required: false, + serializedName: 'notificationLocale', + type: { + name: 'String' + } } } } diff --git a/lib/services/devTestLabs/lib/models/notificationSettingsFragment.js b/lib/services/devTestLabs/lib/models/notificationSettingsFragment.js index dc236edb01..16b6c091d8 100644 --- a/lib/services/devTestLabs/lib/models/notificationSettingsFragment.js +++ b/lib/services/devTestLabs/lib/models/notificationSettingsFragment.js @@ -18,11 +18,15 @@ class NotificationSettingsFragment { /** * Create a NotificationSettingsFragment. * @member {string} [status] If notifications are enabled for this schedule - * (i.e. Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' + * (i.e. Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' * @member {number} [timeInMinutes] Time in minutes before event at which * notification will be sent. * @member {string} [webhookUrl] The webhook URL to which the notification * will be sent. + * @member {string} [emailRecipient] The email recipient to send + * notifications to (can be a list of semi-colon seperated email addresses). + * @member {string} [notificationLocale] The locale to use when sending a + * notification (fallback for unsupported languages is EN). */ constructor() { } @@ -61,6 +65,20 @@ class NotificationSettingsFragment { type: { name: 'String' } + }, + emailRecipient: { + required: false, + serializedName: 'emailRecipient', + type: { + name: 'String' + } + }, + notificationLocale: { + required: false, + serializedName: 'notificationLocale', + type: { + name: 'String' + } } } } diff --git a/lib/services/devTestLabs/lib/models/operationMetadata.js b/lib/services/devTestLabs/lib/models/operationMetadata.js index 9cba70ec09..c3905f682e 100644 --- a/lib/services/devTestLabs/lib/models/operationMetadata.js +++ b/lib/services/devTestLabs/lib/models/operationMetadata.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The REST API operation supported by DevTestLab ResourceProvider. * diff --git a/lib/services/devTestLabs/lib/models/operationResult.js b/lib/services/devTestLabs/lib/models/operationResult.js index 089703553f..84ec52039c 100644 --- a/lib/services/devTestLabs/lib/models/operationResult.js +++ b/lib/services/devTestLabs/lib/models/operationResult.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * An Operation Result * diff --git a/lib/services/devTestLabs/lib/models/policy.js b/lib/services/devTestLabs/lib/models/policy.js index 72cbe814da..00be763419 100644 --- a/lib/services/devTestLabs/lib/models/policy.js +++ b/lib/services/devTestLabs/lib/models/policy.js @@ -27,7 +27,8 @@ class Policy extends models['Resource'] { * LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * @member {string} [factData] The fact data of the policy. * @member {string} [threshold] The threshold of the policy (i.e. a number * for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). @@ -155,6 +156,7 @@ class Policy extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -162,6 +164,7 @@ class Policy extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/policyFragment.js b/lib/services/devTestLabs/lib/models/policyFragment.js index 0fa8dbda62..192e58f6d3 100644 --- a/lib/services/devTestLabs/lib/models/policyFragment.js +++ b/lib/services/devTestLabs/lib/models/policyFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * A Policy. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class PolicyFragment extends models['Resource'] { +class PolicyFragment extends models['UpdateResource'] { /** * Create a PolicyFragment. * @member {string} [description] The description of the policy. @@ -27,17 +27,14 @@ class PolicyFragment extends models['Resource'] { * LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * @member {string} [factData] The fact data of the policy. * @member {string} [threshold] The threshold of the policy (i.e. a number * for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). * @member {string} [evaluatorType] The evaluator type of the policy (i.e. * AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -57,37 +54,6 @@ class PolicyFragment extends models['Resource'] { name: 'Composite', className: 'PolicyFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -143,20 +109,6 @@ class PolicyFragment extends models['Resource'] { type: { name: 'String' } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/policyList.js b/lib/services/devTestLabs/lib/models/policyList.js new file mode 100644 index 0000000000..c0113d1fba --- /dev/null +++ b/lib/services/devTestLabs/lib/models/policyList.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'; + +/** + * The response of a list operation. + */ +class PolicyList extends Array { + /** + * Create a PolicyList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PolicyList + * + * @returns {object} metadata of PolicyList + * + */ + mapper() { + return { + required: false, + serializedName: 'PolicyList', + type: { + name: 'Composite', + className: 'PolicyList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PolicyElementType', + type: { + name: 'Composite', + className: 'Policy' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PolicyList; diff --git a/lib/services/devTestLabs/lib/models/policySetResult.js b/lib/services/devTestLabs/lib/models/policySetResult.js index 84534c12c9..a3a1446b6a 100644 --- a/lib/services/devTestLabs/lib/models/policySetResult.js +++ b/lib/services/devTestLabs/lib/models/policySetResult.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Result of a policy set evaluation. * diff --git a/lib/services/devTestLabs/lib/models/rdpConnection.js b/lib/services/devTestLabs/lib/models/rdpConnection.js new file mode 100644 index 0000000000..12e45cd65f --- /dev/null +++ b/lib/services/devTestLabs/lib/models/rdpConnection.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'; + +/** + * Represents a .rdp file + * + */ +class RdpConnection { + /** + * Create a RdpConnection. + * @member {string} [contents] The contents of the .rdp file + */ + constructor() { + } + + /** + * Defines the metadata of RdpConnection + * + * @returns {object} metadata of RdpConnection + * + */ + mapper() { + return { + required: false, + serializedName: 'RdpConnection', + type: { + name: 'Composite', + className: 'RdpConnection', + modelProperties: { + contents: { + required: false, + serializedName: 'contents', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RdpConnection; diff --git a/lib/services/devTestLabs/lib/models/resizeLabVirtualMachineProperties.js b/lib/services/devTestLabs/lib/models/resizeLabVirtualMachineProperties.js new file mode 100644 index 0000000000..0c872ae9ba --- /dev/null +++ b/lib/services/devTestLabs/lib/models/resizeLabVirtualMachineProperties.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'; + +/** + * Request body for resizing a virtual machine. + * + */ +class ResizeLabVirtualMachineProperties { + /** + * Create a ResizeLabVirtualMachineProperties. + * @member {string} [size] Specifies the size of the virtual machine. + */ + constructor() { + } + + /** + * Defines the metadata of ResizeLabVirtualMachineProperties + * + * @returns {object} metadata of ResizeLabVirtualMachineProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ResizeLabVirtualMachineProperties', + type: { + name: 'Composite', + className: 'ResizeLabVirtualMachineProperties', + modelProperties: { + size: { + required: false, + serializedName: 'size', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResizeLabVirtualMachineProperties; diff --git a/lib/services/devTestLabs/lib/models/schedule.js b/lib/services/devTestLabs/lib/models/schedule.js index fa69f6fe8b..1632340260 100644 --- a/lib/services/devTestLabs/lib/models/schedule.js +++ b/lib/services/devTestLabs/lib/models/schedule.js @@ -43,11 +43,17 @@ class Schedule extends models['Resource'] { * @member {object} [notificationSettings] Notification settings. * @member {string} [notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values - * include: 'Disabled', 'Enabled' + * include: 'Enabled', 'Disabled' * @member {number} [notificationSettings.timeInMinutes] Time in minutes * before event at which notification will be sent. * @member {string} [notificationSettings.webhookUrl] The webhook URL to * which the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to + * use when sending a notification (fallback for unsupported languages is + * EN). * @member {date} [createdDate] The creation date of the schedule. * @member {string} [targetResourceId] The resource ID to which the schedule * belongs @@ -189,6 +195,7 @@ class Schedule extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -196,6 +203,7 @@ class Schedule extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/scheduleCreationParameter.js b/lib/services/devTestLabs/lib/models/scheduleCreationParameter.js new file mode 100644 index 0000000000..6074b16ce6 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/scheduleCreationParameter.js @@ -0,0 +1,172 @@ +/* + * 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'; + +/** + * Properties for creating a schedule. + * + */ +class ScheduleCreationParameter { + /** + * Create a ScheduleCreationParameter. + * @member {string} [status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * @member {string} [taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [weeklyRecurrence] If the schedule will occur only some + * days of the week, specify the weekly recurrence. + * @member {array} [weeklyRecurrence.weekdays] The days of the week for which + * the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * @member {string} [weeklyRecurrence.time] The time of the day the schedule + * will occur. + * @member {object} [dailyRecurrence] If the schedule will occur once each + * day of the week, specify the daily recurrence. + * @member {string} [dailyRecurrence.time] The time of day the schedule will + * occur. + * @member {object} [hourlyRecurrence] If the schedule will occur multiple + * times a day, specify the hourly recurrence. + * @member {number} [hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * @member {string} [timeZoneId] The time zone ID (e.g. Pacific Standard + * time). + * @member {object} [notificationSettings] Notification settings. + * @member {string} [notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values + * include: 'Enabled', 'Disabled' + * @member {number} [notificationSettings.timeInMinutes] Time in minutes + * before event at which notification will be sent. + * @member {string} [notificationSettings.webhookUrl] The webhook URL to + * which the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to + * use when sending a notification (fallback for unsupported languages is + * EN). + * @member {string} [targetResourceId] The resource ID to which the schedule + * belongs + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of ScheduleCreationParameter + * + * @returns {object} metadata of ScheduleCreationParameter + * + */ + mapper() { + return { + required: false, + serializedName: 'ScheduleCreationParameter', + type: { + name: 'Composite', + className: 'ScheduleCreationParameter', + modelProperties: { + status: { + required: false, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + taskType: { + required: false, + serializedName: 'properties.taskType', + type: { + name: 'String' + } + }, + weeklyRecurrence: { + required: false, + serializedName: 'properties.weeklyRecurrence', + type: { + name: 'Composite', + className: 'WeekDetails' + } + }, + dailyRecurrence: { + required: false, + serializedName: 'properties.dailyRecurrence', + type: { + name: 'Composite', + className: 'DayDetails' + } + }, + hourlyRecurrence: { + required: false, + serializedName: 'properties.hourlyRecurrence', + type: { + name: 'Composite', + className: 'HourDetails' + } + }, + timeZoneId: { + required: false, + serializedName: 'properties.timeZoneId', + type: { + name: 'String' + } + }, + notificationSettings: { + required: false, + serializedName: 'properties.notificationSettings', + type: { + name: 'Composite', + className: 'NotificationSettings' + } + }, + targetResourceId: { + required: false, + serializedName: 'properties.targetResourceId', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + 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 = ScheduleCreationParameter; diff --git a/lib/services/devTestLabs/lib/models/scheduleCreationParameterFragment.js b/lib/services/devTestLabs/lib/models/scheduleCreationParameterFragment.js new file mode 100644 index 0000000000..99f3fd6e36 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/scheduleCreationParameterFragment.js @@ -0,0 +1,172 @@ +/* + * 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'; + +/** + * Properties for creating a schedule. + * + */ +class ScheduleCreationParameterFragment { + /** + * Create a ScheduleCreationParameterFragment. + * @member {string} [status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * @member {string} [taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [weeklyRecurrence] If the schedule will occur only some + * days of the week, specify the weekly recurrence. + * @member {array} [weeklyRecurrence.weekdays] The days of the week for which + * the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * @member {string} [weeklyRecurrence.time] The time of the day the schedule + * will occur. + * @member {object} [dailyRecurrence] If the schedule will occur once each + * day of the week, specify the daily recurrence. + * @member {string} [dailyRecurrence.time] The time of day the schedule will + * occur. + * @member {object} [hourlyRecurrence] If the schedule will occur multiple + * times a day, specify the hourly recurrence. + * @member {number} [hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * @member {string} [timeZoneId] The time zone ID (e.g. Pacific Standard + * time). + * @member {object} [notificationSettings] Notification settings. + * @member {string} [notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values + * include: 'Enabled', 'Disabled' + * @member {number} [notificationSettings.timeInMinutes] Time in minutes + * before event at which notification will be sent. + * @member {string} [notificationSettings.webhookUrl] The webhook URL to + * which the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to + * use when sending a notification (fallback for unsupported languages is + * EN). + * @member {string} [targetResourceId] The resource ID to which the schedule + * belongs + * @member {string} [name] The name of the virtual machine or environment + * @member {string} [location] The location of the new virtual machine or + * environment + * @member {object} [tags] The tags of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of ScheduleCreationParameterFragment + * + * @returns {object} metadata of ScheduleCreationParameterFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'ScheduleCreationParameterFragment', + type: { + name: 'Composite', + className: 'ScheduleCreationParameterFragment', + modelProperties: { + status: { + required: false, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + taskType: { + required: false, + serializedName: 'properties.taskType', + type: { + name: 'String' + } + }, + weeklyRecurrence: { + required: false, + serializedName: 'properties.weeklyRecurrence', + type: { + name: 'Composite', + className: 'WeekDetailsFragment' + } + }, + dailyRecurrence: { + required: false, + serializedName: 'properties.dailyRecurrence', + type: { + name: 'Composite', + className: 'DayDetailsFragment' + } + }, + hourlyRecurrence: { + required: false, + serializedName: 'properties.hourlyRecurrence', + type: { + name: 'Composite', + className: 'HourDetailsFragment' + } + }, + timeZoneId: { + required: false, + serializedName: 'properties.timeZoneId', + type: { + name: 'String' + } + }, + notificationSettings: { + required: false, + serializedName: 'properties.notificationSettings', + type: { + name: 'Composite', + className: 'NotificationSettingsFragment' + } + }, + targetResourceId: { + required: false, + serializedName: 'properties.targetResourceId', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + 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 = ScheduleCreationParameterFragment; diff --git a/lib/services/devTestLabs/lib/models/scheduleFragment.js b/lib/services/devTestLabs/lib/models/scheduleFragment.js index adcc08162a..873ec5db6d 100644 --- a/lib/services/devTestLabs/lib/models/scheduleFragment.js +++ b/lib/services/devTestLabs/lib/models/scheduleFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * A schedule. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class ScheduleFragment extends models['Resource'] { +class ScheduleFragment extends models['UpdateResource'] { /** * Create a ScheduleFragment. * @member {string} [status] The status of the schedule (i.e. Enabled, @@ -43,17 +43,19 @@ class ScheduleFragment extends models['Resource'] { * @member {object} [notificationSettings] Notification settings. * @member {string} [notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values - * include: 'Disabled', 'Enabled' + * include: 'Enabled', 'Disabled' * @member {number} [notificationSettings.timeInMinutes] Time in minutes * before event at which notification will be sent. * @member {string} [notificationSettings.webhookUrl] The webhook URL to * which the notification will be sent. + * @member {string} [notificationSettings.emailRecipient] The email recipient + * to send notifications to (can be a list of semi-colon seperated email + * addresses). + * @member {string} [notificationSettings.notificationLocale] The locale to + * use when sending a notification (fallback for unsupported languages is + * EN). * @member {string} [targetResourceId] The resource ID to which the schedule * belongs - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -73,37 +75,6 @@ class ScheduleFragment extends models['Resource'] { name: 'Composite', className: 'ScheduleFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -177,20 +148,6 @@ class ScheduleFragment extends models['Resource'] { type: { name: 'String' } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/scheduleList.js b/lib/services/devTestLabs/lib/models/scheduleList.js new file mode 100644 index 0000000000..c63310de18 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/scheduleList.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'; + +/** + * The response of a list operation. + */ +class ScheduleList extends Array { + /** + * Create a ScheduleList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ScheduleList + * + * @returns {object} metadata of ScheduleList + * + */ + mapper() { + return { + required: false, + serializedName: 'ScheduleList', + type: { + name: 'Composite', + className: 'ScheduleList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScheduleElementType', + type: { + name: 'Composite', + className: 'Schedule' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ScheduleList; diff --git a/lib/services/devTestLabs/lib/models/secret.js b/lib/services/devTestLabs/lib/models/secret.js index 08d855b4ae..a5cad5540c 100644 --- a/lib/services/devTestLabs/lib/models/secret.js +++ b/lib/services/devTestLabs/lib/models/secret.js @@ -98,6 +98,7 @@ class Secret extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -105,6 +106,7 @@ class Secret extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/secretFragment.js b/lib/services/devTestLabs/lib/models/secretFragment.js new file mode 100644 index 0000000000..654f5748a1 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/secretFragment.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'; + +const models = require('./index'); + +/** + * A secret. + * + * @extends models['UpdateResource'] + */ +class SecretFragment extends models['UpdateResource'] { + /** + * Create a SecretFragment. + * @member {string} [value] The value of the secret for secret creation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretFragment + * + * @returns {object} metadata of SecretFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretFragment', + type: { + name: 'Composite', + className: 'SecretFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + value: { + required: false, + serializedName: 'properties.value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretFragment; diff --git a/lib/services/devTestLabs/lib/models/secretList.js b/lib/services/devTestLabs/lib/models/secretList.js new file mode 100644 index 0000000000..d7eb31e157 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/secretList.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'; + +/** + * The response of a list operation. + */ +class SecretList extends Array { + /** + * Create a SecretList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretList + * + * @returns {object} metadata of SecretList + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretList', + type: { + name: 'Composite', + className: 'SecretList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SecretElementType', + type: { + name: 'Composite', + className: 'Secret' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretList; diff --git a/lib/services/devTestLabs/lib/models/serviceFabric.js b/lib/services/devTestLabs/lib/models/serviceFabric.js new file mode 100644 index 0000000000..b87430174f --- /dev/null +++ b/lib/services/devTestLabs/lib/models/serviceFabric.js @@ -0,0 +1,256 @@ +/* + * 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'); + +/** + * A Service Fabric. + * + * @extends models['Resource'] + */ +class ServiceFabric extends models['Resource'] { + /** + * Create a ServiceFabric. + * @member {string} [externalServiceFabricId] The backing service fabric + * resource's id + * @member {string} [environmentId] The resource id of the environment under + * which the service fabric resource is present + * @member {object} [applicableSchedule] The applicable schedule for the + * virtual machine. + * @member {object} [applicableSchedule.labVmsShutdown] The auto-shutdown + * schedule, if one has been set at the lab or lab resource level. + * @member {string} [applicableSchedule.labVmsShutdown.status] The status of + * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [applicableSchedule.labVmsShutdown.taskType] The task + * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If + * the schedule will occur only some days of the week, specify the weekly + * recurrence. + * @member {array} + * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of + * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, + * etc.). + * @member {string} [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] + * The time of the day the schedule will occur. + * @member {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If + * the schedule will occur once each day of the week, specify the daily + * recurrence. + * @member {string} [applicableSchedule.labVmsShutdown.dailyRecurrence.time] + * The time of day the schedule will occur. + * @member {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If + * the schedule will occur multiple times a day, specify the hourly + * recurrence. + * @member {number} + * [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] Minutes of the + * hour the schedule will run. + * @member {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time + * zone ID (e.g. Pacific Standard time). + * @member {object} [applicableSchedule.labVmsShutdown.notificationSettings] + * Notification settings. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.status] If + * notifications are enabled for this schedule (i.e. Enabled, Disabled). + * Possible values include: 'Enabled', 'Disabled' + * @member {number} + * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes] + * Time in minutes before event at which notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The + * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.emailRecipient] + * The email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsShutdown.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * @member {date} [applicableSchedule.labVmsShutdown.createdDate] The + * creation date of the schedule. + * @member {string} [applicableSchedule.labVmsShutdown.targetResourceId] The + * resource ID to which the schedule belongs + * @member {string} [applicableSchedule.labVmsShutdown.provisioningState] The + * provisioning status of the resource. + * @member {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier] The + * unique immutable identifier of a resource (Guid). + * @member {object} [applicableSchedule.labVmsStartup] The auto-startup + * schedule, if one has been set at the lab or lab resource level. + * @member {string} [applicableSchedule.labVmsStartup.status] The status of + * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled', + * 'Disabled' + * @member {string} [applicableSchedule.labVmsStartup.taskType] The task type + * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @member {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If + * the schedule will occur only some days of the week, specify the weekly + * recurrence. + * @member {array} + * [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] The days of + * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, + * etc.). + * @member {string} [applicableSchedule.labVmsStartup.weeklyRecurrence.time] + * The time of the day the schedule will occur. + * @member {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If the + * schedule will occur once each day of the week, specify the daily + * recurrence. + * @member {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time] + * The time of day the schedule will occur. + * @member {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If + * the schedule will occur multiple times a day, specify the hourly + * recurrence. + * @member {number} + * [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] Minutes of the + * hour the schedule will run. + * @member {string} [applicableSchedule.labVmsStartup.timeZoneId] The time + * zone ID (e.g. Pacific Standard time). + * @member {object} [applicableSchedule.labVmsStartup.notificationSettings] + * Notification settings. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.status] If + * notifications are enabled for this schedule (i.e. Enabled, Disabled). + * Possible values include: 'Enabled', 'Disabled' + * @member {number} + * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time + * in minutes before event at which notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The + * webhook URL to which the notification will be sent. + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.emailRecipient] The + * email recipient to send notifications to (can be a list of semi-colon + * seperated email addresses). + * @member {string} + * [applicableSchedule.labVmsStartup.notificationSettings.notificationLocale] + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * @member {date} [applicableSchedule.labVmsStartup.createdDate] The creation + * date of the schedule. + * @member {string} [applicableSchedule.labVmsStartup.targetResourceId] The + * resource ID to which the schedule belongs + * @member {string} [applicableSchedule.labVmsStartup.provisioningState] The + * provisioning status of the resource. + * @member {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The + * unique immutable identifier of a resource (Guid). + * @member {string} [provisioningState] The provisioning status of the + * resource. + * @member {string} [uniqueIdentifier] The unique immutable identifier of a + * resource (Guid). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceFabric + * + * @returns {object} metadata of ServiceFabric + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceFabric', + type: { + name: 'Composite', + className: 'ServiceFabric', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + externalServiceFabricId: { + required: false, + serializedName: 'properties.externalServiceFabricId', + type: { + name: 'String' + } + }, + environmentId: { + required: false, + serializedName: 'properties.environmentId', + type: { + name: 'String' + } + }, + applicableSchedule: { + required: false, + readOnly: true, + serializedName: 'properties.applicableSchedule', + type: { + name: 'Composite', + className: 'ApplicableSchedule' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + uniqueIdentifier: { + required: false, + readOnly: true, + serializedName: 'properties.uniqueIdentifier', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceFabric; diff --git a/lib/services/devTestLabs/lib/models/serviceFabricFragment.js b/lib/services/devTestLabs/lib/models/serviceFabricFragment.js new file mode 100644 index 0000000000..c820a82b42 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/serviceFabricFragment.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'; + +const models = require('./index'); + +/** + * A Service Fabric. + * + * @extends models['UpdateResource'] + */ +class ServiceFabricFragment extends models['UpdateResource'] { + /** + * Create a ServiceFabricFragment. + * @member {string} [externalServiceFabricId] The backing service fabric + * resource's id + * @member {string} [environmentId] The resource id of the environment under + * which the service fabric resource is present + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceFabricFragment + * + * @returns {object} metadata of ServiceFabricFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceFabricFragment', + type: { + name: 'Composite', + className: 'ServiceFabricFragment', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + externalServiceFabricId: { + required: false, + serializedName: 'properties.externalServiceFabricId', + type: { + name: 'String' + } + }, + environmentId: { + required: false, + serializedName: 'properties.environmentId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceFabricFragment; diff --git a/lib/services/devTestLabs/lib/models/serviceFabricList.js b/lib/services/devTestLabs/lib/models/serviceFabricList.js new file mode 100644 index 0000000000..0273b8f13d --- /dev/null +++ b/lib/services/devTestLabs/lib/models/serviceFabricList.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'; + +/** + * The response of a list operation. + */ +class ServiceFabricList extends Array { + /** + * Create a ServiceFabricList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceFabricList + * + * @returns {object} metadata of ServiceFabricList + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceFabricList', + type: { + name: 'Composite', + className: 'ServiceFabricList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceFabricElementType', + type: { + name: 'Composite', + className: 'ServiceFabric' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceFabricList; diff --git a/lib/services/devTestLabs/lib/models/serviceRunnerList.js b/lib/services/devTestLabs/lib/models/serviceRunnerList.js new file mode 100644 index 0000000000..8afd6e40a4 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/serviceRunnerList.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'; + +/** + * The response of a list operation. + */ +class ServiceRunnerList extends Array { + /** + * Create a ServiceRunnerList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceRunnerList + * + * @returns {object} metadata of ServiceRunnerList + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceRunnerList', + type: { + name: 'Composite', + className: 'ServiceRunnerList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceRunnerElementType', + type: { + name: 'Composite', + className: 'ServiceRunner' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceRunnerList; diff --git a/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfiguration.js b/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfiguration.js index 591c66b9f1..bd84f9ee72 100644 --- a/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfiguration.js +++ b/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a virtual machine that determine how it is connected to a load * balancer. diff --git a/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfigurationFragment.js b/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfigurationFragment.js index cbffb25954..42c111b528 100644 --- a/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfigurationFragment.js +++ b/lib/services/devTestLabs/lib/models/sharedPublicIpAddressConfigurationFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a virtual machine that determine how it is connected to a load * balancer. diff --git a/lib/services/devTestLabs/lib/models/shutdownNotificationContent.js b/lib/services/devTestLabs/lib/models/shutdownNotificationContent.js index 2f55b3bdc5..cbd5faac96 100644 --- a/lib/services/devTestLabs/lib/models/shutdownNotificationContent.js +++ b/lib/services/devTestLabs/lib/models/shutdownNotificationContent.js @@ -24,6 +24,8 @@ class ShutdownNotificationContent { * @member {string} [vmName] The virtual machine to be shut down. * @member {string} [guid] The GUID for the virtual machine to be shut down. * @member {string} [owner] The owner of the virtual machine. + * @member {string} [vmUrl] The URL of the virtual machine. + * @member {string} [minutesUntilShutdown] Minutes remaining until shutdown * @member {string} [eventType] The event for which a notification will be * sent. * @member {string} [text] The text for the notification. @@ -91,6 +93,20 @@ class ShutdownNotificationContent { name: 'String' } }, + vmUrl: { + required: false, + serializedName: 'vmUrl', + type: { + name: 'String' + } + }, + minutesUntilShutdown: { + required: false, + serializedName: 'minutesUntilShutdown', + type: { + name: 'String' + } + }, eventType: { required: false, serializedName: 'eventType', diff --git a/lib/services/devTestLabs/lib/models/subnetOverride.js b/lib/services/devTestLabs/lib/models/subnetOverride.js index 5845158731..ce3353933e 100644 --- a/lib/services/devTestLabs/lib/models/subnetOverride.js +++ b/lib/services/devTestLabs/lib/models/subnetOverride.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Property overrides on a subnet of a virtual network. * diff --git a/lib/services/devTestLabs/lib/models/subnetOverrideFragment.js b/lib/services/devTestLabs/lib/models/subnetOverrideFragment.js index d38eb710ca..f5987a40ff 100644 --- a/lib/services/devTestLabs/lib/models/subnetOverrideFragment.js +++ b/lib/services/devTestLabs/lib/models/subnetOverrideFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Property overrides on a subnet of a virtual network. * diff --git a/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfiguration.js b/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfiguration.js index ea719314f1..acfb4cde22 100644 --- a/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfiguration.js +++ b/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Configuration for public IP address sharing. * diff --git a/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfigurationFragment.js b/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfigurationFragment.js index acdce123a8..98e710921a 100644 --- a/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfigurationFragment.js +++ b/lib/services/devTestLabs/lib/models/subnetSharedPublicIpAddressConfigurationFragment.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Configuration for public IP address sharing. * diff --git a/lib/services/devTestLabs/lib/models/targetCostProperties.js b/lib/services/devTestLabs/lib/models/targetCostProperties.js index a35f25402d..08cbd4300a 100644 --- a/lib/services/devTestLabs/lib/models/targetCostProperties.js +++ b/lib/services/devTestLabs/lib/models/targetCostProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Properties of a cost target. * diff --git a/lib/services/devTestLabs/lib/models/updateResource.js b/lib/services/devTestLabs/lib/models/updateResource.js new file mode 100644 index 0000000000..c9ed32b966 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/updateResource.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'; + +/** + * Represents an update resource + * + */ +class UpdateResource { + /** + * Create a UpdateResource. + * @member {object} [tags] The tags of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateResource + * + * @returns {object} metadata of UpdateResource + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateResource', + type: { + name: 'Composite', + className: 'UpdateResource', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateResource; diff --git a/lib/services/devTestLabs/lib/models/user.js b/lib/services/devTestLabs/lib/models/user.js index f0de136649..7aa719e532 100644 --- a/lib/services/devTestLabs/lib/models/user.js +++ b/lib/services/devTestLabs/lib/models/user.js @@ -132,6 +132,7 @@ class User extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -139,6 +140,7 @@ class User extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/userFragment.js b/lib/services/devTestLabs/lib/models/userFragment.js index 9660852ef7..b71e654874 100644 --- a/lib/services/devTestLabs/lib/models/userFragment.js +++ b/lib/services/devTestLabs/lib/models/userFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Profile of a lab user. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class UserFragment extends models['Resource'] { +class UserFragment extends models['UpdateResource'] { /** * Create a UserFragment. * @member {object} [identity] The identity of the user. @@ -37,10 +37,6 @@ class UserFragment extends models['Resource'] { * @member {string} [secretStore.keyVaultUri] The URI of the user's Key * vault. * @member {string} [secretStore.keyVaultId] The ID of the user's Key vault. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -60,37 +56,6 @@ class UserFragment extends models['Resource'] { name: 'Composite', className: 'UserFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -120,20 +85,6 @@ class UserFragment extends models['Resource'] { name: 'Composite', className: 'UserSecretStoreFragment' } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/userList.js b/lib/services/devTestLabs/lib/models/userList.js new file mode 100644 index 0000000000..3819776cda --- /dev/null +++ b/lib/services/devTestLabs/lib/models/userList.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'; + +/** + * The response of a list operation. + */ +class UserList extends Array { + /** + * Create a UserList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UserList + * + * @returns {object} metadata of UserList + * + */ + mapper() { + return { + required: false, + serializedName: 'UserList', + type: { + name: 'Composite', + className: 'UserList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UserElementType', + type: { + name: 'Composite', + className: 'User' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UserList; diff --git a/lib/services/devTestLabs/lib/models/virtualNetwork.js b/lib/services/devTestLabs/lib/models/virtualNetwork.js index c1b1c7da48..5a8dafe49a 100644 --- a/lib/services/devTestLabs/lib/models/virtualNetwork.js +++ b/lib/services/devTestLabs/lib/models/virtualNetwork.js @@ -128,6 +128,7 @@ class VirtualNetwork extends models['Resource'] { }, externalSubnets: { required: false, + readOnly: true, serializedName: 'properties.externalSubnets', type: { name: 'Sequence', @@ -166,6 +167,7 @@ class VirtualNetwork extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' @@ -173,6 +175,7 @@ class VirtualNetwork extends models['Resource'] { }, uniqueIdentifier: { required: false, + readOnly: true, serializedName: 'properties.uniqueIdentifier', type: { name: 'String' diff --git a/lib/services/devTestLabs/lib/models/virtualNetworkFragment.js b/lib/services/devTestLabs/lib/models/virtualNetworkFragment.js index fb0b36c0fe..d0cae90e8a 100644 --- a/lib/services/devTestLabs/lib/models/virtualNetworkFragment.js +++ b/lib/services/devTestLabs/lib/models/virtualNetworkFragment.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * A virtual network. * - * @extends models['Resource'] + * @extends models['UpdateResource'] */ -class VirtualNetworkFragment extends models['Resource'] { +class VirtualNetworkFragment extends models['UpdateResource'] { /** * Create a VirtualNetworkFragment. * @member {array} [allowedSubnets] The allowed subnets of the virtual @@ -25,13 +25,8 @@ class VirtualNetworkFragment extends models['Resource'] { * @member {string} [description] The description of the virtual network. * @member {string} [externalProviderResourceId] The Microsoft.Network * resource identifier of the virtual network. - * @member {array} [externalSubnets] The external subnet properties. * @member {array} [subnetOverrides] The subnet overrides of the virtual * network. - * @member {string} [provisioningState] The provisioning status of the - * resource. - * @member {string} [uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). */ constructor() { super(); @@ -51,37 +46,6 @@ class VirtualNetworkFragment extends models['Resource'] { name: 'Composite', className: 'VirtualNetworkFragment', modelProperties: { - id: { - required: false, - readOnly: true, - serializedName: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -125,21 +89,6 @@ class VirtualNetworkFragment extends models['Resource'] { name: 'String' } }, - externalSubnets: { - required: false, - serializedName: 'properties.externalSubnets', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ExternalSubnetFragmentElementType', - type: { - name: 'Composite', - className: 'ExternalSubnetFragment' - } - } - } - }, subnetOverrides: { required: false, serializedName: 'properties.subnetOverrides', @@ -154,20 +103,6 @@ class VirtualNetworkFragment extends models['Resource'] { } } } - }, - provisioningState: { - required: false, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - uniqueIdentifier: { - required: false, - serializedName: 'properties.uniqueIdentifier', - type: { - name: 'String' - } } } } diff --git a/lib/services/devTestLabs/lib/models/virtualNetworkList.js b/lib/services/devTestLabs/lib/models/virtualNetworkList.js new file mode 100644 index 0000000000..3f77bf66b5 --- /dev/null +++ b/lib/services/devTestLabs/lib/models/virtualNetworkList.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'; + +/** + * The response of a list operation. + */ +class VirtualNetworkList extends Array { + /** + * Create a VirtualNetworkList. + * @member {string} [nextLink] Link for next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VirtualNetworkList + * + * @returns {object} metadata of VirtualNetworkList + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualNetworkList', + type: { + name: 'Composite', + className: 'VirtualNetworkList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualNetworkElementType', + type: { + name: 'Composite', + className: 'VirtualNetwork' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualNetworkList; diff --git a/lib/services/devTestLabs/lib/models/windowsOsInfoFragment.js b/lib/services/devTestLabs/lib/models/windowsOsInfoFragment.js new file mode 100644 index 0000000000..869545a92a --- /dev/null +++ b/lib/services/devTestLabs/lib/models/windowsOsInfoFragment.js @@ -0,0 +1,54 @@ +/* + * 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 about a Windows OS. + * + */ +class WindowsOsInfoFragment { + /** + * Create a WindowsOsInfoFragment. + * @member {string} [windowsOsState] The state of the Windows OS (i.e. + * NonSysprepped, SysprepRequested, SysprepApplied). Possible values include: + * 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + */ + constructor() { + } + + /** + * Defines the metadata of WindowsOsInfoFragment + * + * @returns {object} metadata of WindowsOsInfoFragment + * + */ + mapper() { + return { + required: false, + serializedName: 'WindowsOsInfoFragment', + type: { + name: 'Composite', + className: 'WindowsOsInfoFragment', + modelProperties: { + windowsOsState: { + required: false, + serializedName: 'windowsOsState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = WindowsOsInfoFragment; diff --git a/lib/services/devTestLabs/lib/operations/armTemplates.js b/lib/services/devTestLabs/lib/operations/armTemplates.js index ace2b85bc2..f360d964c2 100644 --- a/lib/services/devTestLabs/lib/operations/armTemplates.js +++ b/lib/services/devTestLabs/lib/operations/armTemplates.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArmTemplate} for - * more information. + * See {@link ArmTemplateList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, artifactSourceName, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArmTemplate']().mapper(); + let resultMapper = new client.models['ArmTemplateList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -390,8 +390,7 @@ function _get(resourceGroupName, labName, artifactSourceName, name, 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 ResponseWithContinuationArmTemplate} for - * more information. + * See {@link ArmTemplateList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -485,7 +484,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArmTemplate']().mapper(); + let resultMapper = new client.models['ArmTemplateList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -528,19 +527,20 @@ class ArmTemplates { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -573,12 +573,13 @@ class ArmTemplates { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -590,7 +591,7 @@ class ArmTemplates { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArmTemplate} - The deserialized result object. + * @resolve {ArmTemplateList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -599,8 +600,7 @@ class ArmTemplates { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArmTemplate} for - * more information. + * See {@link ArmTemplateList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -739,7 +739,7 @@ class ArmTemplates { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -775,7 +775,7 @@ class ArmTemplates { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArmTemplate} - The deserialized result object. + * @resolve {ArmTemplateList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -784,8 +784,7 @@ class ArmTemplates { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArmTemplate} for - * more information. + * See {@link ArmTemplateList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/artifactSources.js b/lib/services/devTestLabs/lib/operations/artifactSources.js index 0e08c6d541..510ac16992 100644 --- a/lib/services/devTestLabs/lib/operations/artifactSources.js +++ b/lib/services/devTestLabs/lib/operations/artifactSources.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * See {@link ArtifactSourceList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArtifactSource']().mapper(); + let resultMapper = new client.models['ArtifactSourceList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -394,12 +394,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [artifactSource.location] The location of the resource. * * @param {object} [artifactSource.tags] The tags of the resource. @@ -747,14 +741,6 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [artifactSource.location] The location of the resource. - * * @param {object} [artifactSource.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -934,8 +920,7 @@ function _update(resourceGroupName, labName, name, artifactSource, options, call * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * See {@link ArtifactSourceList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1029,7 +1014,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArtifactSource']().mapper(); + let resultMapper = new client.models['ArtifactSourceList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1073,19 +1058,20 @@ class ArtifactSources { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1116,12 +1102,13 @@ class ArtifactSources { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1133,7 +1120,7 @@ class ArtifactSources { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArtifactSource} - The deserialized result object. + * @resolve {ArtifactSourceList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1142,8 +1129,7 @@ class ArtifactSources { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * See {@link ArtifactSourceList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1299,12 +1285,6 @@ class ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [artifactSource.location] The location of the resource. * * @param {object} [artifactSource.tags] The tags of the resource. @@ -1368,12 +1348,6 @@ class ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [artifactSource.location] The location of the resource. * * @param {object} [artifactSource.tags] The tags of the resource. @@ -1548,14 +1522,6 @@ class ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [artifactSource.location] The location of the resource. - * * @param {object} [artifactSource.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1617,14 +1583,6 @@ class ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [artifactSource.location] The location of the resource. - * * @param {object} [artifactSource.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1687,7 +1645,7 @@ class ArtifactSources { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1723,7 +1681,7 @@ class ArtifactSources { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArtifactSource} - The deserialized result object. + * @resolve {ArtifactSourceList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1732,8 +1690,7 @@ class ArtifactSources { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * See {@link ArtifactSourceList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/artifacts.js b/lib/services/devTestLabs/lib/operations/artifacts.js index 3fd05b5825..48806d979b 100644 --- a/lib/services/devTestLabs/lib/operations/artifacts.js +++ b/lib/services/devTestLabs/lib/operations/artifacts.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=title)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * See {@link ArtifactList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, artifactSourceName, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArtifact']().mapper(); + let resultMapper = new client.models['ArtifactList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -582,8 +582,7 @@ function _generateArmTemplate(resourceGroupName, labName, artifactSourceName, na * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * See {@link ArtifactList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -677,7 +676,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationArtifact']().mapper(); + let resultMapper = new client.models['ArtifactList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -721,19 +720,20 @@ class Artifacts { * 'properties($select=title)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -766,12 +766,13 @@ class Artifacts { * 'properties($select=title)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -783,7 +784,7 @@ class Artifacts { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArtifact} - The deserialized result object. + * @resolve {ArtifactList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -792,8 +793,7 @@ class Artifacts { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * See {@link ArtifactList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1062,7 +1062,7 @@ class Artifacts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1098,7 +1098,7 @@ class Artifacts { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationArtifact} - The deserialized result object. + * @resolve {ArtifactList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1107,8 +1107,7 @@ class Artifacts { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * See {@link ArtifactList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/costs.js b/lib/services/devTestLabs/lib/operations/costs.js index 95a8970990..1f89fe6e61 100644 --- a/lib/services/devTestLabs/lib/operations/costs.js +++ b/lib/services/devTestLabs/lib/operations/costs.js @@ -212,12 +212,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * * @param {date} [labCost.createdDate] The creation date of the cost. * - * @param {string} [labCost.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [labCost.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [labCost.location] The location of the resource. * * @param {object} [labCost.tags] The tags of the resource. @@ -543,12 +537,6 @@ class Costs { * * @param {date} [labCost.createdDate] The creation date of the cost. * - * @param {string} [labCost.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [labCost.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [labCost.location] The location of the resource. * * @param {object} [labCost.tags] The tags of the resource. @@ -615,12 +603,6 @@ class Costs { * * @param {date} [labCost.createdDate] The creation date of the cost. * - * @param {string} [labCost.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [labCost.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [labCost.location] The location of the resource. * * @param {object} [labCost.tags] The tags of the resource. diff --git a/lib/services/devTestLabs/lib/operations/customImages.js b/lib/services/devTestLabs/lib/operations/customImages.js index e3b2089d5c..aebc9375dc 100644 --- a/lib/services/devTestLabs/lib/operations/customImages.js +++ b/lib/services/devTestLabs/lib/operations/customImages.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=vm)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationCustomImage} for - * more information. + * See {@link CustomImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationCustomImage']().mapper(); + let resultMapper = new client.models['CustomImageList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -413,11 +413,26 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -558,6 +573,239 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { }); } +/** + * Modify properties of custom images. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the custom image. + * + * @param {object} customImage A custom image. + * + * @param {object} [customImage.vm] The virtual machine from which the image is + * to be created. + * + * @param {string} [customImage.vm.sourceVmId] The source vm identifier. + * + * @param {object} [customImage.vm.windowsOsInfo] The Windows OS information of + * the VM. + * + * @param {string} [customImage.vm.windowsOsInfo.windowsOsState] The state of + * the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * + * @param {object} [customImage.vm.linuxOsInfo] The Linux OS information of the + * VM. + * + * @param {string} [customImage.vm.linuxOsInfo.linuxOsState] The state of the + * Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * + * @param {object} [customImage.vhd] The VHD from which the image is to be + * created. + * + * @param {string} [customImage.vhd.imageName] The image name. + * + * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has + * been run on the VHD. + * + * @param {string} [customImage.vhd.osType] The OS type of the custom image + * (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * + * @param {string} [customImage.description] The description of the custom + * image. + * + * @param {string} [customImage.author] The author of the custom image. + * + * @param {string} [customImage.managedImageId] The Managed Image Id backing + * the custom image. + * + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment + * + * @param {object} [customImage.tags] The tags of the 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 CustomImage} 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, labName, name, customImage, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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 (customImage === null || customImage === undefined) { + throw new Error('customImage cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/customimages/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (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 (customImage !== null && customImage !== undefined) { + let requestModelMapper = new client.models['CustomImageFragment']().mapper(); + requestModel = client.serialize(requestModelMapper, customImage, 'customImage'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(customImage, 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['CustomImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * Create or replace an existing custom image. This operation can take a while * to complete. @@ -610,11 +858,26 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -896,7 +1159,7 @@ function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -947,8 +1210,7 @@ function _beginDeleteMethod(resourceGroupName, labName, 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 ResponseWithContinuationCustomImage} for - * more information. + * See {@link CustomImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1042,7 +1304,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationCustomImage']().mapper(); + let resultMapper = new client.models['CustomImageList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1069,6 +1331,7 @@ class CustomImages { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._update = _update; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._listNext = _listNext; @@ -1087,19 +1350,20 @@ class CustomImages { * 'properties($select=vm)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1130,12 +1394,13 @@ class CustomImages { * 'properties($select=vm)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1147,7 +1412,7 @@ class CustomImages { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationCustomImage} - The deserialized result object. + * @resolve {CustomImageList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1156,8 +1421,7 @@ class CustomImages { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationCustomImage} for - * more information. + * See {@link CustomImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1331,11 +1595,26 @@ class CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -1418,11 +1697,26 @@ class CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -1564,6 +1858,226 @@ class CustomImages { } } + /** + * Modify properties of custom images. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the custom image. + * + * @param {object} customImage A custom image. + * + * @param {object} [customImage.vm] The virtual machine from which the image is + * to be created. + * + * @param {string} [customImage.vm.sourceVmId] The source vm identifier. + * + * @param {object} [customImage.vm.windowsOsInfo] The Windows OS information of + * the VM. + * + * @param {string} [customImage.vm.windowsOsInfo.windowsOsState] The state of + * the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * + * @param {object} [customImage.vm.linuxOsInfo] The Linux OS information of the + * VM. + * + * @param {string} [customImage.vm.linuxOsInfo.linuxOsState] The state of the + * Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * + * @param {object} [customImage.vhd] The VHD from which the image is to be + * created. + * + * @param {string} [customImage.vhd.imageName] The image name. + * + * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has + * been run on the VHD. + * + * @param {string} [customImage.vhd.osType] The OS type of the custom image + * (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * + * @param {string} [customImage.description] The description of the custom + * image. + * + * @param {string} [customImage.author] The author of the custom image. + * + * @param {string} [customImage.managedImageId] The Managed Image Id backing + * the custom image. + * + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment + * + * @param {object} [customImage.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, name, customImage, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, name, customImage, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of custom images. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the custom image. + * + * @param {object} customImage A custom image. + * + * @param {object} [customImage.vm] The virtual machine from which the image is + * to be created. + * + * @param {string} [customImage.vm.sourceVmId] The source vm identifier. + * + * @param {object} [customImage.vm.windowsOsInfo] The Windows OS information of + * the VM. + * + * @param {string} [customImage.vm.windowsOsInfo.windowsOsState] The state of + * the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * + * @param {object} [customImage.vm.linuxOsInfo] The Linux OS information of the + * VM. + * + * @param {string} [customImage.vm.linuxOsInfo.linuxOsState] The state of the + * Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * + * @param {object} [customImage.vhd] The VHD from which the image is to be + * created. + * + * @param {string} [customImage.vhd.imageName] The image name. + * + * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has + * been run on the VHD. + * + * @param {string} [customImage.vhd.osType] The OS type of the custom image + * (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * + * @param {string} [customImage.description] The description of the custom + * image. + * + * @param {string} [customImage.author] The author of the custom image. + * + * @param {string} [customImage.managedImageId] The Managed Image Id backing + * the custom image. + * + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment + * + * @param {object} [customImage.tags] The tags of the resource. + * + * @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 {CustomImage} - 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 CustomImage} 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, labName, name, customImage, 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, labName, name, customImage, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, name, customImage, options, optionalCallback); + } + } + /** * Create or replace an existing custom image. This operation can take a while * to complete. @@ -1616,11 +2130,26 @@ class CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -1703,11 +2232,26 @@ class CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -1862,7 +2406,7 @@ class CustomImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1898,7 +2442,7 @@ class CustomImages { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationCustomImage} - The deserialized result object. + * @resolve {CustomImageList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1907,8 +2451,7 @@ class CustomImages { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationCustomImage} for - * more information. + * See {@link CustomImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/disks.js b/lib/services/devTestLabs/lib/operations/disks.js index 47e71540ab..7a76b7acf1 100644 --- a/lib/services/devTestLabs/lib/operations/disks.js +++ b/lib/services/devTestLabs/lib/operations/disks.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=diskType)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * See {@link DiskList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, userName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationDisk']().mapper(); + let resultMapper = new client.models['DiskList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -407,12 +407,6 @@ function _get(resourceGroupName, labName, userName, name, options, callback) { * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -554,6 +548,204 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call }); } +/** + * Modify properties of disks. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. + * + * @param {object} disk A Disk. + * + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {object} [disk.tags] The tags of the 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 Disk} 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, labName, userName, name, disk, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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 (disk === null || disk === undefined) { + throw new Error('disk cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (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 (disk !== null && disk !== undefined) { + let requestModelMapper = new client.models['DiskFragment']().mapper(); + requestModel = client.serialize(requestModelMapper, disk, 'disk'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(disk, 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['Disk']().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); + }); +} + /** * Attach and create the lease of the disk to the virtual machine. This @@ -734,12 +926,6 @@ function _detach(resourceGroupName, labName, userName, name, detachDiskPropertie * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -1030,7 +1216,7 @@ function _beginDeleteMethod(resourceGroupName, labName, userName, name, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1405,8 +1591,7 @@ function _beginDetach(resourceGroupName, labName, userName, name, detachDiskProp * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * See {@link DiskList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1500,7 +1685,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationDisk']().mapper(); + let resultMapper = new client.models['DiskList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1527,6 +1712,7 @@ class Disks { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._update = _update; this._attach = _attach; this._detach = _detach; this._beginCreateOrUpdate = _beginCreateOrUpdate; @@ -1551,19 +1737,20 @@ class Disks { * 'properties($select=diskType)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1596,12 +1783,13 @@ class Disks { * 'properties($select=diskType)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1613,7 +1801,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationDisk} - The deserialized result object. + * @resolve {DiskList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1622,8 +1810,7 @@ class Disks { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * See {@link DiskList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1783,12 +1970,6 @@ class Disks { * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -1852,12 +2033,6 @@ class Disks { * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -2002,6 +2177,148 @@ class Disks { } } + /** + * Modify properties of disks. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. + * + * @param {object} disk A Disk. + * + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {object} [disk.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, userName, name, disk, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, userName, name, disk, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of disks. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. + * + * @param {object} disk A Disk. + * + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {object} [disk.tags] The tags of the resource. + * + * @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 {Disk} - 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 Disk} 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, labName, userName, name, disk, 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, labName, userName, name, disk, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, userName, name, disk, options, optionalCallback); + } + } + /** * Attach and create the lease of the disk to the virtual machine. This * operation can take a while to complete. @@ -2246,12 +2563,6 @@ class Disks { * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -2315,12 +2626,6 @@ class Disks { * @param {string} [disk.managedDiskId] When backed by managed disk, this is * the ID of the compute disk resource. * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [disk.location] The location of the resource. * * @param {object} [disk.tags] The tags of the resource. @@ -2688,7 +2993,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2724,7 +3029,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationDisk} - The deserialized result object. + * @resolve {DiskList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2733,8 +3038,7 @@ class Disks { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * See {@link DiskList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/environments.js b/lib/services/devTestLabs/lib/operations/environments.js index a3079846c0..84edca06ec 100644 --- a/lib/services/devTestLabs/lib/operations/environments.js +++ b/lib/services/devTestLabs/lib/operations/environments.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=deploymentProperties)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDtlEnvironment} for - * more information. + * See {@link DtlEnvironmentList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, userName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationDtlEnvironment']().mapper(); + let resultMapper = new client.models['DtlEnvironmentList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -400,12 +400,6 @@ function _get(resourceGroupName, labName, userName, name, options, callback) { * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [dtlEnvironment.location] The location of the resource. * * @param {object} [dtlEnvironment.tags] The tags of the resource. @@ -548,8 +542,7 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call } /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * Modify properties of environments. * * @param {string} resourceGroupName The name of the resource group. * @@ -574,11 +567,197 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. + * @param {object} [dtlEnvironment.tags] The tags of the 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 DtlEnvironment} 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, labName, userName, name, dtlEnvironment, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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 (dtlEnvironment === null || dtlEnvironment === undefined) { + throw new Error('dtlEnvironment cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/environments/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (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 (dtlEnvironment !== null && dtlEnvironment !== undefined) { + let requestModelMapper = new client.models['DtlEnvironmentFragment']().mapper(); + requestModel = client.serialize(requestModelMapper, dtlEnvironment, 'dtlEnvironment'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(dtlEnvironment, 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['DtlEnvironment']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or replace an existing environment. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. * * @param {string} [dtlEnvironment.location] The location of the resource. * @@ -870,7 +1049,7 @@ function _beginDeleteMethod(resourceGroupName, labName, userName, name, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -921,8 +1100,7 @@ function _beginDeleteMethod(resourceGroupName, labName, userName, name, 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 ResponseWithContinuationDtlEnvironment} for - * more information. + * See {@link DtlEnvironmentList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1016,7 +1194,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationDtlEnvironment']().mapper(); + let resultMapper = new client.models['DtlEnvironmentList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1043,6 +1221,7 @@ class Environments { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._update = _update; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._listNext = _listNext; @@ -1063,19 +1242,20 @@ class Environments { * 'properties($select=deploymentProperties)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1108,12 +1288,13 @@ class Environments { * 'properties($select=deploymentProperties)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1125,7 +1306,7 @@ class Environments { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationDtlEnvironment} - The deserialized result object. + * @resolve {DtlEnvironmentList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1134,8 +1315,7 @@ class Environments { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDtlEnvironment} for - * more information. + * See {@link DtlEnvironmentList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1288,12 +1468,6 @@ class Environments { * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [dtlEnvironment.location] The location of the resource. * * @param {object} [dtlEnvironment.tags] The tags of the resource. @@ -1350,12 +1524,6 @@ class Environments { * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [dtlEnvironment.location] The location of the resource. * * @param {object} [dtlEnvironment.tags] The tags of the resource. @@ -1501,8 +1669,60 @@ class Environments { } /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * Modify properties of environments. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. + * + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. + * + * @param {object} [dtlEnvironment.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, userName, name, dtlEnvironment, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, userName, name, dtlEnvironment, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of environments. * * @param {string} resourceGroupName The name of the resource group. * @@ -1527,11 +1747,81 @@ class Environments { * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. + * @param {object} [dtlEnvironment.tags] The tags of the resource. + * + * @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 {DtlEnvironment} - 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 DtlEnvironment} 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, labName, userName, name, dtlEnvironment, 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, labName, userName, name, dtlEnvironment, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, userName, name, dtlEnvironment, options, optionalCallback); + } + } + + /** + * Create or replace an existing environment. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. * * @param {string} [dtlEnvironment.location] The location of the resource. * @@ -1589,12 +1879,6 @@ class Environments { * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of * the Azure Resource Manager template that produced the environment. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [dtlEnvironment.location] The location of the resource. * * @param {object} [dtlEnvironment.tags] The tags of the resource. @@ -1752,7 +2036,7 @@ class Environments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1788,7 +2072,7 @@ class Environments { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationDtlEnvironment} - The deserialized result object. + * @resolve {DtlEnvironmentList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1797,8 +2081,7 @@ class Environments { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDtlEnvironment} for - * more information. + * See {@link DtlEnvironmentList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/formulas.js b/lib/services/devTestLabs/lib/operations/formulas.js index e4ea46691e..3f64bbc7f8 100644 --- a/lib/services/devTestLabs/lib/operations/formulas.js +++ b/lib/services/devTestLabs/lib/operations/formulas.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * See {@link FormulaList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationFormula']().mapper(); + let resultMapper = new client.models['FormulaList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -407,6 +407,9 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -476,29 +479,8 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -538,105 +520,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -653,11 +536,14 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -673,12 +559,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [formula.location] The location of the resource. * * @param {object} [formula.tags] The tags of the resource. @@ -887,8 +767,7 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { } /** - * Create or replace an existing Formula. This operation can take a while to - * complete. + * Modify properties of formulas. * * @param {string} resourceGroupName The name of the resource group. * @@ -932,6 +811,9 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -1001,29 +883,8 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -1063,105 +924,6 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -1178,11 +940,14 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -1198,14 +963,6 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [formula.location] The location of the resource. - * * @param {object} [formula.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1226,7 +983,7 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, options, callback) { +function _update(resourceGroupName, labName, name, formula, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1278,7 +1035,7 @@ function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, options // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1301,7 +1058,7 @@ function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, options let requestModel = null; try { if (formula !== null && formula !== undefined) { - let requestModelMapper = new client.models['Formula']().mapper(); + let requestModelMapper = new client.models['FormulaFragment']().mapper(); requestModel = client.serialize(requestModelMapper, formula, 'formula'); requestContent = JSON.stringify(requestModel); } @@ -1317,7 +1074,7 @@ function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, options return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1362,148 +1119,508 @@ function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, options return callback(deserializationError); } } - // 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['Formula']().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); }); } /** - * List formulas in a given lab. + * Create or replace an existing Formula. This operation can take a while to + * complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options] Optional Parameters. + * @param {string} labName The name of the lab. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} name The name of the formula. * - * @param {function} callback - The callback. + * @param {object} formula A formula for creating a VM, specifying an image + * base and other parameters * - * @returns {function} callback(err, result, request, response) + * @param {string} [formula.description] The description of the formula. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {string} [formula.author] The author of the formula. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * @param {string} [formula.osType] The OS type of the formula. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {object} [formula.formulaContent] The content of the formula. * - * {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['ResponseWithContinuationFormula']().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); + * @param {object} [formula.formulaContent.bulkCreationParameters] The number + * of virtual machine instances to create. + * + * @param {number} + * [formula.formulaContent.bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * + * @param {string} [formula.formulaContent.notes] The notes of the virtual + * machine. + * + * @param {string} [formula.formulaContent.ownerObjectId] The object identifier + * of the owner of the virtual machine. + * + * @param {string} [formula.formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [formula.formulaContent.createdByUserId] The object + * identifier of the creator of the virtual machine. + * + * @param {string} [formula.formulaContent.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [formula.formulaContent.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [formula.formulaContent.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [formula.formulaContent.osType] The OS type of the virtual + * machine. + * + * @param {string} [formula.formulaContent.size] The size of the virtual + * machine. + * + * @param {string} [formula.formulaContent.userName] The user name of the + * virtual machine. + * + * @param {string} [formula.formulaContent.password] The password of the + * virtual machine administrator. + * + * @param {string} [formula.formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [formula.formulaContent.isAuthenticationWithSshKey] + * Indicates whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [formula.formulaContent.fqdn] The fully-qualified domain + * name of the virtual machine. + * + * @param {string} [formula.formulaContent.labSubnetName] The lab subnet name + * of the virtual machine. + * + * @param {string} [formula.formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [formula.formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [formula.formulaContent.artifacts] The artifacts to be + * installed on the virtual machine. + * + * @param {object} [formula.formulaContent.artifactDeploymentStatus] The + * artifact deployment status for the virtual machine. + * + * @param {string} + * [formula.formulaContent.artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.totalArtifacts] The total + * count of the artifacts that were tentatively applied. + * + * @param {object} [formula.formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [formula.formulaContent.galleryImageReference.offer] The + * offer of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU + * of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image + * + * @param {object} [formula.formulaContent.networkInterface] The network + * interface properties. + * + * @param {string} [formula.formulaContent.networkInterface.virtualNetworkId] + * The resource ID of the virtual network. + * + * @param {string} [formula.formulaContent.networkInterface.subnetId] The + * resource ID of the sub net. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddressId] + * The resource ID of the public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddress] + * The public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.privateIpAddress] + * The private IP address. + * + * @param {string} [formula.formulaContent.networkInterface.dnsName] The DNS + * name. + * + * @param {string} [formula.formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [formula.formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration] + * The configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. + * + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine + * + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. + * + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL + * + * @param {string} [formula.formulaContent.name] The name of the virtual + * machine or environment + * + * @param {string} [formula.formulaContent.location] The location of the new + * virtual machine or environment + * + * @param {object} [formula.formulaContent.tags] The tags of the resource. + * + * @param {object} [formula.vm] Information about a VM from which a formula is + * to be created. + * + * @param {string} [formula.vm.labVmId] The identifier of the VM from which a + * formula is to be created. + * + * @param {string} [formula.location] The location of the resource. + * + * @param {object} [formula.tags] The tags of the 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 Formula} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, labName, name, formula, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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 (formula === null || formula === undefined) { + throw new Error('formula cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/formulas/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (formula !== null && formula !== undefined) { + let requestModelMapper = new client.models['Formula']().mapper(); + requestModel = client.serialize(requestModelMapper, formula, 'formula'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(formula, 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 !== 201) { + 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['Formula']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Formula']().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); + }); +} + +/** + * List formulas in a given lab. + * + * @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 FormulaList} 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['FormulaList']().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); } } @@ -1518,78 +1635,653 @@ class Formulas { * Create a Formulas. * @param {DevTestLabsClient} client Reference to the service client. */ - constructor(client) { - this.client = client; - this._list = _list; - this._get = _get; - this._createOrUpdate = _createOrUpdate; - this._deleteMethod = _deleteMethod; - this._beginCreateOrUpdate = _beginCreateOrUpdate; - this._listNext = _listNext; + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._listNext = _listNext; + } + + /** + * List formulas in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName, labName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, labName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List formulas in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {FormulaList} - 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 FormulaList} 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(resourceGroupName, labName, 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(resourceGroupName, labName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, labName, options, optionalCallback); + } + } + + /** + * Get formula. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the formula. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @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, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get formula. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the formula. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @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 {Formula} - 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 Formula} 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, labName, 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._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Create or replace an existing Formula. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the formula. + * + * @param {object} formula A formula for creating a VM, specifying an image + * base and other parameters + * + * @param {string} [formula.description] The description of the formula. + * + * @param {string} [formula.author] The author of the formula. + * + * @param {string} [formula.osType] The OS type of the formula. + * + * @param {object} [formula.formulaContent] The content of the formula. + * + * @param {object} [formula.formulaContent.bulkCreationParameters] The number + * of virtual machine instances to create. + * + * @param {number} + * [formula.formulaContent.bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * + * @param {string} [formula.formulaContent.notes] The notes of the virtual + * machine. + * + * @param {string} [formula.formulaContent.ownerObjectId] The object identifier + * of the owner of the virtual machine. + * + * @param {string} [formula.formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [formula.formulaContent.createdByUserId] The object + * identifier of the creator of the virtual machine. + * + * @param {string} [formula.formulaContent.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [formula.formulaContent.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [formula.formulaContent.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [formula.formulaContent.osType] The OS type of the virtual + * machine. + * + * @param {string} [formula.formulaContent.size] The size of the virtual + * machine. + * + * @param {string} [formula.formulaContent.userName] The user name of the + * virtual machine. + * + * @param {string} [formula.formulaContent.password] The password of the + * virtual machine administrator. + * + * @param {string} [formula.formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [formula.formulaContent.isAuthenticationWithSshKey] + * Indicates whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [formula.formulaContent.fqdn] The fully-qualified domain + * name of the virtual machine. + * + * @param {string} [formula.formulaContent.labSubnetName] The lab subnet name + * of the virtual machine. + * + * @param {string} [formula.formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [formula.formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [formula.formulaContent.artifacts] The artifacts to be + * installed on the virtual machine. + * + * @param {object} [formula.formulaContent.artifactDeploymentStatus] The + * artifact deployment status for the virtual machine. + * + * @param {string} + * [formula.formulaContent.artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.totalArtifacts] The total + * count of the artifacts that were tentatively applied. + * + * @param {object} [formula.formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [formula.formulaContent.galleryImageReference.offer] The + * offer of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU + * of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image + * + * @param {object} [formula.formulaContent.networkInterface] The network + * interface properties. + * + * @param {string} [formula.formulaContent.networkInterface.virtualNetworkId] + * The resource ID of the virtual network. + * + * @param {string} [formula.formulaContent.networkInterface.subnetId] The + * resource ID of the sub net. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddressId] + * The resource ID of the public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddress] + * The public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.privateIpAddress] + * The private IP address. + * + * @param {string} [formula.formulaContent.networkInterface.dnsName] The DNS + * name. + * + * @param {string} [formula.formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [formula.formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration] + * The configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. + * + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine + * + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. + * + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL + * + * @param {string} [formula.formulaContent.name] The name of the virtual + * machine or environment + * + * @param {string} [formula.formulaContent.location] The location of the new + * virtual machine or environment + * + * @param {object} [formula.formulaContent.tags] The tags of the resource. + * + * @param {object} [formula.vm] Information about a VM from which a formula is + * to be created. + * + * @param {string} [formula.vm.labVmId] The identifier of the VM from which a + * formula is to be created. + * + * @param {string} [formula.location] The location of the resource. + * + * @param {object} [formula.tags] The 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} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, formula, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); } /** - * List formulas in a given lab. + * Create or replace an existing Formula. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the formula. + * + * @param {object} formula A formula for creating a VM, specifying an image + * base and other parameters + * + * @param {string} [formula.description] The description of the formula. + * + * @param {string} [formula.author] The author of the formula. + * + * @param {string} [formula.osType] The OS type of the formula. + * + * @param {object} [formula.formulaContent] The content of the formula. + * + * @param {object} [formula.formulaContent.bulkCreationParameters] The number + * of virtual machine instances to create. + * + * @param {number} + * [formula.formulaContent.bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * + * @param {string} [formula.formulaContent.notes] The notes of the virtual + * machine. + * + * @param {string} [formula.formulaContent.ownerObjectId] The object identifier + * of the owner of the virtual machine. + * + * @param {string} [formula.formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [formula.formulaContent.createdByUserId] The object + * identifier of the creator of the virtual machine. + * + * @param {string} [formula.formulaContent.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [formula.formulaContent.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [formula.formulaContent.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [formula.formulaContent.osType] The OS type of the virtual + * machine. + * + * @param {string} [formula.formulaContent.size] The size of the virtual + * machine. + * + * @param {string} [formula.formulaContent.userName] The user name of the + * virtual machine. + * + * @param {string} [formula.formulaContent.password] The password of the + * virtual machine administrator. + * + * @param {string} [formula.formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [formula.formulaContent.isAuthenticationWithSshKey] + * Indicates whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [formula.formulaContent.fqdn] The fully-qualified domain + * name of the virtual machine. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [formula.formulaContent.labSubnetName] The lab subnet name + * of the virtual machine. * - * @param {string} labName The name of the lab. + * @param {string} [formula.formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [formula.formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' + * @param {array} [formula.formulaContent.artifacts] The artifacts to be + * installed on the virtual machine. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} [formula.formulaContent.artifactDeploymentStatus] The + * artifact deployment status for the virtual machine. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} + * [formula.formulaContent.artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.totalArtifacts] The total + * count of the artifacts that were tentatively applied. * - * @returns {Promise} A promise is returned + * @param {object} [formula.formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [formula.formulaContent.galleryImageReference.offer] The + * offer of the gallery image. * - * @reject {Error} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName, labName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._list(resourceGroupName, labName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * List formulas in a given lab. + * @param {string} [formula.formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU + * of the gallery image. * - * @param {string} labName The name of the lab. + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. * - * @param {object} [options] Optional Parameters. + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} [formula.formulaContent.networkInterface] The network + * interface properties. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [formula.formulaContent.networkInterface.virtualNetworkId] + * The resource ID of the virtual network. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [formula.formulaContent.networkInterface.subnetId] The + * resource ID of the sub net. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddressId] + * The resource ID of the public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddress] + * The public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.privateIpAddress] + * The private IP address. + * + * @param {string} [formula.formulaContent.networkInterface.dnsName] The DNS + * name. + * + * @param {string} [formula.formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [formula.formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration] + * The configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. + * + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine + * + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. + * + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL + * + * @param {string} [formula.formulaContent.name] The name of the virtual + * machine or environment + * + * @param {string} [formula.formulaContent.location] The location of the new + * virtual machine or environment + * + * @param {object} [formula.formulaContent.tags] The tags of the resource. + * + * @param {object} [formula.vm] Information about a VM from which a formula is + * to be created. + * + * @param {string} [formula.vm.labVmId] The identifier of the VM from which a + * formula is to be created. + * + * @param {string} [formula.location] The location of the resource. + * + * @param {object} [formula.tags] The tags of the resource. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1601,7 +2293,7 @@ class Formulas { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationFormula} - The deserialized result object. + * @resolve {Formula} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1610,14 +2302,13 @@ class Formulas { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * See {@link Formula} 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(resourceGroupName, labName, options, optionalCallback) { + createOrUpdate(resourceGroupName, labName, name, formula, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1626,19 +2317,19 @@ class Formulas { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, labName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, labName, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, labName, name, formula, options, optionalCallback); } } /** - * Get formula. + * Delete formula. * * @param {string} resourceGroupName The name of the resource group. * @@ -1648,23 +2339,20 @@ class Formulas { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' - * * @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} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, labName, name, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1675,7 +2363,7 @@ class Formulas { } /** - * Get formula. + * Delete formula. * * @param {string} resourceGroupName The name of the resource group. * @@ -1685,9 +2373,6 @@ class Formulas { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1698,7 +2383,7 @@ class Formulas { * * {Promise} A promise is returned * - * @resolve {Formula} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1706,14 +2391,13 @@ class Formulas { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Formula} 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. */ - get(resourceGroupName, labName, name, options, optionalCallback) { + deleteMethod(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1722,20 +2406,19 @@ class Formulas { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, labName, name, options, optionalCallback); + return self._deleteMethod(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Create or replace an existing Formula. This operation can take a while to - * complete. + * Modify properties of formulas. * * @param {string} resourceGroupName The name of the resource group. * @@ -1779,6 +2462,9 @@ class Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -1848,29 +2534,8 @@ class Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -1910,105 +2575,6 @@ class Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -2025,11 +2591,14 @@ class Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -2045,14 +2614,6 @@ class Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [formula.location] The location of the resource. - * * @param {object} [formula.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -2066,11 +2627,11 @@ class Formulas { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, formula, options) { + updateWithHttpOperationResponse(resourceGroupName, labName, name, formula, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { + self._update(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2081,8 +2642,7 @@ class Formulas { } /** - * Create or replace an existing Formula. This operation can take a while to - * complete. + * Modify properties of formulas. * * @param {string} resourceGroupName The name of the resource group. * @@ -2126,6 +2686,9 @@ class Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -2189,35 +2752,14 @@ class Formulas { * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU * of the gallery image. * - * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS - * type of the gallery image. - * - * @param {string} [formula.formulaContent.galleryImageReference.version] The - * version of the gallery image. - * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -2257,105 +2799,6 @@ class Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -2372,11 +2815,14 @@ class Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -2392,14 +2838,6 @@ class Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [formula.location] The location of the resource. - * * @param {object} [formula.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -2429,96 +2867,7 @@ class Formulas { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, labName, name, formula, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createOrUpdate(resourceGroupName, labName, name, formula, options, optionalCallback); - } - } - - /** - * Delete formula. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the formula. - * - * @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, labName, name, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Delete formula. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the formula. - * - * @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, labName, name, options, optionalCallback) { + update(resourceGroupName, labName, name, formula, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2527,14 +2876,14 @@ class Formulas { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._update(resourceGroupName, labName, name, formula, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, labName, name, options, optionalCallback); + return self._update(resourceGroupName, labName, name, formula, options, optionalCallback); } } @@ -2584,6 +2933,9 @@ class Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -2653,29 +3005,8 @@ class Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -2715,105 +3046,6 @@ class Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -2830,11 +3062,14 @@ class Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -2850,12 +3085,6 @@ class Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [formula.location] The location of the resource. * * @param {object} [formula.tags] The tags of the resource. @@ -2931,6 +3160,9 @@ class Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -3000,29 +3232,8 @@ class Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -3062,105 +3273,6 @@ class Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -3177,11 +3289,14 @@ class Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -3197,12 +3312,6 @@ class Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [formula.location] The location of the resource. * * @param {object} [formula.tags] The tags of the resource. @@ -3267,7 +3376,7 @@ class Formulas { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3303,7 +3412,7 @@ class Formulas { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationFormula} - The deserialized result object. + * @resolve {FormulaList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3312,8 +3421,7 @@ class Formulas { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * See {@link FormulaList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/galleryImages.js b/lib/services/devTestLabs/lib/operations/galleryImages.js index b14b52fe31..45826bda2e 100644 --- a/lib/services/devTestLabs/lib/operations/galleryImages.js +++ b/lib/services/devTestLabs/lib/operations/galleryImages.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=author)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationGalleryImage} for - * more information. + * See {@link GalleryImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationGalleryImage']().mapper(); + let resultMapper = new client.models['GalleryImageList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -217,8 +217,7 @@ function _list(resourceGroupName, labName, 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 ResponseWithContinuationGalleryImage} for - * more information. + * See {@link GalleryImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -312,7 +311,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationGalleryImage']().mapper(); + let resultMapper = new client.models['GalleryImageList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -352,19 +351,20 @@ class GalleryImages { * 'properties($select=author)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -395,12 +395,13 @@ class GalleryImages { * 'properties($select=author)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -412,7 +413,7 @@ class GalleryImages { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationGalleryImage} - The deserialized result object. + * @resolve {GalleryImageList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -421,8 +422,7 @@ class GalleryImages { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationGalleryImage} for - * more information. + * See {@link GalleryImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -461,7 +461,7 @@ class GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -497,7 +497,7 @@ class GalleryImages { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationGalleryImage} - The deserialized result object. + * @resolve {GalleryImageList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -506,8 +506,7 @@ class GalleryImages { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationGalleryImage} for - * more information. + * See {@link GalleryImageList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/globalSchedules.js b/lib/services/devTestLabs/lib/operations/globalSchedules.js index a976b67852..d8b954410c 100644 --- a/lib/services/devTestLabs/lib/operations/globalSchedules.js +++ b/lib/services/devTestLabs/lib/operations/globalSchedules.js @@ -23,12 +23,13 @@ const WebResource = msRest.WebResource; * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -40,8 +41,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -172,7 +172,7 @@ function _listBySubscription(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -198,12 +198,13 @@ function _listBySubscription(options, callback) { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -215,8 +216,7 @@ function _listBySubscription(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 ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -351,7 +351,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -564,7 +564,7 @@ function _get(resourceGroupName, name, options, callback) { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -572,14 +572,16 @@ function _get(resourceGroupName, name, options, callback) { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -927,7 +929,7 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -935,16 +937,16 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -1538,8 +1540,7 @@ function _beginRetarget(resourceGroupName, name, retargetScheduleProperties, opt * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1633,7 +1634,7 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1666,8 +1667,7 @@ function _listBySubscriptionNext(nextPageLink, 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 ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1761,7 +1761,7 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1807,19 +1807,20 @@ class GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1846,12 +1847,13 @@ class GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1863,7 +1865,7 @@ class GlobalSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1872,8 +1874,7 @@ class GlobalSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1910,19 +1911,20 @@ class GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1951,12 +1953,13 @@ class GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1968,7 +1971,7 @@ class GlobalSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1977,8 +1980,7 @@ class GlobalSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2139,7 +2141,7 @@ class GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2147,14 +2149,16 @@ class GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -2228,7 +2232,7 @@ class GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2236,14 +2240,16 @@ class GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -2424,7 +2430,7 @@ class GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2432,16 +2438,16 @@ class GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -2513,7 +2519,7 @@ class GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2521,16 +2527,16 @@ class GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -2974,7 +2980,7 @@ class GlobalSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3010,7 +3016,7 @@ class GlobalSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3019,8 +3025,7 @@ class GlobalSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3059,7 +3064,7 @@ class GlobalSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3095,7 +3100,7 @@ class GlobalSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3104,8 +3109,7 @@ class GlobalSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/index.d.ts b/lib/services/devTestLabs/lib/operations/index.d.ts index 67f6d7b39d..04a732efac 100644 --- a/lib/services/devTestLabs/lib/operations/index.d.ts +++ b/lib/services/devTestLabs/lib/operations/index.d.ts @@ -149,23 +149,24 @@ export interface Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listBySubscriptionWithHttpOperationResponse(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List labs in a subscription. @@ -176,12 +177,13 @@ export interface Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -193,7 +195,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -201,17 +203,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLab} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * {LabList} [result] - The deserialized result object if an error did not occur. + * See {@link LabList} 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?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -225,23 +226,24 @@ export interface Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List labs in a resource group. @@ -254,12 +256,13 @@ export interface Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -271,7 +274,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -279,17 +282,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLab} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * {LabList} [result] - The deserialized result object if an error did not occur. + * See {@link LabList} 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?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -371,6 +373,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -378,11 +388,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -415,6 +452,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -422,11 +467,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -535,6 +607,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -542,13 +622,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab * - * @param {string} [lab.location] The location of the resource. + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {object} [lab.tags] The tags of the resource. * @@ -578,6 +683,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -585,13 +698,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab * - * @param {string} [lab.location] The location of the resource. + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {object} [lab.tags] The tags of the resource. * @@ -723,6 +861,9 @@ export interface Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -800,30 +941,8 @@ export interface Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -870,107 +989,6 @@ export interface Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -988,11 +1006,14 @@ export interface Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created + * + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -1052,6 +1073,9 @@ export interface Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -1129,30 +1153,8 @@ export interface Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -1199,107 +1201,6 @@ export interface Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -1317,11 +1218,14 @@ export interface Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -1517,6 +1421,90 @@ export interface Labs { generateUploadUri(resourceGroupName: string, name: string, generateUploadUriParameter: models.GenerateUploadUriParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + importVirtualMachineWithHttpOperationResponse(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + importVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + importVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, callback: ServiceCallback): void; + importVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * List disk images available for custom image creation. * @@ -1531,11 +1519,11 @@ export interface Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVhdsWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVhdsWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List disk images available for custom image creation. @@ -1556,7 +1544,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLabVhd} - The deserialized result object. + * @resolve {LabVhdList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1564,17 +1552,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLabVhd} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVhd} for more - * information. + * {LabVhdList} [result] - The deserialized result object if an error did not occur. + * See {@link LabVhdList} 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. */ - listVhds(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVhds(resourceGroupName: string, name: string, callback: ServiceCallback): void; - listVhds(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVhds(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVhds(resourceGroupName: string, name: string, callback: ServiceCallback): void; + listVhds(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1591,6 +1578,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -1598,11 +1593,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -1635,6 +1657,14 @@ export interface Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -1642,11 +1672,38 @@ export interface Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -1838,6 +1895,9 @@ export interface Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -1915,33 +1975,11 @@ export interface Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. - * - * @param {object} [labVirtualMachineCreationParameter.networkInterface] The - * network interface properties. + * @param {object} [labVirtualMachineCreationParameter.networkInterface] The + * network interface properties. * * @param {string} * [labVirtualMachineCreationParameter.networkInterface.virtualNetworkId] The @@ -1985,107 +2023,6 @@ export interface Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -2103,11 +2040,14 @@ export interface Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -2167,6 +2107,9 @@ export interface Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -2244,30 +2187,8 @@ export interface Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -2314,107 +2235,6 @@ export interface Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -2432,11 +2252,14 @@ export interface Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created + * + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -2560,6 +2383,90 @@ export interface Labs { beginExportResourceUsage(resourceGroupName: string, name: string, exportResourceUsageParameters: models.ExportResourceUsageParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + beginImportVirtualMachineWithHttpOperationResponse(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + beginImportVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginImportVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, callback: ServiceCallback): void; + beginImportVirtualMachine(resourceGroupName: string, name: string, importLabVirtualMachineRequest: models.ImportLabVirtualMachineRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * List labs in a subscription. * @@ -2573,11 +2480,11 @@ export interface Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List labs in a subscription. @@ -2597,7 +2504,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2605,17 +2512,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLab} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * {LabList} [result] - The deserialized result object if an error did not occur. + * See {@link LabList} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2631,11 +2537,11 @@ export interface Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List labs in a resource group. @@ -2655,7 +2561,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2663,17 +2569,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLab} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * {LabList} [result] - The deserialized result object if an error did not occur. + * See {@link LabList} 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; + 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; /** @@ -2689,11 +2594,11 @@ export interface Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVhdsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVhdsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List disk images available for custom image creation. @@ -2713,7 +2618,7 @@ export interface Labs { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLabVhd} - The deserialized result object. + * @resolve {LabVhdList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2721,17 +2626,16 @@ export interface Labs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLabVhd} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVhd} for more - * information. + * {LabVhdList} [result] - The deserialized result object if an error did not occur. + * See {@link LabVhdList} 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. */ - listVhdsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVhdsNext(nextPageLink: string, callback: ServiceCallback): void; - listVhdsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVhdsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVhdsNext(nextPageLink: string, callback: ServiceCallback): void; + listVhdsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2820,23 +2724,24 @@ export interface GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listBySubscriptionWithHttpOperationResponse(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a subscription. @@ -2847,12 +2752,13 @@ export interface GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2864,7 +2770,7 @@ export interface GlobalSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2872,17 +2778,16 @@ export interface GlobalSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2896,23 +2801,24 @@ export interface GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a resource group. @@ -2925,12 +2831,13 @@ export interface GlobalSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2942,7 +2849,7 @@ export interface GlobalSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2950,17 +2857,16 @@ export interface GlobalSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3071,7 +2977,7 @@ export interface GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -3079,14 +2985,16 @@ export interface GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -3148,7 +3056,7 @@ export interface GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -3156,14 +3064,16 @@ export interface GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -3302,7 +3212,7 @@ export interface GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -3310,16 +3220,16 @@ export interface GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -3379,7 +3289,7 @@ export interface GlobalSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -3387,16 +3297,16 @@ export interface GlobalSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -3717,11 +3627,11 @@ export interface GlobalSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a subscription. @@ -3741,7 +3651,7 @@ export interface GlobalSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3749,17 +3659,16 @@ export interface GlobalSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3775,11 +3684,11 @@ export interface GlobalSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a resource group. @@ -3799,7 +3708,7 @@ export interface GlobalSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3807,17 +3716,16 @@ export interface GlobalSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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; + 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; } /** @@ -3842,23 +3750,24 @@ export interface ArtifactSources { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List artifact sources in a given lab. @@ -3873,12 +3782,13 @@ export interface ArtifactSources { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3890,7 +3800,7 @@ export interface ArtifactSources { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArtifactSource} - The deserialized result object. + * @resolve {ArtifactSourceList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3898,17 +3808,16 @@ export interface ArtifactSources { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArtifactSource} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * {ArtifactSourceList} [result] - The deserialized result object if an error did not occur. + * See {@link ArtifactSourceList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4014,12 +3923,6 @@ export interface ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [artifactSource.location] The location of the resource. * * @param {object} [artifactSource.tags] The tags of the resource. @@ -4071,12 +3974,6 @@ export interface ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [artifactSource.location] The location of the resource. * * @param {object} [artifactSource.tags] The tags of the resource. @@ -4209,14 +4106,6 @@ export interface ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [artifactSource.location] The location of the resource. - * * @param {object} [artifactSource.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -4266,14 +4155,6 @@ export interface ArtifactSources { * enabled (values: Enabled, Disabled). Possible values include: 'Enabled', * 'Disabled' * - * @param {string} [artifactSource.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [artifactSource.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [artifactSource.location] The location of the resource. - * * @param {object} [artifactSource.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -4321,11 +4202,11 @@ export interface ArtifactSources { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List artifact sources in a given lab. @@ -4345,7 +4226,7 @@ export interface ArtifactSources { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArtifactSource} - The deserialized result object. + * @resolve {ArtifactSourceList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4353,17 +4234,16 @@ export interface ArtifactSources { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArtifactSource} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifactSource} for - * more information. + * {ArtifactSourceList} [result] - The deserialized result object if an error did not occur. + * See {@link ArtifactSourceList} 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; + 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; } /** @@ -4390,23 +4270,24 @@ export interface ArmTemplates { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List azure resource manager templates in a given artifact source. @@ -4423,12 +4304,13 @@ export interface ArmTemplates { * 'properties($select=displayName)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4440,7 +4322,7 @@ export interface ArmTemplates { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArmTemplate} - The deserialized result object. + * @resolve {ArmTemplateList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4448,17 +4330,16 @@ export interface ArmTemplates { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArmTemplate} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArmTemplate} for - * more information. + * {ArmTemplateList} [result] - The deserialized result object if an error did not occur. + * See {@link ArmTemplateList} 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(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, artifactSourceName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, artifactSourceName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, artifactSourceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, artifactSourceName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4547,11 +4428,11 @@ export interface ArmTemplates { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List azure resource manager templates in a given artifact source. @@ -4571,7 +4452,7 @@ export interface ArmTemplates { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArmTemplate} - The deserialized result object. + * @resolve {ArmTemplateList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4579,17 +4460,16 @@ export interface ArmTemplates { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArmTemplate} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArmTemplate} for - * more information. + * {ArmTemplateList} [result] - The deserialized result object if an error did not occur. + * See {@link ArmTemplateList} 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; + 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; } /** @@ -4616,23 +4496,24 @@ export interface Artifacts { * 'properties($select=title)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List artifacts in a given artifact source. @@ -4649,12 +4530,13 @@ export interface Artifacts { * 'properties($select=title)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4666,7 +4548,7 @@ export interface Artifacts { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArtifact} - The deserialized result object. + * @resolve {ArtifactList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4674,17 +4556,16 @@ export interface Artifacts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArtifact} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * {ArtifactList} [result] - The deserialized result object if an error did not occur. + * See {@link ArtifactList} 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(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, artifactSourceName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, artifactSourceName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, artifactSourceName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, artifactSourceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, artifactSourceName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4876,11 +4757,11 @@ export interface Artifacts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List artifacts in a given artifact source. @@ -4900,7 +4781,7 @@ export interface Artifacts { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationArtifact} - The deserialized result object. + * @resolve {ArtifactList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4908,17 +4789,16 @@ export interface Artifacts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationArtifact} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationArtifact} for more - * information. + * {ArtifactList} [result] - The deserialized result object if an error did not occur. + * See {@link ArtifactList} 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; + 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; } /** @@ -5036,12 +4916,6 @@ export interface Costs { * * @param {date} [labCost.createdDate] The creation date of the cost. * - * @param {string} [labCost.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [labCost.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [labCost.location] The location of the resource. * * @param {object} [labCost.tags] The tags of the resource. @@ -5096,12 +4970,6 @@ export interface Costs { * * @param {date} [labCost.createdDate] The creation date of the cost. * - * @param {string} [labCost.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [labCost.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [labCost.location] The location of the resource. * * @param {object} [labCost.tags] The tags of the resource. @@ -5160,23 +5028,24 @@ export interface CustomImages { * 'properties($select=vm)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List custom images in a given lab. @@ -5191,12 +5060,13 @@ export interface CustomImages { * 'properties($select=vm)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5208,7 +5078,7 @@ export interface CustomImages { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationCustomImage} - The deserialized result object. + * @resolve {CustomImageList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5216,17 +5086,16 @@ export interface CustomImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationCustomImage} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationCustomImage} for - * more information. + * {CustomImageList} [result] - The deserialized result object if an error did not occur. + * See {@link CustomImageList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5350,11 +5219,26 @@ export interface CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -5425,11 +5309,26 @@ export interface CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -5530,8 +5429,7 @@ export interface CustomImages { /** - * Create or replace an existing custom image. This operation can take a while - * to complete. + * Modify properties of custom images. * * @param {string} resourceGroupName The name of the resource group. * @@ -5570,8 +5468,8 @@ export interface CustomImages { * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has * been run on the VHD. * - * @param {string} customImage.vhd.osType The OS type of the custom image (i.e. - * Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * @param {string} [customImage.vhd.osType] The OS type of the custom image + * (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' * * @param {string} [customImage.description] The description of the custom * image. @@ -5581,13 +5479,26 @@ export interface CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image * - * @param {string} [customImage.location] The location of the resource. + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {object} [customImage.tags] The tags of the resource. * @@ -5602,11 +5513,207 @@ export interface CustomImages { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, customImage: models.CustomImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, customImage: models.CustomImageFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing custom image. This operation can take a while - * to complete. + * Modify properties of custom images. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the custom image. + * + * @param {object} customImage A custom image. + * + * @param {object} [customImage.vm] The virtual machine from which the image is + * to be created. + * + * @param {string} [customImage.vm.sourceVmId] The source vm identifier. + * + * @param {object} [customImage.vm.windowsOsInfo] The Windows OS information of + * the VM. + * + * @param {string} [customImage.vm.windowsOsInfo.windowsOsState] The state of + * the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * + * @param {object} [customImage.vm.linuxOsInfo] The Linux OS information of the + * VM. + * + * @param {string} [customImage.vm.linuxOsInfo.linuxOsState] The state of the + * Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * + * @param {object} [customImage.vhd] The VHD from which the image is to be + * created. + * + * @param {string} [customImage.vhd.imageName] The image name. + * + * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has + * been run on the VHD. + * + * @param {string} [customImage.vhd.osType] The OS type of the custom image + * (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * + * @param {string} [customImage.description] The description of the custom + * image. + * + * @param {string} [customImage.author] The author of the custom image. + * + * @param {string} [customImage.managedImageId] The Managed Image Id backing + * the custom image. + * + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment + * + * @param {object} [customImage.tags] The 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 {CustomImage} - 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. + * + * {CustomImage} [result] - The deserialized result object if an error did not occur. + * See {@link CustomImage} 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, labName: string, name: string, customImage: models.CustomImageFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, customImage: models.CustomImageFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, customImage: models.CustomImageFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing custom image. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the custom image. + * + * @param {object} customImage A custom image. + * + * @param {object} [customImage.vm] The virtual machine from which the image is + * to be created. + * + * @param {string} [customImage.vm.sourceVmId] The source vm identifier. + * + * @param {object} [customImage.vm.windowsOsInfo] The Windows OS information of + * the VM. + * + * @param {string} [customImage.vm.windowsOsInfo.windowsOsState] The state of + * the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). + * Possible values include: 'NonSysprepped', 'SysprepRequested', + * 'SysprepApplied' + * + * @param {object} [customImage.vm.linuxOsInfo] The Linux OS information of the + * VM. + * + * @param {string} [customImage.vm.linuxOsInfo.linuxOsState] The state of the + * Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). + * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', + * 'DeprovisionApplied' + * + * @param {object} [customImage.vhd] The VHD from which the image is to be + * created. + * + * @param {string} [customImage.vhd.imageName] The image name. + * + * @param {boolean} [customImage.vhd.sysPrep] Indicates whether sysprep has + * been run on the VHD. + * + * @param {string} customImage.vhd.osType The OS type of the custom image (i.e. + * Windows, Linux). Possible values include: 'Windows', 'Linux', 'None' + * + * @param {string} [customImage.description] The description of the custom + * image. + * + * @param {string} [customImage.author] The author of the custom image. + * + * @param {string} [customImage.managedImageId] The Managed Image Id backing + * the custom image. + * + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from + * + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment + * + * @param {string} [customImage.location] The location of the resource. + * + * @param {object} [customImage.tags] The 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, labName: string, name: string, customImage: models.CustomImage, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing custom image. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5656,11 +5763,26 @@ export interface CustomImages { * @param {string} [customImage.managedImageId] The Managed Image Id backing * the custom image. * - * @param {string} [customImage.provisioningState] The provisioning status of - * the resource. + * @param {string} [customImage.managedSnapshotId] The Managed Snapshot Id + * backing the custom image. + * + * @param {array} [customImage.dataDiskStorageInfo] Storage information about + * the data disks present in the custom image + * + * @param {object} [customImage.customImagePlan] Storage information about the + * plan related to this custom image + * + * @param {string} [customImage.customImagePlan.id] The id of the plan, + * equivalent to name of the plan + * + * @param {string} [customImage.customImagePlan.publisher] The publisher for + * the plan from the marketplace image the custom image is derived from * - * @param {string} [customImage.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [customImage.customImagePlan.offer] The offer for the plan + * from the marketplace image the custom image is derived from + * + * @param {boolean} [customImage.isPlanAuthorized] Whether or not the custom + * images underlying offer/plan has been enabled for programmatic deployment * * @param {string} [customImage.location] The location of the resource. * @@ -5773,11 +5895,11 @@ export interface CustomImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List custom images in a given lab. @@ -5797,7 +5919,7 @@ export interface CustomImages { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationCustomImage} - The deserialized result object. + * @resolve {CustomImageList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5805,17 +5927,16 @@ export interface CustomImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationCustomImage} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationCustomImage} for - * more information. + * {CustomImageList} [result] - The deserialized result object if an error did not occur. + * See {@link CustomImageList} 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; + 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; } /** @@ -5840,23 +5961,24 @@ export interface Formulas { * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List formulas in a given lab. @@ -5871,12 +5993,13 @@ export interface Formulas { * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5888,7 +6011,7 @@ export interface Formulas { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationFormula} - The deserialized result object. + * @resolve {FormulaList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5896,17 +6019,16 @@ export interface Formulas { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationFormula} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * {FormulaList} [result] - The deserialized result object if an error did not occur. + * See {@link FormulaList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6024,6 +6146,9 @@ export interface Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -6093,29 +6218,8 @@ export interface Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -6155,105 +6259,6 @@ export interface Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -6270,11 +6275,14 @@ export interface Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -6290,12 +6298,6 @@ export interface Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [formula.location] The location of the resource. * * @param {object} [formula.tags] The tags of the resource. @@ -6359,6 +6361,9 @@ export interface Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -6428,29 +6433,8 @@ export interface Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -6490,126 +6474,30 @@ export interface Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * - * @param {date} [formula.formulaContent.expirationDate] The expiration date - * for VM. - * - * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether - * another user can take ownership of the virtual machine - * - * @param {string} [formula.formulaContent.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). - * - * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' - * - * @param {string} [formula.formulaContent.environmentId] The resource ID of - * the environment that contains this virtual machine, if any. - * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -6625,12 +6513,6 @@ export interface Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * * @param {string} [formula.location] The location of the resource. * * @param {object} [formula.tags] The tags of the resource. @@ -6730,8 +6612,7 @@ export interface Formulas { /** - * Create or replace an existing Formula. This operation can take a while to - * complete. + * Modify properties of formulas. * * @param {string} resourceGroupName The name of the resource group. * @@ -6775,6 +6656,9 @@ export interface Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -6844,29 +6728,8 @@ export interface Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -6906,105 +6769,6 @@ export interface Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -7021,11 +6785,14 @@ export interface Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -7041,14 +6808,6 @@ export interface Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [formula.location] The location of the resource. - * * @param {object} [formula.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -7062,11 +6821,10 @@ export interface Formulas { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, formula: models.Formula, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, formula: models.FormulaFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing Formula. This operation can take a while to - * complete. + * Modify properties of formulas. * * @param {string} resourceGroupName The name of the resource group. * @@ -7110,6 +6868,9 @@ export interface Formulas { * @param {date} [formula.formulaContent.createdDate] The creation date of the * virtual machine. * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [formula.formulaContent.customImageId] The custom image * identifier of the virtual machine. * @@ -7179,29 +6940,8 @@ export interface Formulas { * @param {string} [formula.formulaContent.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [formula.formulaContent.computeVm] The compute virtual - * machine properties. - * - * @param {array} [formula.formulaContent.computeVm.statuses] Gets the statuses - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osType] Gets the OS type - * of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.vmSize] Gets the size of - * the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.networkInterfaceId] Gets - * the network interface ID of the virtual machine. - * - * @param {string} [formula.formulaContent.computeVm.osDiskId] Gets OS disk - * blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDiskIds] Gets data - * disks blob uri for the virtual machine. - * - * @param {array} [formula.formulaContent.computeVm.dataDisks] Gets all data - * disks attached to the virtual machine. + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image * * @param {object} [formula.formulaContent.networkInterface] The network * interface properties. @@ -7241,105 +6981,6 @@ export interface Formulas { * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [formula.formulaContent.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsShutdown] - * The auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [formula.formulaContent.applicableSchedule.labVmsStartup] - * The auto-startup schedule, if one has been set at the lab or lab resource - * level. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.status] The status - * of the schedule (i.e. Enabled, Disabled). Possible values include: - * 'Enabled', 'Disabled' - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.taskType] The task - * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence] If - * the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.timeZoneId] The - * time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [formula.formulaContent.applicableSchedule.labVmsStartup.location] The - * location of the resource. - * - * @param {object} - * [formula.formulaContent.applicableSchedule.labVmsStartup.tags] The tags of - * the resource. - * - * @param {string} [formula.formulaContent.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [formula.formulaContent.applicableSchedule.tags] The tags of - * the resource. - * * @param {date} [formula.formulaContent.expirationDate] The expiration date * for VM. * @@ -7356,11 +6997,14 @@ export interface Formulas { * @param {string} [formula.formulaContent.environmentId] The resource ID of * the environment that contains this virtual machine, if any. * - * @param {string} [formula.formulaContent.provisioningState] The provisioning - * status of the resource. + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [formula.formulaContent.uniqueIdentifier] The unique - * immutable identifier of a resource (Guid). + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL * * @param {string} [formula.formulaContent.name] The name of the virtual * machine or environment @@ -7376,14 +7020,6 @@ export interface Formulas { * @param {string} [formula.vm.labVmId] The identifier of the VM from which a * formula is to be created. * - * @param {string} [formula.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [formula.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [formula.location] The location of the resource. - * * @param {object} [formula.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -7413,128 +7049,3236 @@ export interface Formulas { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, formula: models.Formula, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, formula: models.Formula, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, formula: models.Formula, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, formula: models.FormulaFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, formula: models.FormulaFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, formula: models.FormulaFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List formulas in a given lab. + * Create or replace an existing Formula. This operation can take a while to + * complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options] Optional Parameters. + * @param {string} labName The name of the lab. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} name The name of the formula. * - * @returns {Promise} A promise is returned + * @param {object} formula A formula for creating a VM, specifying an image + * base and other parameters * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [formula.description] The description of the formula. * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List formulas in a given lab. + * @param {string} [formula.author] The author of the formula. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [formula.osType] The OS type of the formula. * - * @param {object} [options] Optional Parameters. + * @param {object} [formula.formulaContent] The content of the formula. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [formula.formulaContent.bulkCreationParameters] The number + * of virtual machine instances to create. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {number} + * [formula.formulaContent.bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [formula.formulaContent.notes] The notes of the virtual + * machine. * - * {Promise} A promise is returned. + * @param {string} [formula.formulaContent.ownerObjectId] The object identifier + * of the owner of the virtual machine. * - * @resolve {ResponseWithContinuationFormula} - The deserialized result object. + * @param {string} [formula.formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [formula.formulaContent.createdByUserId] The object + * identifier of the creator of the virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [formula.formulaContent.createdByUser] The email address of + * creator of the virtual machine. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {date} [formula.formulaContent.createdDate] The creation date of the + * virtual machine. * - * {ResponseWithContinuationFormula} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationFormula} for more - * information. + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [formula.formulaContent.customImageId] The custom image + * identifier of the virtual machine. * - * {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 - * GalleryImages - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface GalleryImages { - - - /** - * List gallery images in a given lab. + * @param {string} [formula.formulaContent.osType] The OS type of the virtual + * machine. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [formula.formulaContent.size] The size of the virtual + * machine. + * + * @param {string} [formula.formulaContent.userName] The user name of the + * virtual machine. + * + * @param {string} [formula.formulaContent.password] The password of the + * virtual machine administrator. + * + * @param {string} [formula.formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [formula.formulaContent.isAuthenticationWithSshKey] + * Indicates whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [formula.formulaContent.fqdn] The fully-qualified domain + * name of the virtual machine. + * + * @param {string} [formula.formulaContent.labSubnetName] The lab subnet name + * of the virtual machine. + * + * @param {string} [formula.formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [formula.formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [formula.formulaContent.artifacts] The artifacts to be + * installed on the virtual machine. + * + * @param {object} [formula.formulaContent.artifactDeploymentStatus] The + * artifact deployment status for the virtual machine. + * + * @param {string} + * [formula.formulaContent.artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.totalArtifacts] The total + * count of the artifacts that were tentatively applied. + * + * @param {object} [formula.formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [formula.formulaContent.galleryImageReference.offer] The + * offer of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU + * of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image + * + * @param {object} [formula.formulaContent.networkInterface] The network + * interface properties. + * + * @param {string} [formula.formulaContent.networkInterface.virtualNetworkId] + * The resource ID of the virtual network. + * + * @param {string} [formula.formulaContent.networkInterface.subnetId] The + * resource ID of the sub net. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddressId] + * The resource ID of the public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddress] + * The public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.privateIpAddress] + * The private IP address. + * + * @param {string} [formula.formulaContent.networkInterface.dnsName] The DNS + * name. + * + * @param {string} [formula.formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [formula.formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration] + * The configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. + * + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine + * + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. + * + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL + * + * @param {string} [formula.formulaContent.name] The name of the virtual + * machine or environment + * + * @param {string} [formula.formulaContent.location] The location of the new + * virtual machine or environment + * + * @param {object} [formula.formulaContent.tags] The tags of the resource. + * + * @param {object} [formula.vm] Information about a VM from which a formula is + * to be created. + * + * @param {string} [formula.vm.labVmId] The identifier of the VM from which a + * formula is to be created. + * + * @param {string} [formula.location] The location of the resource. + * + * @param {object} [formula.tags] The 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, labName: string, name: string, formula: models.Formula, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing Formula. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the formula. + * + * @param {object} formula A formula for creating a VM, specifying an image + * base and other parameters + * + * @param {string} [formula.description] The description of the formula. + * + * @param {string} [formula.author] The author of the formula. + * + * @param {string} [formula.osType] The OS type of the formula. + * + * @param {object} [formula.formulaContent] The content of the formula. + * + * @param {object} [formula.formulaContent.bulkCreationParameters] The number + * of virtual machine instances to create. + * + * @param {number} + * [formula.formulaContent.bulkCreationParameters.instanceCount] The number of + * virtual machine instances to create. + * + * @param {string} [formula.formulaContent.notes] The notes of the virtual + * machine. + * + * @param {string} [formula.formulaContent.ownerObjectId] The object identifier + * of the owner of the virtual machine. + * + * @param {string} [formula.formulaContent.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [formula.formulaContent.createdByUserId] The object + * identifier of the creator of the virtual machine. + * + * @param {string} [formula.formulaContent.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [formula.formulaContent.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [formula.formulaContent.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [formula.formulaContent.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [formula.formulaContent.osType] The OS type of the virtual + * machine. + * + * @param {string} [formula.formulaContent.size] The size of the virtual + * machine. + * + * @param {string} [formula.formulaContent.userName] The user name of the + * virtual machine. + * + * @param {string} [formula.formulaContent.password] The password of the + * virtual machine administrator. + * + * @param {string} [formula.formulaContent.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [formula.formulaContent.isAuthenticationWithSshKey] + * Indicates whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [formula.formulaContent.fqdn] The fully-qualified domain + * name of the virtual machine. + * + * @param {string} [formula.formulaContent.labSubnetName] The lab subnet name + * of the virtual machine. + * + * @param {string} [formula.formulaContent.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [formula.formulaContent.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [formula.formulaContent.artifacts] The artifacts to be + * installed on the virtual machine. + * + * @param {object} [formula.formulaContent.artifactDeploymentStatus] The + * artifact deployment status for the virtual machine. + * + * @param {string} + * [formula.formulaContent.artifactDeploymentStatus.deploymentStatus] The + * deployment status of the artifact. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} + * [formula.formulaContent.artifactDeploymentStatus.totalArtifacts] The total + * count of the artifacts that were tentatively applied. + * + * @param {object} [formula.formulaContent.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [formula.formulaContent.galleryImageReference.offer] The + * offer of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.sku] The SKU + * of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.osType] The OS + * type of the gallery image. + * + * @param {string} [formula.formulaContent.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [formula.formulaContent.planId] The id of the plan + * associated with the virtual machine image + * + * @param {object} [formula.formulaContent.networkInterface] The network + * interface properties. + * + * @param {string} [formula.formulaContent.networkInterface.virtualNetworkId] + * The resource ID of the virtual network. + * + * @param {string} [formula.formulaContent.networkInterface.subnetId] The + * resource ID of the sub net. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddressId] + * The resource ID of the public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.publicIpAddress] + * The public IP address. + * + * @param {string} [formula.formulaContent.networkInterface.privateIpAddress] + * The private IP address. + * + * @param {string} [formula.formulaContent.networkInterface.dnsName] The DNS + * name. + * + * @param {string} [formula.formulaContent.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [formula.formulaContent.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration] + * The configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [formula.formulaContent.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [formula.formulaContent.expirationDate] The expiration date + * for VM. + * + * @param {boolean} [formula.formulaContent.allowClaim] Indicates whether + * another user can take ownership of the virtual machine + * + * @param {string} [formula.formulaContent.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [formula.formulaContent.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [formula.formulaContent.environmentId] The resource ID of + * the environment that contains this virtual machine, if any. + * + * @param {array} [formula.formulaContent.dataDiskParameters] New or existing + * data disks to attach to the virtual machine after creation + * + * @param {array} [formula.formulaContent.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [formula.formulaContent.lastKnownPowerState] Last known + * compute power state captured in DTL + * + * @param {string} [formula.formulaContent.name] The name of the virtual + * machine or environment + * + * @param {string} [formula.formulaContent.location] The location of the new + * virtual machine or environment + * + * @param {object} [formula.formulaContent.tags] The tags of the resource. + * + * @param {object} [formula.vm] Information about a VM from which a formula is + * to be created. + * + * @param {string} [formula.vm.labVmId] The identifier of the VM from which a + * formula is to be created. + * + * @param {string} [formula.location] The location of the resource. + * + * @param {object} [formula.tags] The 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 {Formula} - 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. + * + * {Formula} [result] - The deserialized result object if an error did not occur. + * See {@link Formula} 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, labName: string, name: string, formula: models.Formula, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, formula: models.Formula, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, formula: models.Formula, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List formulas in a given lab. + * + * @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>; + + /** + * List formulas in a given lab. + * + * @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 {FormulaList} - 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. + * + * {FormulaList} [result] - The deserialized result object if an error did not occur. + * See {@link FormulaList} 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 + * GalleryImages + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface GalleryImages { + + + /** + * List gallery images in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=author)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List gallery images in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=author)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List gallery images in a given lab. + * + * @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>; + + /** + * List gallery images in a given lab. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GalleryImageList} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + 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 + * NotificationChannels + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface NotificationChannels { + + + /** + * List notificationchannels in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=webHookUrl)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List notificationchannels in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=webHookUrl)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {NotificationChannelList} - 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. + * + * {NotificationChannelList} [result] - The deserialized result object if an error did not occur. + * See {@link NotificationChannelList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get notificationchannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=webHookUrl)' + * + * @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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get notificationchannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=webHookUrl)' + * + * @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 {NotificationChannel} - 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. + * + * {NotificationChannel} [result] - The deserialized result object if an error did not occur. + * See {@link NotificationChannel} 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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing notificationChannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notificationChannel A notification. + * + * @param {string} [notificationChannel.webHookUrl] The webhook URL to send + * notifications to. + * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * + * @param {string} [notificationChannel.description] Description of + * notification. + * + * @param {array} [notificationChannel.events] The list of event for which this + * notification is enabled. + * + * @param {string} [notificationChannel.location] The location of the resource. + * + * @param {object} [notificationChannel.tags] The 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, labName: string, name: string, notificationChannel: models.NotificationChannel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing notificationChannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notificationChannel A notification. + * + * @param {string} [notificationChannel.webHookUrl] The webhook URL to send + * notifications to. + * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * + * @param {string} [notificationChannel.description] Description of + * notification. + * + * @param {array} [notificationChannel.events] The list of event for which this + * notification is enabled. + * + * @param {string} [notificationChannel.location] The location of the resource. + * + * @param {object} [notificationChannel.tags] The 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 {NotificationChannel} - 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. + * + * {NotificationChannel} [result] - The deserialized result object if an error did not occur. + * See {@link NotificationChannel} 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, labName: string, name: string, notificationChannel: models.NotificationChannel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannel, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannel, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete notificationchannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete notificationchannel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Modify properties of notificationchannels. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notificationChannel A notification. + * + * @param {string} [notificationChannel.webHookUrl] The webhook URL to send + * notifications to. + * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * + * @param {string} [notificationChannel.description] Description of + * notification. + * + * @param {array} [notificationChannel.events] The list of event for which this + * notification is enabled. + * + * @param {object} [notificationChannel.tags] The 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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Modify properties of notificationchannels. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notificationChannel A notification. + * + * @param {string} [notificationChannel.webHookUrl] The webhook URL to send + * notifications to. + * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * + * @param {string} [notificationChannel.description] Description of + * notification. + * + * @param {array} [notificationChannel.events] The list of event for which this + * notification is enabled. + * + * @param {object} [notificationChannel.tags] The 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 {NotificationChannel} - 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. + * + * {NotificationChannel} [result] - The deserialized result object if an error did not occur. + * See {@link NotificationChannel} 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, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Send notification to provided channel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notifyParameters Properties for generating a Notification. + * + * @param {string} [notifyParameters.eventName] The type of event (i.e. + * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + * + * @param {string} [notifyParameters.jsonPayload] Properties for the + * notification in json format. + * + * @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. + */ + notifyWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Send notification to provided channel. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the notificationChannel. + * + * @param {object} notifyParameters Properties for generating a Notification. + * + * @param {string} [notifyParameters.eventName] The type of event (i.e. + * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + * + * @param {string} [notifyParameters.jsonPayload] Properties for the + * notification in json format. + * + * @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. + */ + notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, callback: ServiceCallback): void; + notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List notificationchannels in a given lab. + * + * @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>; + + /** + * List notificationchannels in a given lab. + * + * @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 {NotificationChannelList} - 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. + * + * {NotificationChannelList} [result] - The deserialized result object if an error did not occur. + * See {@link NotificationChannelList} 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 + * PolicySets + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface PolicySets { + + + /** + * Evaluates lab policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the policy set. + * + * @param {object} evaluatePoliciesRequest Request body for evaluating a policy + * set. + * + * @param {array} [evaluatePoliciesRequest.policies] Policies to evaluate. + * + * @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. + */ + evaluatePoliciesWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Evaluates lab policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the policy set. + * + * @param {object} evaluatePoliciesRequest Request body for evaluating a policy + * set. + * + * @param {array} [evaluatePoliciesRequest.policies] Policies to evaluate. + * + * @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 {EvaluatePoliciesResponse} - 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. + * + * {EvaluatePoliciesResponse} [result] - The deserialized result object if an error did not occur. + * See {@link EvaluatePoliciesResponse} 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. + */ + evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, callback: ServiceCallback): void; + evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Policies + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface Policies { + + + /** + * List policies in a given policy set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName: string, labName: string, policySetName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List policies in a given policy set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {PolicyList} - 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. + * + * {PolicyList} [result] - The deserialized result object if an error did not occur. + * See {@link PolicyList} 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(resourceGroupName: string, labName: string, policySetName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, policySetName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, policySetName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @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, labName: string, policySetName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=description)' + * + * @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 {Policy} - 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. + * + * {Policy} [result] - The deserialized result object if an error did not occur. + * See {@link Policy} 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, labName: string, policySetName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, policySetName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, policySetName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} policy A Policy. + * + * @param {string} [policy.description] The description of the policy. + * + * @param {string} [policy.status] The status of the policy. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [policy.factName] The fact name of the policy (e.g. + * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: + * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', + * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' + * + * @param {string} [policy.factData] The fact data of the policy. + * + * @param {string} [policy.threshold] The threshold of the policy (i.e. a + * number for MaxValuePolicy, and a JSON array of values for + * AllowedValuesPolicy). + * + * @param {string} [policy.evaluatorType] The evaluator type of the policy + * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: + * 'AllowedValuesPolicy', 'MaxValuePolicy' + * + * @param {string} [policy.location] The location of the resource. + * + * @param {object} [policy.tags] The 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, labName: string, policySetName: string, name: string, policy: models.Policy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} policy A Policy. + * + * @param {string} [policy.description] The description of the policy. + * + * @param {string} [policy.status] The status of the policy. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [policy.factName] The fact name of the policy (e.g. + * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: + * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', + * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' + * + * @param {string} [policy.factData] The fact data of the policy. + * + * @param {string} [policy.threshold] The threshold of the policy (i.e. a + * number for MaxValuePolicy, and a JSON array of values for + * AllowedValuesPolicy). + * + * @param {string} [policy.evaluatorType] The evaluator type of the policy + * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: + * 'AllowedValuesPolicy', 'MaxValuePolicy' + * + * @param {string} [policy.location] The location of the resource. + * + * @param {object} [policy.tags] The 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 {Policy} - 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. + * + * {Policy} [result] - The deserialized result object if an error did not occur. + * See {@link Policy} 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, labName: string, policySetName: string, name: string, policy: models.Policy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @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, labName: string, policySetName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @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, labName: string, policySetName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, policySetName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, policySetName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Modify properties of policies. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} policy A Policy. + * + * @param {string} [policy.description] The description of the policy. + * + * @param {string} [policy.status] The status of the policy. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [policy.factName] The fact name of the policy (e.g. + * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: + * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', + * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' + * + * @param {string} [policy.factData] The fact data of the policy. + * + * @param {string} [policy.threshold] The threshold of the policy (i.e. a + * number for MaxValuePolicy, and a JSON array of values for + * AllowedValuesPolicy). + * + * @param {string} [policy.evaluatorType] The evaluator type of the policy + * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: + * 'AllowedValuesPolicy', 'MaxValuePolicy' + * + * @param {object} [policy.tags] The 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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Modify properties of policies. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} policySetName The name of the policy set. + * + * @param {string} name The name of the policy. + * + * @param {object} policy A Policy. + * + * @param {string} [policy.description] The description of the policy. + * + * @param {string} [policy.status] The status of the policy. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [policy.factName] The fact name of the policy (e.g. + * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: + * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', + * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' + * + * @param {string} [policy.factData] The fact data of the policy. + * + * @param {string} [policy.threshold] The threshold of the policy (i.e. a + * number for MaxValuePolicy, and a JSON array of values for + * AllowedValuesPolicy). + * + * @param {string} [policy.evaluatorType] The evaluator type of the policy + * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: + * 'AllowedValuesPolicy', 'MaxValuePolicy' + * + * @param {object} [policy.tags] The 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 {Policy} - 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. + * + * {Policy} [result] - The deserialized result object if an error did not occur. + * See {@link Policy} 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, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List policies in a given policy set. + * + * @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>; + + /** + * List policies in a given policy set. + * + * @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 {PolicyList} - 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. + * + * {PolicyList} [result] - The deserialized result object if an error did not occur. + * See {@link PolicyList} 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 + * Schedules + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface Schedules { + + + /** + * List schedules in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List schedules in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {ScheduleList} - 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. + * + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The 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, labName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The 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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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, labName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, name: string, schedule: models.Schedule, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, schedule: models.Schedule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Modify properties of schedules. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {object} [schedule.tags] The 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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Modify properties of schedules. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {object} [schedule.tags] The 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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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, labName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + executeWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + execute(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + execute(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + execute(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all applicable schedules + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + listApplicableWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all applicable schedules + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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 {ScheduleList} - 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. + * + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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. + */ + listApplicable(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listApplicable(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + listApplicable(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + beginExecuteWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + beginExecute(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginExecute(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginExecute(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List schedules in a given lab. + * + * @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>; + + /** + * List schedules in a given lab. + * + * @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 {ScheduleList} - 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. + * + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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 applicable schedules + * + * @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. + */ + listApplicableNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all applicable schedules + * + * @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 {ScheduleList} - 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. + * + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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. + */ + listApplicableNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listApplicableNext(nextPageLink: string, callback: ServiceCallback): void; + listApplicableNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ServiceRunners + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface ServiceRunners { + + + /** + * List service runners in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName: string, labName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List service runners in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {ServiceRunnerList} - 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. + * + * {ServiceRunnerList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceRunnerList} 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(resourceGroupName: string, labName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @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 {ServiceRunner} - 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. + * + * {ServiceRunner} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceRunner} 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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing Service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @param {object} serviceRunner A container for a managed identity to execute + * DevTest lab services. + * + * @param {object} [serviceRunner.identity] The identity of the resource. + * + * @param {string} [serviceRunner.identity.type] Managed identity. + * + * @param {string} [serviceRunner.identity.principalId] The principal id of + * resource identity. + * + * @param {string} [serviceRunner.identity.tenantId] The tenant identifier of + * resource. + * + * @param {string} [serviceRunner.identity.clientSecretUrl] The client secret + * URL of the identity. + * + * @param {string} [serviceRunner.location] The location of the resource. + * + * @param {object} [serviceRunner.tags] The 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, labName: string, name: string, serviceRunner: models.ServiceRunner, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing Service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @param {object} serviceRunner A container for a managed identity to execute + * DevTest lab services. + * + * @param {object} [serviceRunner.identity] The identity of the resource. + * + * @param {string} [serviceRunner.identity.type] Managed identity. + * + * @param {string} [serviceRunner.identity.principalId] The principal id of + * resource identity. + * + * @param {string} [serviceRunner.identity.tenantId] The tenant identifier of + * resource. + * + * @param {string} [serviceRunner.identity.clientSecretUrl] The client secret + * URL of the identity. + * + * @param {string} [serviceRunner.location] The location of the resource. + * + * @param {object} [serviceRunner.tags] The 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 {ServiceRunner} - 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. + * + * {ServiceRunner} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceRunner} 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, labName: string, name: string, serviceRunner: models.ServiceRunner, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, name: string, serviceRunner: models.ServiceRunner, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, serviceRunner: models.ServiceRunner, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete service runner. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the service runner. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List service runners in a given lab. + * + * @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>; + + /** + * List service runners in a given lab. + * + * @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 {ServiceRunnerList} - 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. + * + * {ServiceRunnerList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceRunnerList} 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 + * Users + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface Users { + + + /** + * List user profiles in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=author)' + * 'properties($select=identity)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List gallery images in a given lab. + * List user profiles in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=identity)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {UserList} - 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. + * + * {UserList} [result] - The deserialized result object if an error did not occur. + * See {@link UserList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get user profile. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=identity)' + * + * @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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * + * @param {string} name The name of the user profile. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=author)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. - * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * 'properties($select=identity)' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7546,7 +10290,7 @@ export interface GalleryImages { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationGalleryImage} - The deserialized result object. + * @resolve {User} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7554,24 +10298,60 @@ export interface GalleryImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationGalleryImage} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationGalleryImage} for - * more information. + * {User} [result] - The deserialized result object if an error did not occur. + * See {@link User} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List gallery images in a given lab. + * Create or replace an existing user profile. This operation can take a while + * to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {string} [user.location] The location of the resource. + * + * @param {object} [user.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -7580,17 +10360,54 @@ export interface GalleryImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List gallery images in a given lab. + * Create or replace an existing user profile. This operation can take a while + * to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {string} [user.location] The location of the resource. + * + * @param {object} [user.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -7604,7 +10421,7 @@ export interface GalleryImages { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationGalleryImage} - The deserialized result object. + * @resolve {User} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7612,78 +10429,50 @@ export interface GalleryImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationGalleryImage} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationGalleryImage} for - * more information. + * {User} [result] - The deserialized result object if an error did not occur. + * See {@link User} 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 - * NotificationChannels - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface NotificationChannels { + createOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List notificationchannels in a given lab. + * Delete user profile. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=webHookUrl)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the user profile. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List notificationchannels in a given lab. + * Delete user profile. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=webHookUrl)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the user profile. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7695,7 +10484,7 @@ export interface NotificationChannels { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationNotificationChannel} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7703,57 +10492,111 @@ export interface NotificationChannels { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationNotificationChannel} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationNotificationChannel} - * for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get notificationchannel. + * Modify properties of user profiles. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * - * @param {object} [options] Optional Parameters. + * @param {object} user Profile of a lab user. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=webHookUrl)' + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {object} [user.tags] The 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get notificationchannel. + * Modify properties of user profiles. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * - * @param {object} [options] Optional Parameters. + * @param {object} user Profile of a lab user. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=webHookUrl)' + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {object} [user.tags] The tags of the resource. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7765,7 +10608,7 @@ export interface NotificationChannels { * * {Promise} A promise is returned. * - * @resolve {NotificationChannel} - The deserialized result object. + * @resolve {User} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7773,47 +10616,60 @@ export interface NotificationChannels { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NotificationChannel} [result] - The deserialized result object if an error did not occur. - * See {@link NotificationChannel} for more information. + * {User} [result] - The deserialized result object if an error did not occur. + * See {@link User} 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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing notificationChannel. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * - * @param {object} notificationChannel A notification. + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. * - * @param {string} [notificationChannel.webHookUrl] The webhook URL to send - * notifications to. + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. * - * @param {string} [notificationChannel.description] Description of - * notification. + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. * - * @param {array} [notificationChannel.events] The list of event for which this - * notification is enabled. + * @param {object} [user.secretStore] The secret store of the user. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. * - * @param {string} [notificationChannel.location] The location of the resource. + * @param {string} [user.location] The location of the resource. * - * @param {object} [notificationChannel.tags] The tags of the resource. + * @param {object} [user.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -7822,41 +10678,54 @@ export interface NotificationChannels { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing notificationChannel. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * - * @param {object} notificationChannel A notification. + * @param {object} user Profile of a lab user. * - * @param {string} [notificationChannel.webHookUrl] The webhook URL to send - * notifications to. + * @param {object} [user.identity] The identity of the user. * - * @param {string} [notificationChannel.description] Description of - * notification. + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. * - * @param {array} [notificationChannel.events] The list of event for which this - * notification is enabled. + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {object} [user.secretStore] The secret store of the user. * - * @param {string} [notificationChannel.location] The location of the resource. + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. * - * @param {object} [notificationChannel.tags] The tags of the resource. + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {string} [user.location] The location of the resource. + * + * @param {object} [user.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -7870,7 +10739,7 @@ export interface NotificationChannels { * * {Promise} A promise is returned. * - * @resolve {NotificationChannel} - The deserialized result object. + * @resolve {User} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7878,26 +10747,26 @@ export interface NotificationChannels { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NotificationChannel} [result] - The deserialized result object if an error did not occur. - * See {@link NotificationChannel} for more information. + * {User} [result] - The deserialized result object if an error did not occur. + * See {@link User} 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, labName: string, name: string, notificationChannel: models.NotificationChannel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannel, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannel, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete notificationchannel. + * Delete user profile. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * * @param {object} [options] Optional Parameters. * @@ -7910,16 +10779,16 @@ export interface NotificationChannels { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete notificationchannel. + * Delete user profile. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} name The name of the user profile. * * @param {object} [options] Optional Parameters. * @@ -7947,40 +10816,16 @@ export interface NotificationChannels { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Modify properties of notificationchannels. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the notificationChannel. - * - * @param {object} notificationChannel A notification. - * - * @param {string} [notificationChannel.webHookUrl] The webhook URL to send - * notifications to. - * - * @param {string} [notificationChannel.description] Description of - * notification. - * - * @param {array} [notificationChannel.events] The list of event for which this - * notification is enabled. - * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [notificationChannel.location] The location of the resource. + * List user profiles in a given lab. * - * @param {object} [notificationChannel.tags] The tags of the resource. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -7989,41 +10834,17 @@ export interface NotificationChannels { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Modify properties of notificationchannels. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the notificationChannel. - * - * @param {object} notificationChannel A notification. - * - * @param {string} [notificationChannel.webHookUrl] The webhook URL to send - * notifications to. - * - * @param {string} [notificationChannel.description] Description of - * notification. - * - * @param {array} [notificationChannel.events] The list of event for which this - * notification is enabled. - * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [notificationChannel.location] The location of the resource. + * List user profiles in a given lab. * - * @param {object} [notificationChannel.tags] The tags of the resource. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8037,7 +10858,7 @@ export interface NotificationChannels { * * {Promise} A promise is returned. * - * @resolve {NotificationChannel} - The deserialized result object. + * @resolve {UserList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8045,66 +10866,83 @@ export interface NotificationChannels { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NotificationChannel} [result] - The deserialized result object if an error did not occur. - * See {@link NotificationChannel} for more information. + * {UserList} [result] - The deserialized result object if an error did not occur. + * See {@link UserList} 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, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, callback: ServiceCallback): void; - update(resourceGroupName: string, labName: string, name: string, notificationChannel: models.NotificationChannelFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 + * Disks + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface Disks { /** - * Send notification to provided channel. + * List disks in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} userName The name of the user profile. * - * @param {object} notifyParameters Properties for generating a Notification. + * @param {object} [options] Optional Parameters. * - * @param {string} [notifyParameters.eventName] The type of event (i.e. - * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=diskType)' * - * @param {string} [notifyParameters.jsonPayload] Properties for the - * notification in json format. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [options] Optional Parameters. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @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. */ - notifyWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Send notification to provided channel. + * List disks in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the notificationChannel. + * @param {string} userName The name of the user profile. * - * @param {object} notifyParameters Properties for generating a Notification. + * @param {object} [options] Optional Parameters. * - * @param {string} [notifyParameters.eventName] The type of event (i.e. - * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=diskType)' * - * @param {string} [notifyParameters.jsonPayload] Properties for the - * notification in json format. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [options] Optional Parameters. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8116,7 +10954,7 @@ export interface NotificationChannels { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DiskList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8124,44 +10962,61 @@ export interface NotificationChannels { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DiskList} [result] - The deserialized result object if an error did not occur. + * See {@link DiskList} 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. */ - notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, callback: ServiceCallback): void; - notify(resourceGroupName: string, labName: string, name: string, notifyParameters: models.NotifyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List notificationchannels in a given lab. + * Get disk. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=diskType)' + * * @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. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List notificationchannels in a given lab. + * Get disk. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=diskType)' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8170,51 +11025,65 @@ export interface NotificationChannels { * @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. + * {Promise} A promise is returned. + * + * @resolve {Disk} - 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. + * + * {Disk} [result] - The deserialized result object if an error did not occur. + * See {@link Disk} 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, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing disk. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. * - * @resolve {ResponseWithContinuationNotificationChannel} - The deserialized result object. + * @param {string} userName The name of the user profile. * - * @reject {Error|ServiceError} - The error object. + * @param {string} name The name of the disk. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} disk A Disk. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' * - * {ResponseWithContinuationNotificationChannel} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationNotificationChannel} - * for more information. + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. * - * {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 - * PolicySets - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface PolicySets { - - - /** - * Evaluates lab policy. + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. * - * @param {string} labName The name of the lab. + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). * - * @param {string} name The name of the policy set. + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. * - * @param {object} evaluatePoliciesRequest Request body for evaluating a policy - * set. + * @param {string} [disk.location] The location of the resource. * - * @param {array} [evaluatePoliciesRequest.policies] Policies to evaluate. + * @param {object} [disk.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -8223,25 +11092,49 @@ export interface PolicySets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - evaluatePoliciesWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Evaluates lab policy. + * Create or replace an existing disk. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {object} evaluatePoliciesRequest Request body for evaluating a policy - * set. + * @param {string} name The name of the disk. * - * @param {array} [evaluatePoliciesRequest.policies] Policies to evaluate. + * @param {object} disk A Disk. + * + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {string} [disk.location] The location of the resource. + * + * @param {object} [disk.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -8255,7 +11148,7 @@ export interface PolicySets { * * {Promise} A promise is returned. * - * @resolve {EvaluatePoliciesResponse} - The deserialized result object. + * @resolve {Disk} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8263,82 +11156,54 @@ export interface PolicySets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EvaluatePoliciesResponse} [result] - The deserialized result object if an error did not occur. - * See {@link EvaluatePoliciesResponse} for more - * information. + * {Disk} [result] - The deserialized result object if an error did not occur. + * See {@link Disk} 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. */ - evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, callback: ServiceCallback): void; - evaluatePolicies(resourceGroupName: string, labName: string, name: string, evaluatePoliciesRequest: models.EvaluatePoliciesRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Policies - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface Policies { + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List policies in a given policy set. + * Delete disk. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' - * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} userName The name of the user profile. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the disk. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List policies in a given policy set. + * Delete disk. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' - * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} userName The name of the user profile. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the disk. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8350,7 +11215,7 @@ export interface Policies { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8358,61 +11223,101 @@ export interface Policies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationPolicy} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, labName: string, policySetName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, policySetName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, policySetName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get policy. + * Modify properties of disks. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {string} name The name of the policy. + * @param {string} name The name of the disk. * - * @param {object} [options] Optional Parameters. + * @param {object} disk A Disk. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {object} [disk.tags] The 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.DiskFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get policy. + * Modify properties of disks. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {string} name The name of the policy. + * @param {string} name The name of the disk. * - * @param {object} [options] Optional Parameters. + * @param {object} disk A Disk. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=description)' + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' + * + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. + * + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. + * + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. + * + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. + * + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). + * + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {object} [disk.tags] The tags of the resource. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8424,7 +11329,7 @@ export interface Policies { * * {Promise} A promise is returned. * - * @resolve {Policy} - The deserialized result object. + * @resolve {Disk} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8432,61 +11337,34 @@ export interface Policies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Policy} [result] - The deserialized result object if an error did not occur. - * See {@link Policy} for more information. + * {Disk} [result] - The deserialized result object if an error did not occur. + * See {@link Disk} 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, labName: string, policySetName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, policySetName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, policySetName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.DiskFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.DiskFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.DiskFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing policy. + * Attach and create the lease of the disk to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. - * - * @param {string} name The name of the policy. - * - * @param {object} policy A Policy. - * - * @param {string} [policy.description] The description of the policy. - * - * @param {string} [policy.status] The status of the policy. Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} [policy.factName] The fact name of the policy (e.g. - * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' - * - * @param {string} [policy.factData] The fact data of the policy. - * - * @param {string} [policy.threshold] The threshold of the policy (i.e. a - * number for MaxValuePolicy, and a JSON array of values for - * AllowedValuesPolicy). - * - * @param {string} [policy.evaluatorType] The evaluator type of the policy - * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: - * 'AllowedValuesPolicy', 'MaxValuePolicy' - * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. + * @param {string} userName The name of the user profile. * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {string} name The name of the disk. * - * @param {string} [policy.location] The location of the resource. + * @param {object} attachDiskProperties Properties of the disk to attach. * - * @param {object} [policy.tags] The tags of the resource. + * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab virtual machine to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8495,55 +11373,28 @@ export interface Policies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + attachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing policy. + * Attach and create the lease of the disk to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. - * - * @param {string} name The name of the policy. - * - * @param {object} policy A Policy. - * - * @param {string} [policy.description] The description of the policy. - * - * @param {string} [policy.status] The status of the policy. Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} [policy.factName] The fact name of the policy (e.g. - * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' - * - * @param {string} [policy.factData] The fact data of the policy. - * - * @param {string} [policy.threshold] The threshold of the policy (i.e. a - * number for MaxValuePolicy, and a JSON array of values for - * AllowedValuesPolicy). - * - * @param {string} [policy.evaluatorType] The evaluator type of the policy - * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: - * 'AllowedValuesPolicy', 'MaxValuePolicy' - * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. + * @param {string} userName The name of the user profile. * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {string} name The name of the disk. * - * @param {string} [policy.location] The location of the resource. + * @param {object} attachDiskProperties Properties of the disk to attach. * - * @param {object} [policy.tags] The tags of the resource. + * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab virtual machine to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8557,7 +11408,7 @@ export interface Policies { * * {Promise} A promise is returned. * - * @resolve {Policy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8565,28 +11416,33 @@ export interface Policies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Policy} [result] - The deserialized result object if an error did not occur. - * See {@link Policy} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.Policy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, callback: ServiceCallback): void; + attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete policy. + * Detach and break the lease of the disk attached to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {string} name The name of the policy. + * @param {string} name The name of the disk. + * + * @param {object} detachDiskProperties Properties of the disk to detach. + * + * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab VM to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8599,18 +11455,24 @@ export interface Policies { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + detachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete policy. + * Detach and break the lease of the disk attached to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {string} name The name of the policy. + * @param {string} name The name of the disk. + * + * @param {object} detachDiskProperties Properties of the disk to detach. + * + * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab VM to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8638,54 +11500,48 @@ export interface Policies { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, policySetName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, policySetName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, policySetName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, callback: ServiceCallback): void; + detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Modify properties of policies. + * Create or replace an existing disk. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. - * - * @param {string} name The name of the policy. + * @param {string} userName The name of the user profile. * - * @param {object} policy A Policy. + * @param {string} name The name of the disk. * - * @param {string} [policy.description] The description of the policy. + * @param {object} disk A Disk. * - * @param {string} [policy.status] The status of the policy. Possible values - * include: 'Enabled', 'Disabled' + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' * - * @param {string} [policy.factName] The fact name of the policy (e.g. - * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. * - * @param {string} [policy.factData] The fact data of the policy. + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. * - * @param {string} [policy.threshold] The threshold of the policy (i.e. a - * number for MaxValuePolicy, and a JSON array of values for - * AllowedValuesPolicy). + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. * - * @param {string} [policy.evaluatorType] The evaluator type of the policy - * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: - * 'AllowedValuesPolicy', 'MaxValuePolicy' + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. * - * @param {string} [policy.location] The location of the resource. + * @param {string} [disk.location] The location of the resource. * - * @param {object} [policy.tags] The tags of the resource. + * @param {object} [disk.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -8694,55 +11550,116 @@ export interface Policies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Modify properties of policies. + * Create or replace an existing disk. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} policySetName The name of the policy set. + * @param {string} userName The name of the user profile. * - * @param {string} name The name of the policy. + * @param {string} name The name of the disk. * - * @param {object} policy A Policy. + * @param {object} disk A Disk. * - * @param {string} [policy.description] The description of the policy. + * @param {string} [disk.diskType] The storage type for the disk (i.e. + * Standard, Premium). Possible values include: 'Standard', 'Premium' * - * @param {string} [policy.status] The status of the policy. Possible values - * include: 'Enabled', 'Disabled' + * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. * - * @param {string} [policy.factName] The fact name of the policy (e.g. - * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which + * this disk is leased. * - * @param {string} [policy.factData] The fact data of the policy. + * @param {string} [disk.diskBlobName] When backed by a blob, the name of the + * VHD blob without extension. * - * @param {string} [policy.threshold] The threshold of the policy (i.e. a - * number for MaxValuePolicy, and a JSON array of values for - * AllowedValuesPolicy). + * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying + * blob. * - * @param {string} [policy.evaluatorType] The evaluator type of the policy - * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: - * 'AllowedValuesPolicy', 'MaxValuePolicy' + * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. + * None, ReadOnly, ReadWrite). * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. + * @param {string} [disk.managedDiskId] When backed by managed disk, this is + * the ID of the compute disk resource. + * + * @param {string} [disk.location] The location of the resource. * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {object} [disk.tags] The tags of the resource. * - * @param {string} [policy.location] The location of the resource. + * @param {object} [options] Optional Parameters. * - * @param {object} [policy.tags] The tags of the resource. + * @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 {Disk} - 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. + * + * {Disk} [result] - The deserialized result object if an error did not occur. + * See {@link Disk} 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, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete disk. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. + * + * @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, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete disk. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. * * @param {object} [options] Optional Parameters. * @@ -8756,7 +11673,7 @@ export interface Policies { * * {Promise} A promise is returned. * - * @resolve {Policy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8764,23 +11681,33 @@ export interface Policies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Policy} [result] - The deserialized result object if an error did not occur. - * See {@link Policy} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, callback: ServiceCallback): void; - update(resourceGroupName: string, labName: string, policySetName: string, name: string, policy: models.PolicyFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List policies in a given policy set. + * Attach and create the lease of the disk to the virtual machine. This + * operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} name The name of the disk. + * + * @param {object} attachDiskProperties Properties of the disk to attach. + * + * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab virtual machine to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8789,17 +11716,28 @@ export interface Policies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginAttachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List policies in a given policy set. + * Attach and create the lease of the disk to the virtual machine. This + * operation can take a while to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the disk. + * + * @param {object} attachDiskProperties Properties of the disk to attach. + * + * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab virtual machine to which the disk is attached. * * @param {object} [options] Optional Parameters. * @@ -8813,7 +11751,7 @@ export interface Policies { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8821,78 +11759,65 @@ export interface Policies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationPolicy} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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 - * Schedules - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface Schedules { + beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, callback: ServiceCallback): void; + beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List schedules in a given lab. + * Detach and break the lease of the disk attached to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. + * @param {string} userName The name of the user profile. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=status)' + * @param {string} name The name of the disk. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} detachDiskProperties Properties of the disk to detach. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab VM to which the disk is attached. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDetachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List schedules in a given lab. + * Detach and break the lease of the disk attached to the virtual machine. This + * operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. + * @param {string} userName The name of the user profile. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=status)' + * @param {string} name The name of the disk. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} detachDiskProperties Properties of the disk to detach. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of + * the Lab VM to which the disk is attached. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8904,7 +11829,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8912,58 +11837,44 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, callback: ServiceCallback): void; + beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get schedule. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. + * List disks in a given user profile. * - * @param {string} name The name of the schedule. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=status)' - * * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get schedule. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. + * List disks in a given user profile. * - * @param {string} name The name of the schedule. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=status)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8974,7 +11885,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {DiskList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8982,164 +11893,83 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {DiskList} [result] - The deserialized result object if an error did not occur. + * See {@link DiskList} 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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 + * Environments + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface Environments { /** - * Create or replace an existing schedule. + * List environments in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. - * - * @param {object} schedule A schedule. - * - * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, - * Disabled). Possible values include: 'Enabled', 'Disabled' - * - * @param {string} [schedule.taskType] The task type of the schedule (e.g. - * LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only - * some days of the week, specify the weekly recurrence. - * - * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for - * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * - * @param {string} [schedule.weeklyRecurrence.time] The time of the day the - * schedule will occur. - * - * @param {object} [schedule.dailyRecurrence] If the schedule will occur once - * each day of the week, specify the daily recurrence. - * - * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule - * will occur. - * - * @param {object} [schedule.hourlyRecurrence] If the schedule will occur - * multiple times a day, specify the hourly recurrence. - * - * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the - * schedule will run. - * - * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific - * Standard time). - * - * @param {object} [schedule.notificationSettings] Notification settings. - * - * @param {string} [schedule.notificationSettings.status] If notifications are - * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' - * - * @param {number} [schedule.notificationSettings.timeInMinutes] Time in - * minutes before event at which notification will be sent. - * - * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL - * to which the notification will be sent. - * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} userName The name of the user profile. * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=deploymentProperties)' * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [schedule.tags] The tags of the resource. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @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. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing schedule. + * List environments in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. - * - * @param {object} schedule A schedule. - * - * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, - * Disabled). Possible values include: 'Enabled', 'Disabled' - * - * @param {string} [schedule.taskType] The task type of the schedule (e.g. - * LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only - * some days of the week, specify the weekly recurrence. - * - * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for - * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * - * @param {string} [schedule.weeklyRecurrence.time] The time of the day the - * schedule will occur. - * - * @param {object} [schedule.dailyRecurrence] If the schedule will occur once - * each day of the week, specify the daily recurrence. - * - * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule - * will occur. - * - * @param {object} [schedule.hourlyRecurrence] If the schedule will occur - * multiple times a day, specify the hourly recurrence. - * - * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the - * schedule will run. - * - * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific - * Standard time). - * - * @param {object} [schedule.notificationSettings] Notification settings. - * - * @param {string} [schedule.notificationSettings.status] If notifications are - * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' - * - * @param {number} [schedule.notificationSettings.timeInMinutes] Time in - * minutes before event at which notification will be sent. - * - * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL - * to which the notification will be sent. - * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} userName The name of the user profile. * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=deploymentProperties)' * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [schedule.tags] The tags of the resource. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9151,7 +11981,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {DtlEnvironmentList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9159,51 +11989,61 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {DtlEnvironmentList} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironmentList} 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, labName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, name: string, schedule: models.Schedule, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, name: string, schedule: models.Schedule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete schedule. + * Get environment. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=deploymentProperties)' + * * @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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete schedule. + * Get environment. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=deploymentProperties)' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9214,7 +12054,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DtlEnvironment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9222,82 +12062,48 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironment} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Modify properties of schedules. + * Create or replace an existing environment. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. - * - * @param {object} schedule A schedule. - * - * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, - * Disabled). Possible values include: 'Enabled', 'Disabled' - * - * @param {string} [schedule.taskType] The task type of the schedule (e.g. - * LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only - * some days of the week, specify the weekly recurrence. - * - * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for - * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * - * @param {string} [schedule.weeklyRecurrence.time] The time of the day the - * schedule will occur. - * - * @param {object} [schedule.dailyRecurrence] If the schedule will occur once - * each day of the week, specify the daily recurrence. - * - * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule - * will occur. - * - * @param {object} [schedule.hourlyRecurrence] If the schedule will occur - * multiple times a day, specify the hourly recurrence. - * - * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the - * schedule will run. - * - * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific - * Standard time). - * - * @param {object} [schedule.notificationSettings] Notification settings. + * @param {string} userName The name of the user profile. * - * @param {string} [schedule.notificationSettings.status] If notifications are - * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * @param {string} name The name of the environment. * - * @param {number} [schedule.notificationSettings.timeInMinutes] Time in - * minutes before event at which notification will be sent. + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. * - * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL - * to which the notification will be sent. + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [dtlEnvironment.location] The location of the resource. * - * @param {object} [schedule.tags] The tags of the resource. + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9306,77 +12112,42 @@ export interface Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Modify properties of schedules. + * Create or replace an existing environment. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. - * - * @param {object} schedule A schedule. - * - * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, - * Disabled). Possible values include: 'Enabled', 'Disabled' - * - * @param {string} [schedule.taskType] The task type of the schedule (e.g. - * LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only - * some days of the week, specify the weekly recurrence. - * - * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for - * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - * - * @param {string} [schedule.weeklyRecurrence.time] The time of the day the - * schedule will occur. - * - * @param {object} [schedule.dailyRecurrence] If the schedule will occur once - * each day of the week, specify the daily recurrence. - * - * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule - * will occur. - * - * @param {object} [schedule.hourlyRecurrence] If the schedule will occur - * multiple times a day, specify the hourly recurrence. - * - * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the - * schedule will run. - * - * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific - * Standard time). - * - * @param {object} [schedule.notificationSettings] Notification settings. + * @param {string} userName The name of the user profile. * - * @param {string} [schedule.notificationSettings.status] If notifications are - * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * @param {string} name The name of the environment. * - * @param {number} [schedule.notificationSettings.timeInMinutes] Time in - * minutes before event at which notification will be sent. + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. * - * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL - * to which the notification will be sent. + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [dtlEnvironment.location] The location of the resource. * - * @param {object} [schedule.tags] The tags of the resource. + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9390,7 +12161,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {DtlEnvironment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9398,26 +12169,28 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironment} 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, labName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, callback: ServiceCallback): void; - update(resourceGroupName: string, labName: string, name: string, schedule: models.ScheduleFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Execute a schedule. This operation can take a while to complete. + * Delete environment. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * @@ -9430,16 +12203,18 @@ export interface Schedules { * * @reject {Error|ServiceError} - The error object. */ - executeWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Execute a schedule. This operation can take a while to complete. + * Delete environment. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * @@ -9467,19 +12242,38 @@ export interface Schedules { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - execute(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - execute(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - execute(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all applicable schedules + * Modify properties of environments. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. + * + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. + * + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9488,20 +12282,39 @@ export interface Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listApplicableWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironmentFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all applicable schedules + * Modify properties of environments. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. + * + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. + * + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9515,7 +12328,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {DtlEnvironment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9523,27 +12336,48 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironment} 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. */ - listApplicable(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listApplicable(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - listApplicable(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironmentFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironmentFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironmentFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Execute a schedule. This operation can take a while to complete. + * Create or replace an existing environment. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. * - * @param {string} labName The name of the lab. + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. * - * @param {string} name The name of the schedule. + * @param {string} [dtlEnvironment.location] The location of the resource. + * + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9552,20 +12386,42 @@ export interface Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginExecuteWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Execute a schedule. This operation can take a while to complete. + * Create or replace an existing environment. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the schedule. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. + * + * @param {object} dtlEnvironment An environment, which is essentially an ARM + * template deployment. + * + * @param {object} [dtlEnvironment.deploymentProperties] The deployment + * properties of the environment. + * + * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The + * Azure Resource Manager template's identifier. + * + * @param {array} [dtlEnvironment.deploymentProperties.parameters] The + * parameters of the Azure Resource Manager template. + * + * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of + * the Azure Resource Manager template that produced the environment. + * + * @param {string} [dtlEnvironment.location] The location of the resource. + * + * @param {object} [dtlEnvironment.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9579,7 +12435,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DtlEnvironment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9587,22 +12443,28 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironment} 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. */ - beginExecute(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginExecute(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginExecute(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List schedules in a given lab. + * Delete environment. This operation can take a while to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * @@ -9611,17 +12473,22 @@ export interface Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List schedules in a given lab. + * Delete environment. This operation can take a while to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the environment. * * @param {object} [options] Optional Parameters. * @@ -9635,7 +12502,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9643,21 +12510,19 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all applicable schedules + * List environments in a given user profile. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9669,14 +12534,14 @@ export interface Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listApplicableNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all applicable schedules + * List environments in a given user profile. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9693,7 +12558,7 @@ export interface Schedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {DtlEnvironmentList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9701,72 +12566,83 @@ export interface Schedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {DtlEnvironmentList} [result] - The deserialized result object if an error did not occur. + * See {@link DtlEnvironmentList} 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. */ - listApplicableNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listApplicableNext(nextPageLink: string, callback: ServiceCallback): void; - listApplicableNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 - * ServiceRunners + * Secrets * __NOTE__: An instance of this class is automatically created for an * instance of the DevTestLabsClient. */ -export interface ServiceRunners { +export interface Secrets { /** - * List service runners in a given lab. + * List secrets in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * + * @param {string} userName The name of the user profile. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=value)' + * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List service runners in a given lab. + * List secrets in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * + * @param {string} userName The name of the user profile. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=value)' + * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9778,7 +12654,7 @@ export interface ServiceRunners { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationServiceRunner} - The deserialized result object. + * @resolve {SecretList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9786,52 +12662,61 @@ export interface ServiceRunners { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationServiceRunner} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationServiceRunner} for - * more information. + * {SecretList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretList} 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(resourceGroupName: string, labName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get service runner. + * Get secret. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get service runner. + * Get secret. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=value)' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9842,7 +12727,7 @@ export interface ServiceRunners { * * {Promise} A promise is returned. * - * @resolve {ServiceRunner} - The deserialized result object. + * @resolve {Secret} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9850,46 +12735,37 @@ export interface ServiceRunners { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceRunner} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceRunner} for more information. + * {Secret} [result] - The deserialized result object if an error did not occur. + * See {@link Secret} 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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing Service runner. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. - * - * @param {object} serviceRunner A container for a managed identity to execute - * DevTest lab services. - * - * @param {object} [serviceRunner.identity] The identity of the resource. - * - * @param {string} [serviceRunner.identity.type] Managed identity. + * @param {string} userName The name of the user profile. * - * @param {string} [serviceRunner.identity.principalId] The principal id of - * resource identity. + * @param {string} name The name of the secret. * - * @param {string} [serviceRunner.identity.tenantId] The tenant identifier of - * resource. + * @param {object} secret A secret. * - * @param {string} [serviceRunner.identity.clientSecretUrl] The client secret - * URL of the identity. + * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [serviceRunner.location] The location of the resource. + * @param {string} [secret.location] The location of the resource. * - * @param {object} [serviceRunner.tags] The tags of the resource. + * @param {object} [secret.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9898,40 +12774,31 @@ export interface ServiceRunners { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, serviceRunner: models.ServiceRunner, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing Service runner. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. - * - * @param {object} serviceRunner A container for a managed identity to execute - * DevTest lab services. - * - * @param {object} [serviceRunner.identity] The identity of the resource. - * - * @param {string} [serviceRunner.identity.type] Managed identity. + * @param {string} userName The name of the user profile. * - * @param {string} [serviceRunner.identity.principalId] The principal id of - * resource identity. + * @param {string} name The name of the secret. * - * @param {string} [serviceRunner.identity.tenantId] The tenant identifier of - * resource. + * @param {object} secret A secret. * - * @param {string} [serviceRunner.identity.clientSecretUrl] The client secret - * URL of the identity. + * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [serviceRunner.location] The location of the resource. + * @param {string} [secret.location] The location of the resource. * - * @param {object} [serviceRunner.tags] The tags of the resource. + * @param {object} [secret.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -9945,7 +12812,7 @@ export interface ServiceRunners { * * {Promise} A promise is returned. * - * @resolve {ServiceRunner} - The deserialized result object. + * @resolve {Secret} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9953,26 +12820,28 @@ export interface ServiceRunners { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceRunner} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceRunner} for more information. + * {Secret} [result] - The deserialized result object if an error did not occur. + * See {@link Secret} 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, labName: string, name: string, serviceRunner: models.ServiceRunner, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, name: string, serviceRunner: models.ServiceRunner, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, name: string, serviceRunner: models.ServiceRunner, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete service runner. + * Delete secret. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -9985,16 +12854,18 @@ export interface ServiceRunners { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete service runner. + * Delete secret. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the service runner. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -10022,16 +12893,27 @@ export interface ServiceRunners { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List service runners in a given lab. + * Modify properties of secrets. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {object} [secret.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -10040,17 +12922,28 @@ export interface ServiceRunners { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.SecretFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List service runners in a given lab. + * Modify properties of secrets. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {object} [secret.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -10064,7 +12957,7 @@ export interface ServiceRunners { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationServiceRunner} - The deserialized result object. + * @resolve {Secret} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10072,78 +12965,72 @@ export interface ServiceRunners { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationServiceRunner} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationServiceRunner} for - * more information. + * {Secret} [result] - The deserialized result object if an error did not occur. + * See {@link Secret} 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 - * Users - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface Users { + update(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.SecretFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.SecretFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.SecretFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List user profiles in a given lab. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. + * @param {string} userName The name of the user profile. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=identity)' + * @param {string} name The name of the secret. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} secret A secret. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [secret.location] The location of the resource. + * + * @param {object} [secret.tags] The 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List user profiles in a given lab. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {object} [options] Optional Parameters. + * @param {string} userName The name of the user profile. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=identity)' + * @param {string} name The name of the secret. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {object} secret A secret. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [secret.location] The location of the resource. + * + * @param {object} [secret.tags] The tags of the resource. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10155,7 +13042,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationUser} - The deserialized result object. + * @resolve {Secret} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10163,58 +13050,45 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationUser} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationUser} for more - * information. + * {Secret} [result] - The deserialized result object if an error did not occur. + * See {@link Secret} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get user profile. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. + * List secrets in a given user profile. * - * @param {string} name The name of the user profile. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=identity)' - * * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get user profile. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. + * List secrets in a given user profile. * - * @param {string} name The name of the user profile. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=identity)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10225,7 +13099,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {User} - The deserialized result object. + * @resolve {SecretList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10233,128 +13107,83 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {User} [result] - The deserialized result object if an error did not occur. - * See {@link User} for more information. + * {SecretList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretList} 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, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 + * ServiceFabrics + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface ServiceFabrics { /** - * Create or replace an existing user profile. + * List service fabrics in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. - * - * @param {object} user Profile of a lab user. - * - * @param {object} [user.identity] The identity of the user. - * - * @param {string} [user.identity.principalName] Set to the principal name / - * UPN of the client JWT making the request. - * - * @param {string} [user.identity.principalId] Set to the principal Id of the - * client JWT making the request. Service principal will not have the principal - * Id. - * - * @param {string} [user.identity.tenantId] Set to the tenant ID of the client - * JWT making the request. - * - * @param {string} [user.identity.objectId] Set to the object Id of the client - * JWT making the request. Not all users have object Id. For CSP (reseller) - * scenarios for example, object Id is not available. - * - * @param {string} [user.identity.appId] Set to the app Id of the client JWT - * making the request. - * - * @param {object} [user.secretStore] The secret store of the user. - * - * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key - * vault. - * - * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key - * vault. + * @param {string} userName The name of the user profile. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' * - * @param {string} [user.location] The location of the resource. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [user.tags] The tags of the resource. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @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. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing user profile. + * List service fabrics in a given user profile. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. - * - * @param {object} user Profile of a lab user. - * - * @param {object} [user.identity] The identity of the user. - * - * @param {string} [user.identity.principalName] Set to the principal name / - * UPN of the client JWT making the request. - * - * @param {string} [user.identity.principalId] Set to the principal Id of the - * client JWT making the request. Service principal will not have the principal - * Id. - * - * @param {string} [user.identity.tenantId] Set to the tenant ID of the client - * JWT making the request. - * - * @param {string} [user.identity.objectId] Set to the object Id of the client - * JWT making the request. Not all users have object Id. For CSP (reseller) - * scenarios for example, object Id is not available. - * - * @param {string} [user.identity.appId] Set to the app Id of the client JWT - * making the request. - * - * @param {object} [user.secretStore] The secret store of the user. - * - * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key - * vault. - * - * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key - * vault. + * @param {string} userName The name of the user profile. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' * - * @param {string} [user.location] The location of the resource. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * - * @param {object} [user.tags] The tags of the resource. + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10366,7 +13195,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {User} - The deserialized result object. + * @resolve {ServiceFabricList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10374,51 +13203,61 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {User} [result] - The deserialized result object if an error did not occur. - * See {@link User} for more information. + * {ServiceFabricList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabricList} 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, labName: string, name: string, user: models.User, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, name: string, user: models.User, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete user profile. This operation can take a while to complete. + * Get service fabric. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * * @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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete user profile. This operation can take a while to complete. + * Get service fabric. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10429,7 +13268,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceFabric} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10437,125 +13276,78 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ServiceFabric} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabric} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Modify properties of user profiles. + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. - * - * @param {object} user Profile of a lab user. - * - * @param {object} [user.identity] The identity of the user. - * - * @param {string} [user.identity.principalName] Set to the principal name / - * UPN of the client JWT making the request. - * - * @param {string} [user.identity.principalId] Set to the principal Id of the - * client JWT making the request. Service principal will not have the principal - * Id. - * - * @param {string} [user.identity.tenantId] Set to the tenant ID of the client - * JWT making the request. - * - * @param {string} [user.identity.objectId] Set to the object Id of the client - * JWT making the request. Not all users have object Id. For CSP (reseller) - * scenarios for example, object Id is not available. - * - * @param {string} [user.identity.appId] Set to the app Id of the client JWT - * making the request. - * - * @param {object} [user.secretStore] The secret store of the user. + * @param {string} userName The name of the user profile. * - * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key - * vault. + * @param {string} name The name of the service Fabric. * - * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key - * vault. + * @param {object} serviceFabric A Service Fabric. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present * - * @param {string} [user.location] The location of the resource. + * @param {string} [serviceFabric.location] The location of the resource. * - * @param {object} [user.tags] The tags of the resource. + * @param {object} [serviceFabric.tags] The 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. - */ - updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Modify properties of user profiles. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the user profile. - * - * @param {object} user Profile of a lab user. - * - * @param {object} [user.identity] The identity of the user. - * - * @param {string} [user.identity.principalName] Set to the principal name / - * UPN of the client JWT making the request. - * - * @param {string} [user.identity.principalId] Set to the principal Id of the - * client JWT making the request. Service principal will not have the principal - * Id. + * @returns {Promise} A promise is returned * - * @param {string} [user.identity.tenantId] Set to the tenant ID of the client - * JWT making the request. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [user.identity.objectId] Set to the object Id of the client - * JWT making the request. Not all users have object Id. For CSP (reseller) - * scenarios for example, object Id is not available. + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. * - * @param {string} [user.identity.appId] Set to the app Id of the client JWT - * making the request. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [user.secretStore] The secret store of the user. + * @param {string} labName The name of the lab. * - * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key - * vault. + * @param {string} userName The name of the user profile. * - * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key - * vault. + * @param {string} name The name of the service Fabric. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. + * @param {object} serviceFabric A Service Fabric. * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id * - * @param {string} [user.location] The location of the resource. + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present * - * @param {object} [user.tags] The tags of the resource. + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -10569,7 +13361,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {User} - The deserialized result object. + * @resolve {ServiceFabric} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10577,26 +13369,28 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {User} [result] - The deserialized result object if an error did not occur. - * See {@link User} for more information. + * {ServiceFabric} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabric} 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, labName: string, name: string, user: models.UserFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, callback: ServiceCallback): void; - update(resourceGroupName: string, labName: string, name: string, user: models.UserFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete user profile. This operation can take a while to complete. + * Delete service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -10609,16 +13403,18 @@ export interface Users { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete user profile. This operation can take a while to complete. + * Delete service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} name The name of the user profile. + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -10646,16 +13442,31 @@ export interface Users { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List user profiles in a given lab. + * Modify properties of service fabrics. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {object} [serviceFabric.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -10664,17 +13475,32 @@ export interface Users { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabricFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List user profiles in a given lab. + * Modify properties of service fabrics. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {object} [serviceFabric.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -10688,7 +13514,7 @@ export interface Users { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationUser} - The deserialized result object. + * @resolve {ServiceFabric} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10696,30 +13522,20 @@ export interface Users { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationUser} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationUser} for more - * information. + * {ServiceFabric} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabric} 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 - * Disks - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface Disks { + update(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabricFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabricFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabricFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List disks in a given user profile. + * Lists the applicable start/stop schedules, if any. * * @param {string} resourceGroupName The name of the resource group. * @@ -10727,32 +13543,23 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=diskType)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the service Fabric. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listApplicableSchedulesWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List disks in a given user profile. + * Lists the applicable start/stop schedules, if any. * * @param {string} resourceGroupName The name of the resource group. * @@ -10760,18 +13567,9 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=diskType)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} name The name of the service Fabric. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10783,7 +13581,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationDisk} - The deserialized result object. + * @resolve {ApplicableSchedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10791,21 +13589,20 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationDisk} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * {ApplicableSchedule} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicableSchedule} 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(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listApplicableSchedules(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listApplicableSchedules(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + listApplicableSchedules(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get disk. + * Start a service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -10813,26 +13610,23 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=diskType)' - * * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get disk. + * Start a service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -10840,13 +13634,10 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=diskType)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10857,7 +13648,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {Disk} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10865,21 +13656,19 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Disk} [result] - The deserialized result object if an error did not occur. - * See {@link Disk} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + start(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing disk. This operation can take a while to - * complete. + * Stop a service fabric This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -10887,39 +13676,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} disk A Disk. - * - * @param {string} [disk.diskType] The storage type for the disk (i.e. - * Standard, Premium). Possible values include: 'Standard', 'Premium' - * - * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. - * - * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which - * this disk is leased. - * - * @param {string} [disk.diskBlobName] When backed by a blob, the name of the - * VHD blob without extension. - * - * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying - * blob. - * - * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. - * None, ReadOnly, ReadWrite). - * - * @param {string} [disk.managedDiskId] When backed by managed disk, this is - * the ID of the compute disk resource. - * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * - * @param {string} [disk.location] The location of the resource. - * - * @param {object} [disk.tags] The tags of the resource. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -10928,15 +13685,14 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing disk. This operation can take a while to - * complete. + * Stop a service fabric This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -10944,39 +13700,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} disk A Disk. - * - * @param {string} [disk.diskType] The storage type for the disk (i.e. - * Standard, Premium). Possible values include: 'Standard', 'Premium' - * - * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. - * - * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which - * this disk is leased. - * - * @param {string} [disk.diskBlobName] When backed by a blob, the name of the - * VHD blob without extension. - * - * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying - * blob. - * - * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. - * None, ReadOnly, ReadWrite). - * - * @param {string} [disk.managedDiskId] When backed by managed disk, this is - * the ID of the compute disk resource. - * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * - * @param {string} [disk.location] The location of the resource. - * - * @param {object} [disk.tags] The tags of the resource. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -10990,7 +13714,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {Disk} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10998,20 +13722,20 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Disk} [result] - The deserialized result object if an error did not occur. - * See {@link Disk} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete disk. This operation can take a while to complete. + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11019,7 +13743,19 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -11028,14 +13764,15 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete disk. This operation can take a while to complete. + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11043,7 +13780,19 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -11057,7 +13806,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceFabric} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11065,20 +13814,20 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ServiceFabric} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabric} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, serviceFabric: models.ServiceFabric, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Attach and create the lease of the disk to the virtual machine. This - * operation can take a while to complete. + * Delete service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11086,12 +13835,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} attachDiskProperties Properties of the disk to attach. - * - * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab virtual machine to which the disk is attached. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11104,11 +13848,10 @@ export interface Disks { * * @reject {Error|ServiceError} - The error object. */ - attachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Attach and create the lease of the disk to the virtual machine. This - * operation can take a while to complete. + * Delete service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11116,12 +13859,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} attachDiskProperties Properties of the disk to attach. - * - * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab virtual machine to which the disk is attached. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11149,14 +13887,13 @@ export interface Disks { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, callback: ServiceCallback): void; - attach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Detach and break the lease of the disk attached to the virtual machine. This - * operation can take a while to complete. + * Start a service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11164,12 +13901,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} detachDiskProperties Properties of the disk to detach. - * - * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab VM to which the disk is attached. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11182,11 +13914,10 @@ export interface Disks { * * @reject {Error|ServiceError} - The error object. */ - detachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Detach and break the lease of the disk attached to the virtual machine. This - * operation can take a while to complete. + * Start a service fabric. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11194,12 +13925,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} detachDiskProperties Properties of the disk to detach. - * - * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab VM to which the disk is attached. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11227,14 +13953,13 @@ export interface Disks { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, callback: ServiceCallback): void; - detach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing disk. This operation can take a while to - * complete. + * Stop a service fabric This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11242,39 +13967,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} disk A Disk. - * - * @param {string} [disk.diskType] The storage type for the disk (i.e. - * Standard, Premium). Possible values include: 'Standard', 'Premium' - * - * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. - * - * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which - * this disk is leased. - * - * @param {string} [disk.diskBlobName] When backed by a blob, the name of the - * VHD blob without extension. - * - * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying - * blob. - * - * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. - * None, ReadOnly, ReadWrite). - * - * @param {string} [disk.managedDiskId] When backed by managed disk, this is - * the ID of the compute disk resource. - * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * - * @param {string} [disk.location] The location of the resource. - * - * @param {object} [disk.tags] The tags of the resource. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11283,15 +13976,14 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStopWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing disk. This operation can take a while to - * complete. + * Stop a service fabric This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -11299,39 +13991,7 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} disk A Disk. - * - * @param {string} [disk.diskType] The storage type for the disk (i.e. - * Standard, Premium). Possible values include: 'Standard', 'Premium' - * - * @param {number} [disk.diskSizeGiB] The size of the disk in GibiBytes. - * - * @param {string} [disk.leasedByLabVmId] The resource ID of the VM to which - * this disk is leased. - * - * @param {string} [disk.diskBlobName] When backed by a blob, the name of the - * VHD blob without extension. - * - * @param {string} [disk.diskUri] When backed by a blob, the URI of underlying - * blob. - * - * @param {string} [disk.hostCaching] The host caching policy of the disk (i.e. - * None, ReadOnly, ReadWrite). - * - * @param {string} [disk.managedDiskId] When backed by managed disk, this is - * the ID of the compute disk resource. - * - * @param {string} [disk.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [disk.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * - * @param {string} [disk.location] The location of the resource. - * - * @param {object} [disk.tags] The tags of the resource. + * @param {string} name The name of the service Fabric. * * @param {object} [options] Optional Parameters. * @@ -11345,7 +14005,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {Disk} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11353,28 +14013,22 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Disk} [result] - The deserialized result object if an error did not occur. - * See {@link Disk} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, disk: models.Disk, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStop(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete disk. This operation can take a while to complete. + * List service fabrics in a given user profile. * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} userName The name of the user profile. - * - * @param {string} name The name of the disk. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -11383,22 +14037,17 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete disk. This operation can take a while to complete. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. + * List service fabrics in a given user profile. * - * @param {string} userName The name of the user profile. - * - * @param {string} name The name of the disk. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -11412,7 +14061,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceFabricList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11420,20 +14069,29 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ServiceFabricList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceFabricList} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 + * ServiceFabricSchedules + * __NOTE__: An instance of this class is automatically created for an + * instance of the DevTestLabsClient. + */ +export interface ServiceFabricSchedules { /** - * Attach and create the lease of the disk to the virtual machine. This - * operation can take a while to complete. + * List schedules in a given service fabric. * * @param {string} resourceGroupName The name of the resource group. * @@ -11441,29 +14099,35 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {object} attachDiskProperties Properties of the disk to attach. + * @param {object} [options] Optional Parameters. * - * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab virtual machine to which the disk is attached. + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @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. */ - beginAttachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Attach and create the lease of the disk to the virtual machine. This - * operation can take a while to complete. + * List schedules in a given service fabric. * * @param {string} resourceGroupName The name of the resource group. * @@ -11471,14 +14135,21 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {object} attachDiskProperties Properties of the disk to attach. + * @param {object} [options] Optional Parameters. * - * @param {string} [attachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab virtual machine to which the disk is attached. + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11490,7 +14161,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11498,20 +14169,20 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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. */ - beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, callback: ServiceCallback): void; - beginAttach(resourceGroupName: string, labName: string, userName: string, name: string, attachDiskProperties: models.AttachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Detach and break the lease of the disk attached to the virtual machine. This - * operation can take a while to complete. + * Get schedule. * * @param {string} resourceGroupName The name of the resource group. * @@ -11519,29 +14190,28 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} detachDiskProperties Properties of the disk to detach. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab VM to which the disk is attached. + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * * @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. */ - beginDetachWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Detach and break the lease of the disk attached to the virtual machine. This - * operation can take a while to complete. + * Get schedule. * * @param {string} resourceGroupName The name of the resource group. * @@ -11549,15 +14219,15 @@ export interface Disks { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the disk. - * - * @param {object} detachDiskProperties Properties of the disk to detach. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {string} [detachDiskProperties.leasedByLabVmId] The resource ID of - * the Lab VM to which the disk is attached. + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -11568,7 +14238,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Schedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11576,22 +14246,89 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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. */ - beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, callback: ServiceCallback): void; - beginDetach(resourceGroupName: string, labName: string, userName: string, name: string, detachDiskProperties: models.DetachDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List disks in a given user profile. + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -11600,115 +14337,86 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List disks in a given user profile. - * - * @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 + * Create or replace an existing schedule. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} resourceGroupName The name of the resource group. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} labName The name of the lab. * - * {Promise} A promise is returned. + * @param {string} userName The name of the user profile. * - * @resolve {ResponseWithContinuationDisk} - The deserialized result object. + * @param {string} serviceFabricName The name of the service Fabric. * - * @reject {Error|ServiceError} - The error object. + * @param {string} name The name of the schedule. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} schedule A schedule. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' * - * {ResponseWithContinuationDisk} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDisk} for more - * information. + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. * - * {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 - * Environments - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface Environments { - - - /** - * List environments in a given user profile. + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. * - * @param {string} labName The name of the lab. + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. * - * @param {string} userName The name of the user profile. + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. * - * @param {object} [options] Optional Parameters. + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=deploymentProperties)' + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {object} [schedule.notificationSettings] Notification settings. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. * - * @returns {Promise} A promise is returned + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List environments in a given user profile. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * - * @param {string} labName The name of the lab. + * @param {string} [schedule.location] The location of the resource. * - * @param {string} userName The name of the user profile. + * @param {object} [schedule.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=deploymentProperties)' - * - * @param {string} [options.filter] The filter to apply to the operation. - * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. - * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -11719,7 +14427,7 @@ export interface Environments { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationDtlEnvironment} - The deserialized result object. + * @resolve {Schedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11727,21 +14435,20 @@ export interface Environments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationDtlEnvironment} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDtlEnvironment} for - * more information. + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.Schedule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.Schedule, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.Schedule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get environment. + * Delete schedule. * * @param {string} resourceGroupName The name of the resource group. * @@ -11749,26 +14456,25 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {object} [options] Optional Parameters. + * @param {string} name The name of the schedule. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=deploymentProperties)' + * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get environment. + * Delete schedule. * * @param {string} resourceGroupName The name of the resource group. * @@ -11776,12 +14482,11 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {object} [options] Optional Parameters. + * @param {string} name The name of the schedule. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=deploymentProperties)' + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11793,7 +14498,7 @@ export interface Environments { * * {Promise} A promise is returned. * - * @resolve {DtlEnvironment} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11801,21 +14506,19 @@ export interface Environments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. - * See {@link DtlEnvironment} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * Modify properties of schedules. * * @param {string} resourceGroupName The name of the resource group. * @@ -11823,149 +14526,149 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. - * - * @param {object} dtlEnvironment An environment, which is essentially an ARM - * template deployment. - * - * @param {object} [dtlEnvironment.deploymentProperties] The deployment - * properties of the environment. - * - * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The - * Azure Resource Manager template's identifier. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {array} [dtlEnvironment.deploymentProperties.parameters] The - * parameters of the Azure Resource Manager template. + * @param {string} name The name of the schedule. * - * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of - * the Azure Resource Manager template that produced the environment. + * @param {object} schedule A schedule. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). * - * @param {string} [dtlEnvironment.location] The location of the resource. + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. * - * @param {object} [dtlEnvironment.tags] The tags of the resource. + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). * - * @param {object} [options] Optional Parameters. + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. * - * @returns {Promise} A promise is returned + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). * - * @param {string} labName The name of the lab. + * @param {object} [schedule.notificationSettings] Notification settings. * - * @param {string} userName The name of the user profile. + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' * - * @param {string} name The name of the environment. + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. * - * @param {object} dtlEnvironment An environment, which is essentially an ARM - * template deployment. + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. * - * @param {object} [dtlEnvironment.deploymentProperties] The deployment - * properties of the environment. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The - * Azure Resource Manager template's identifier. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {array} [dtlEnvironment.deploymentProperties.parameters] The - * parameters of the Azure Resource Manager template. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * - * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of - * the Azure Resource Manager template that produced the environment. + * @param {object} [schedule.tags] The tags of the resource. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [dtlEnvironment.location] The location of the resource. + * @returns {Promise} A promise is returned * - * @param {object} [dtlEnvironment.tags] The tags of the resource. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [options] Optional Parameters. + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Modify properties of schedules. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} resourceGroupName The name of the resource group. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} labName The name of the lab. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} userName The name of the user profile. * - * {Promise} A promise is returned. + * @param {string} serviceFabricName The name of the service Fabric. * - * @resolve {DtlEnvironment} - The deserialized result object. + * @param {string} name The name of the schedule. * - * @reject {Error|ServiceError} - The error object. + * @param {object} schedule A schedule. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). * - * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. - * See {@link DtlEnvironment} for more information. + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete environment. This operation can take a while to complete. + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. * - * @param {string} labName The name of the lab. + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. * - * @param {string} userName The name of the user profile. + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. * - * @param {string} name The name of the environment. + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. * - * @param {object} [options] Optional Parameters. + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [schedule.notificationSettings] Notification settings. * - * @returns {Promise} A promise is returned + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete environment. This operation can take a while to complete. + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} labName The name of the lab. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} userName The name of the user profile. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * - * @param {string} name The name of the environment. + * @param {object} [schedule.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -11979,7 +14682,7 @@ export interface Environments { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Schedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11987,20 +14690,20 @@ export interface Environments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.ScheduleFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.ScheduleFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, schedule: models.ScheduleFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * Execute a schedule. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12008,32 +14711,9 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. - * - * @param {object} dtlEnvironment An environment, which is essentially an ARM - * template deployment. - * - * @param {object} [dtlEnvironment.deploymentProperties] The deployment - * properties of the environment. - * - * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The - * Azure Resource Manager template's identifier. - * - * @param {array} [dtlEnvironment.deploymentProperties.parameters] The - * parameters of the Azure Resource Manager template. - * - * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of - * the Azure Resource Manager template that produced the environment. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [dtlEnvironment.location] The location of the resource. - * - * @param {object} [dtlEnvironment.tags] The tags of the resource. + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * @@ -12042,15 +14722,14 @@ export interface Environments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + executeWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing environment. This operation can take a while - * to complete. + * Execute a schedule. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12058,32 +14737,9 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. - * - * @param {object} dtlEnvironment An environment, which is essentially an ARM - * template deployment. - * - * @param {object} [dtlEnvironment.deploymentProperties] The deployment - * properties of the environment. - * - * @param {string} [dtlEnvironment.deploymentProperties.armTemplateId] The - * Azure Resource Manager template's identifier. - * - * @param {array} [dtlEnvironment.deploymentProperties.parameters] The - * parameters of the Azure Resource Manager template. - * - * @param {string} [dtlEnvironment.armTemplateDisplayName] The display name of - * the Azure Resource Manager template that produced the environment. - * - * @param {string} [dtlEnvironment.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [dtlEnvironment.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [dtlEnvironment.location] The location of the resource. + * @param {string} serviceFabricName The name of the service Fabric. * - * @param {object} [dtlEnvironment.tags] The tags of the resource. + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * @@ -12097,7 +14753,7 @@ export interface Environments { * * {Promise} A promise is returned. * - * @resolve {DtlEnvironment} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12105,20 +14761,19 @@ export interface Environments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DtlEnvironment} [result] - The deserialized result object if an error did not occur. - * See {@link DtlEnvironment} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, dtlEnvironment: models.DtlEnvironment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + execute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + execute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, callback: ServiceCallback): void; + execute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete environment. This operation can take a while to complete. + * Execute a schedule. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12126,7 +14781,9 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * @@ -12139,10 +14796,10 @@ export interface Environments { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginExecuteWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete environment. This operation can take a while to complete. + * Execute a schedule. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12150,7 +14807,9 @@ export interface Environments { * * @param {string} userName The name of the user profile. * - * @param {string} name The name of the environment. + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. * * @param {object} [options] Optional Parameters. * @@ -12178,13 +14837,13 @@ export interface Environments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginExecute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginExecute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, callback: ServiceCallback): void; + beginExecute(resourceGroupName: string, labName: string, userName: string, serviceFabricName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List environments in a given user profile. + * List schedules in a given service fabric. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -12196,14 +14855,14 @@ export interface Environments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List environments in a given user profile. + * List schedules in a given service fabric. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -12220,7 +14879,7 @@ export interface Environments { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationDtlEnvironment} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12228,82 +14887,79 @@ export interface Environments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationDtlEnvironment} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationDtlEnvironment} for - * more information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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; + 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 - * Secrets + * VirtualMachines * __NOTE__: An instance of this class is automatically created for an * instance of the DevTestLabsClient. */ -export interface Secrets { +export interface VirtualMachines { /** - * List secrets in a given user profile. + * List virtual machines in a given lab. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. - * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=value)' + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List secrets in a given user profile. + * List virtual machines in a given lab. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. - * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=value)' + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12315,7 +14971,7 @@ export interface Secrets { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSecret} - The deserialized result object. + * @resolve {LabVirtualMachineList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12323,61 +14979,56 @@ export interface Secrets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSecret} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * {LabVirtualMachineList} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachineList} 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(resourceGroupName: string, labName: string, userName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, userName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, userName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get secret. + * Get virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. - * - * @param {string} name The name of the secret. + * @param {string} name The name of the virtual machine. * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=value)' + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' * * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get secret. + * Get virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. - * - * @param {string} name The name of the secret. + * @param {string} name The name of the virtual machine. * * @param {object} [options] Optional Parameters. * * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($select=value)' + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12389,7 +15040,7 @@ export interface Secrets { * * {Promise} A promise is returned. * - * @resolve {Secret} - The deserialized result object. + * @resolve {LabVirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12397,123 +15048,184 @@ export interface Secrets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Secret} [result] - The deserialized result object if an error did not occur. - * See {@link Secret} for more information. + * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachine} 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, labName: string, userName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, userName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing secret. + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. + * @param {string} name The name of the virtual machine. * - * @param {string} name The name of the secret. + * @param {object} labVirtualMachine A virtual machine. * - * @param {object} secret A secret. + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. * - * @param {string} [secret.value] The value of the secret for secret creation. + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. * - * @param {string} [secret.provisioningState] The provisioning status of the - * resource. + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. * - * @param {string} [secret.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. * - * @param {string} [secret.location] The location of the resource. + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. * - * @param {object} [secret.tags] The tags of the resource. + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. * - * @returns {Promise} A promise is returned + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or replace an existing secret. + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. * - * @param {string} labName The name of the lab. + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. * - * @param {string} userName The name of the user profile. + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. * - * @param {string} name The name of the secret. + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. * - * @param {object} secret A secret. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * - * @param {string} [secret.value] The value of the secret for secret creation. + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. * - * @param {string} [secret.provisioningState] The provisioning status of the - * resource. + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. * - * @param {string} [secret.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. * - * @param {string} [secret.location] The location of the resource. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. * - * @param {object} [secret.tags] The tags of the resource. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. * - * {Promise} A promise is returned. + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. * - * @resolve {Secret} - The deserialized result object. + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules * - * @reject {Error|ServiceError} - The error object. + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * {Secret} [result] - The deserialized result object if an error did not occur. - * See {@link Secret} for more information. + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, userName: string, name: string, secret: models.Secret, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Delete secret. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} labName The name of the lab. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @param {string} userName The name of the user profile. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @param {string} name The name of the secret. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -12522,171 +15234,180 @@ export interface Secrets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete secret. + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * - * @param {string} userName The name of the user profile. + * @param {string} name The name of the virtual machine. * - * @param {string} name The name of the secret. + * @param {object} labVirtualMachine A virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. * - * {Promise} A promise is returned. + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. * - * @resolve {null} - The deserialized result object. + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} [labVirtualMachine.size] The size of the virtual machine. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, userName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * List secrets in a given user profile. + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. * - * @returns {Promise} A promise is returned + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List secrets in a given user profile. + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. * - * {Promise} A promise is returned. + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. * - * @resolve {ResponseWithContinuationSecret} - The deserialized result object. + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. * - * {ResponseWithContinuationSecret} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * - * {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 - * VirtualMachines - * __NOTE__: An instance of this class is automatically created for an - * instance of the DevTestLabsClient. - */ -export interface VirtualMachines { - - - /** - * List virtual machines in a given lab. + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. * - * @param {string} labName The name of the lab. + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @returns {Promise} A promise is returned + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List virtual machines in a given lab. + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {string} labName The name of the lab. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {object} [options] Optional Parameters. + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12698,7 +15419,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLabVirtualMachine} - The deserialized result object. + * @resolve {LabVirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12706,21 +15427,20 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVirtualMachine} - * for more information. + * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachine} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get virtual machine. + * Delete virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12730,22 +15450,19 @@ export interface VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * * @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. */ - getWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get virtual machine. + * Delete virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -12755,9 +15472,6 @@ export interface VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -12768,7 +15482,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12776,21 +15490,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, labName: string, name: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - get(resourceGroupName: string, labName: string, name: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Modify properties of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * @@ -12817,6 +15529,9 @@ export interface VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -12884,29 +15599,8 @@ export interface VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -12945,100 +15639,6 @@ export interface VirtualMachines { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. - * * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another @@ -13054,13 +15654,14 @@ export interface VirtualMachines { * @param {string} [labVirtualMachine.environmentId] The resource ID of the * environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * * @param {object} [labVirtualMachine.tags] The tags of the resource. * @@ -13075,11 +15676,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Modify properties of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * @@ -13106,6 +15706,9 @@ export interface VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -13173,29 +15776,8 @@ export interface VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -13234,124 +15816,142 @@ export interface VirtualMachines { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {object} [options] Optional Parameters. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * {Promise} A promise is returned. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * @resolve {LabVirtualMachine} - The deserialized result object. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachine} for more information. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, callback: ServiceCallback): void; + update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {string} name The name of the virtual machine. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' + * + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + * + * @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. + */ + addDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. + * + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * * @param {object} [options] Optional Parameters. * @@ -13365,7 +15965,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13373,20 +15973,20 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, callback: ServiceCallback): void; + addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete virtual machine. This operation can take a while to complete. + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -13394,6 +15994,12 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. + * + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -13405,10 +16011,11 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + applyArtifactsWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete virtual machine. This operation can take a while to complete. + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -13416,6 +16023,12 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. + * + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -13442,13 +16055,14 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, callback: ServiceCallback): void; + applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Modify properties of virtual machines. + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -13456,287 +16070,63 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. - * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. - * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. - * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. - * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. - * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. - * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. - * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. - * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. - * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. - * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. - * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. - * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. - * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. - * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. - * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. - * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. - * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. - * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. - * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. - * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. - * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. - * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. - * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. - * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. - * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. - * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. - * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. - * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. - * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. - * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. - * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). - * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. - * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. - * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules - * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @reject {Error|ServiceError} - The error object. + */ + claimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * {Promise} A promise is returned. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @resolve {null} - The deserialized result object. * - * @param {object} [options] Optional Parameters. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @returns {Promise} A promise is returned + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * {null} [result] - The deserialized result object if an error did not occur. * - * @reject {Error|ServiceError} - The error object. + * {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. */ - updateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + claim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + claim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + claim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * Modify properties of virtual machines. + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -13744,271 +16134,230 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. - * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. + * @returns {Promise} A promise is returned * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + detachDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. + * {Promise} A promise is returned. * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. + * @resolve {null} - The deserialized result object. * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, callback: ServiceCallback): void; + detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a string that represents the contents of the RDP file for the virtual + * machine * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. + * @param {object} [options] Optional Parameters. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + getRdpFileContentsWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a string that represents the contents of the RDP file for the virtual + * machine * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * @param {string} labName The name of the lab. * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * {Promise} A promise is returned. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * @resolve {RdpConnection} - The deserialized result object. * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * {RdpConnection} [result] - The deserialized result object if an error did not occur. + * See {@link RdpConnection} for more information. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getRdpFileContents(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getRdpFileContents(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + getRdpFileContents(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the applicable start/stop schedules, if any. * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @returns {Promise} A promise is returned * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @reject {Error|ServiceError} - The error object. + */ + listApplicableSchedulesWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the applicable start/stop schedules, if any. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {string} labName The name of the lab. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {string} name The name of the virtual machine. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * {Promise} A promise is returned. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @resolve {ApplicableSchedule} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * {ApplicableSchedule} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicableSchedule} for more information. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listApplicableSchedules(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listApplicableSchedules(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + listApplicableSchedules(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Redeploy a virtual machine This operation can take a while to complete. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {string} labName The name of the lab. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @reject {Error|ServiceError} - The error object. + */ + redeployWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Redeploy a virtual machine This operation can take a while to complete. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -14022,7 +16371,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14030,21 +16379,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, callback: ServiceCallback): void; - update(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachineFragment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14052,28 +16399,11 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -14086,11 +16416,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - addDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resizeWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14098,28 +16427,11 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -14147,14 +16459,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, callback: ServiceCallback): void; - addDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, callback: ServiceCallback): void; + resize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14162,12 +16473,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -14179,11 +16484,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - applyArtifactsWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14191,12 +16495,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -14223,14 +16521,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, callback: ServiceCallback): void; - applyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14249,11 +16546,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - claimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14287,14 +16583,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - claim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - claim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - claim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + start(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14302,12 +16597,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -14319,11 +16608,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - detachDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14331,12 +16619,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -14363,13 +16645,14 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, callback: ServiceCallback): void; - detachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all applicable schedules + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14384,14 +16667,15 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listApplicableSchedulesWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + transferDisksWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all applicable schedules + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14411,7 +16695,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {ApplicableSchedule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14419,20 +16703,20 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicableSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicableSchedule} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listApplicableSchedules(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listApplicableSchedules(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - listApplicableSchedules(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + transferDisks(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + transferDisks(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + transferDisks(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Start a virtual machine. This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14451,10 +16735,52 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + unClaimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Start a virtual machine. This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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. + */ + unClaim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + unClaim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + unClaim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14462,98 +16788,175 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {object} labVirtualMachine A virtual machine. + * + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. + * + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. * - * {Promise} A promise is returned. + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. * - * @resolve {null} - The deserialized result object. + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - start(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - start(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Stop a virtual machine This operation can take a while to complete. + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. * - * @param {string} labName The name of the lab. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. * - * @param {string} name The name of the virtual machine. + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). * - * @returns {Promise} A promise is returned + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. * - * @reject {Error|ServiceError} - The error object. - */ - stopWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Stop a virtual machine This operation can take a while to complete. + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules * - * @param {string} resourceGroupName The name of the resource group. + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @param {string} labName The name of the lab. + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @param {string} name The name of the virtual machine. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * {Promise} A promise is returned. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @resolve {null} - The deserialized result object. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [options] Optional Parameters. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {null} [result] - The deserialized result object if an error did not occur. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - stop(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - stop(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or replace an existing Virtual machine. This operation can take a @@ -14584,6 +16987,9 @@ export interface VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -14651,29 +17057,8 @@ export interface VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -14712,124 +17097,160 @@ export interface VirtualMachines { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options] Optional Parameters. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * {Promise} A promise is returned. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @resolve {LabVirtualMachine} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachine} for more information. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete virtual machine. This operation can take a while to complete. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {string} labName The name of the lab. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {string} name The name of the virtual machine. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete virtual machine. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * * @param {object} [options] Optional Parameters. * @@ -14838,15 +17259,15 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginAddDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -14854,271 +17275,244 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. + * {Promise} A promise is returned. * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. + * @resolve {null} - The deserialized result object. * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, callback: ServiceCallback): void; + beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. + * @param {string} labName The name of the lab. * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. + * @param {string} name The name of the virtual machine. * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. + * @reject {Error|ServiceError} - The error object. + */ + beginApplyArtifactsWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * {Promise} A promise is returned. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * @resolve {null} - The deserialized result object. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, callback: ServiceCallback): void; + beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {object} [options] Optional Parameters. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @returns {Promise} A promise is returned * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @reject {Error|ServiceError} - The error object. + */ + beginClaimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} labName The name of the lab. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} name The name of the virtual machine. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {object} [options] Optional Parameters. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * {Promise} A promise is returned. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * @resolve {null} - The deserialized result object. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * {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. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginClaim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginClaim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginClaim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} labName The name of the lab. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @reject {Error|ServiceError} - The error object. + */ + beginDetachDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * * @param {object} [options] Optional Parameters. * @@ -15132,7 +17526,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15140,20 +17534,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, labName: string, name: string, labVirtualMachine: models.LabVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, callback: ServiceCallback): void; + beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Delete virtual machine. This operation can take a while to complete. + * Redeploy a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15172,10 +17565,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete virtual machine. This operation can take a while to complete. + * Redeploy a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15209,14 +17602,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15224,28 +17616,11 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -15258,11 +17633,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginAddDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginResizeWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15270,28 +17644,11 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -15319,14 +17676,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, callback: ServiceCallback): void; - beginAddDataDisk(resourceGroupName: string, labName: string, name: string, dataDiskProperties: models.DataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginResize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginResize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, callback: ServiceCallback): void; + beginResize(resourceGroupName: string, labName: string, name: string, resizeLabVirtualMachineProperties: models.ResizeLabVirtualMachineProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15334,12 +17690,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15351,11 +17701,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginApplyArtifactsWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15363,12 +17712,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15395,14 +17738,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, callback: ServiceCallback): void; - beginApplyArtifacts(resourceGroupName: string, labName: string, name: string, applyArtifactsRequest: models.ApplyArtifactsRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15421,11 +17763,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginClaimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15459,14 +17800,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginClaim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginClaim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginClaim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15474,12 +17814,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15491,11 +17825,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginDetachDataDiskWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStopWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15503,12 +17836,6 @@ export interface VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15535,13 +17862,14 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, callback: ServiceCallback): void; - beginDetachDataDisk(resourceGroupName: string, labName: string, name: string, detachDataDiskProperties: models.DetachDataDiskProperties, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStop(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Start a virtual machine. This operation can take a while to complete. + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15560,10 +17888,11 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginTransferDisksWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Start a virtual machine. This operation can take a while to complete. + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15597,13 +17926,14 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginTransferDisks(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginTransferDisks(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginTransferDisks(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Stop a virtual machine This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15622,10 +17952,11 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginStopWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUnClaimWithHttpOperationResponse(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Stop a virtual machine This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -15659,9 +17990,9 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStop(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStop(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; - beginStop(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUnClaim(resourceGroupName: string, labName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUnClaim(resourceGroupName: string, labName: string, name: string, callback: ServiceCallback): void; + beginUnClaim(resourceGroupName: string, labName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15677,11 +18008,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List virtual machines in a given lab. @@ -15701,7 +18032,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationLabVirtualMachine} - The deserialized result object. + * @resolve {LabVirtualMachineList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15709,17 +18040,16 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationLabVirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVirtualMachine} - * for more information. + * {LabVirtualMachineList} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachineList} 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; + 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; } /** @@ -15746,23 +18076,24 @@ export interface VirtualMachineSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, virtualMachineName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, virtualMachineName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a given virtual machine. @@ -15779,12 +18110,13 @@ export interface VirtualMachineSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15796,7 +18128,7 @@ export interface VirtualMachineSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15804,17 +18136,16 @@ export interface VirtualMachineSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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(resourceGroupName: string, labName: string, virtualMachineName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, virtualMachineName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, virtualMachineName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, virtualMachineName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, virtualMachineName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, virtualMachineName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15937,7 +18268,7 @@ export interface VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -15945,14 +18276,16 @@ export interface VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -16018,7 +18351,7 @@ export interface VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -16026,14 +18359,16 @@ export interface VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -16184,7 +18519,7 @@ export interface VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -16192,16 +18527,16 @@ export interface VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -16265,7 +18600,7 @@ export interface VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -16273,16 +18608,16 @@ export interface VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -16463,11 +18798,11 @@ export interface VirtualMachineSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List schedules in a given virtual machine. @@ -16487,7 +18822,7 @@ export interface VirtualMachineSchedules { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16495,17 +18830,16 @@ export interface VirtualMachineSchedules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * {ScheduleList} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleList} 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; + 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; } /** @@ -16530,23 +18864,24 @@ export interface VirtualNetworks { * 'properties($expand=externalSubnets)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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. */ - listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List virtual networks in a given lab. @@ -16561,12 +18896,13 @@ export interface VirtualNetworks { * 'properties($expand=externalSubnets)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16578,7 +18914,7 @@ export interface VirtualNetworks { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationVirtualNetwork} - The deserialized result object. + * @resolve {VirtualNetworkList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16586,17 +18922,16 @@ export interface VirtualNetworks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationVirtualNetwork} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationVirtualNetwork} for - * more information. + * {VirtualNetworkList} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkList} 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(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options?: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, labName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, labName: string, options: { expand? : string, filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16689,18 +19024,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -16739,18 +19065,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -16869,20 +19186,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [virtualNetwork.location] The location of the resource. - * * @param {object} [virtualNetwork.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -16918,20 +19224,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [virtualNetwork.location] The location of the resource. - * * @param {object} [virtualNetwork.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -16987,18 +19282,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -17037,18 +19323,9 @@ export interface VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -17160,11 +19437,11 @@ export interface VirtualNetworks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List virtual networks in a given lab. @@ -17184,7 +19461,7 @@ export interface VirtualNetworks { * * {Promise} A promise is returned. * - * @resolve {ResponseWithContinuationVirtualNetwork} - The deserialized result object. + * @resolve {VirtualNetworkList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17192,15 +19469,14 @@ export interface VirtualNetworks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ResponseWithContinuationVirtualNetwork} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationVirtualNetwork} for - * more information. + * {VirtualNetworkList} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkList} 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; + 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; } diff --git a/lib/services/devTestLabs/lib/operations/index.js b/lib/services/devTestLabs/lib/operations/index.js index 106c5f84c6..6d59673f2d 100644 --- a/lib/services/devTestLabs/lib/operations/index.js +++ b/lib/services/devTestLabs/lib/operations/index.js @@ -34,6 +34,8 @@ exports.Users = require('./users'); exports.Disks = require('./disks'); exports.Environments = require('./environments'); exports.Secrets = require('./secrets'); +exports.ServiceFabrics = require('./serviceFabrics'); +exports.ServiceFabricSchedules = require('./serviceFabricSchedules'); exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineSchedules = require('./virtualMachineSchedules'); exports.VirtualNetworks = require('./virtualNetworks'); diff --git a/lib/services/devTestLabs/lib/operations/labs.js b/lib/services/devTestLabs/lib/operations/labs.js index 1861c11424..c03a354702 100644 --- a/lib/services/devTestLabs/lib/operations/labs.js +++ b/lib/services/devTestLabs/lib/operations/labs.js @@ -23,12 +23,13 @@ const WebResource = msRest.WebResource; * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -40,8 +41,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -172,7 +172,7 @@ function _listBySubscription(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLab']().mapper(); + let resultMapper = new client.models['LabList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -198,12 +198,13 @@ function _listBySubscription(options, callback) { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -215,8 +216,7 @@ function _listBySubscription(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 ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -351,7 +351,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLab']().mapper(); + let resultMapper = new client.models['LabList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -536,6 +536,14 @@ function _get(resourceGroupName, name, options, callback) { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -543,11 +551,38 @@ function _get(resourceGroupName, name, options, callback) { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -699,6 +734,14 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -706,13 +749,38 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab * - * @param {string} [lab.location] The location of the resource. + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {object} [lab.tags] The tags of the resource. * @@ -972,6 +1040,9 @@ function _claimAnyVm(resourceGroupName, name, options, callback) { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -1049,30 +1120,8 @@ function _claimAnyVm(resourceGroupName, name, options, callback) { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -1119,107 +1168,6 @@ function _claimAnyVm(resourceGroupName, name, options, callback) { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -1237,11 +1185,14 @@ function _claimAnyVm(resourceGroupName, name, options, callback) { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -1551,6 +1502,82 @@ function _generateUploadUri(resourceGroupName, name, generateUploadUriParameter, }); } + +/** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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 _importVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, 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.beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * List disk images available for custom image creation. * @@ -1570,8 +1597,7 @@ function _generateUploadUri(resourceGroupName, name, generateUploadUriParameter, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVhd} for more - * information. + * See {@link LabVhdList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1682,7 +1708,7 @@ function _listVhds(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLabVhd']().mapper(); + let resultMapper = new client.models['LabVhdList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1711,6 +1737,14 @@ function _listVhds(resourceGroupName, name, options, callback) { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -1718,11 +1752,38 @@ function _listVhds(resourceGroupName, name, options, callback) { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -1994,7 +2055,7 @@ function _beginDeleteMethod(resourceGroupName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2191,6 +2252,9 @@ function _beginClaimAnyVm(resourceGroupName, name, options, callback) { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -2268,30 +2332,8 @@ function _beginClaimAnyVm(resourceGroupName, name, options, callback) { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -2338,107 +2380,6 @@ function _beginClaimAnyVm(resourceGroupName, name, options, callback) { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -2456,11 +2397,14 @@ function _beginClaimAnyVm(resourceGroupName, name, options, callback) { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -2765,10 +2709,24 @@ function _beginExportResourceUsage(resourceGroupName, name, exportResourceUsageP } /** - * List labs in a subscription. + * Import a virtual machine into a different lab. This operation can take a + * while to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab * * @param {object} [options] Optional Parameters. * @@ -2781,15 +2739,13 @@ function _beginExportResourceUsage(resourceGroupName, name, exportResourceUsageP * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} 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 _listBySubscriptionNext(nextPageLink, options, callback) { +function _beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2801,8 +2757,20 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { } // 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.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 (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 (importLabVirtualMachineRequest === null || importLabVirtualMachineRequest === undefined) { + throw new Error('importLabVirtualMachineRequest cannot be null or undefined.'); + } + 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.'); @@ -2812,8 +2780,140 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/importVirtualMachine'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (importLabVirtualMachineRequest !== null && importLabVirtualMachineRequest !== undefined) { + let requestModelMapper = new client.models['ImportLabVirtualMachineRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, importLabVirtualMachineRequest, 'importLabVirtualMachineRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(importLabVirtualMachineRequest, 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List labs in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link LabList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -2877,7 +2977,7 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLab']().mapper(); + let resultMapper = new client.models['LabList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2910,8 +3010,7 @@ function _listBySubscriptionNext(nextPageLink, 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 ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3005,7 +3104,7 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLab']().mapper(); + let resultMapper = new client.models['LabList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3038,8 +3137,7 @@ function _listByResourceGroupNext(nextPageLink, 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 ResponseWithContinuationLabVhd} for more - * information. + * See {@link LabVhdList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3133,7 +3231,7 @@ function _listVhdsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLabVhd']().mapper(); + let resultMapper = new client.models['LabVhdList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3166,12 +3264,14 @@ class Labs { this._createEnvironment = _createEnvironment; this._exportResourceUsage = _exportResourceUsage; this._generateUploadUri = _generateUploadUri; + this._importVirtualMachine = _importVirtualMachine; this._listVhds = _listVhds; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginClaimAnyVm = _beginClaimAnyVm; this._beginCreateEnvironment = _beginCreateEnvironment; this._beginExportResourceUsage = _beginExportResourceUsage; + this._beginImportVirtualMachine = _beginImportVirtualMachine; this._listBySubscriptionNext = _listBySubscriptionNext; this._listByResourceGroupNext = _listByResourceGroupNext; this._listVhdsNext = _listVhdsNext; @@ -3186,19 +3286,20 @@ class Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -3225,12 +3326,13 @@ class Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3242,7 +3344,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3251,8 +3353,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3289,19 +3390,20 @@ class Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -3330,12 +3432,13 @@ class Labs { * 'properties($select=defaultStorageAccount)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3347,7 +3450,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3356,8 +3459,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3489,6 +3591,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -3496,11 +3606,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -3545,6 +3682,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -3552,11 +3697,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -3707,6 +3879,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -3714,13 +3894,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab * - * @param {string} [lab.location] The location of the resource. + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {object} [lab.tags] The tags of the resource. * @@ -3762,6 +3967,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -3769,13 +3982,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab * - * @param {string} [lab.location] The location of the resource. + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {object} [lab.tags] The tags of the resource. * @@ -3949,6 +4187,9 @@ class Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -4026,30 +4267,8 @@ class Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -4096,107 +4315,6 @@ class Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -4214,11 +4332,14 @@ class Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created + * + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -4290,6 +4411,9 @@ class Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -4367,30 +4491,8 @@ class Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -4437,132 +4539,34 @@ class Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. + * @param {date} [labVirtualMachineCreationParameter.expirationDate] The + * expiration date for VM. * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {boolean} [labVirtualMachineCreationParameter.allowClaim] Indicates + * whether another user can take ownership of the virtual machine * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {string} [labVirtualMachineCreationParameter.storageType] Storage + * type to use for virtual machine (i.e. Standard, Premium). * * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * [labVirtualMachineCreationParameter.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {string} [labVirtualMachineCreationParameter.environmentId] The + * resource ID of the environment that contains this virtual machine, if any. * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * - * @param {date} [labVirtualMachineCreationParameter.expirationDate] The - * expiration date for VM. - * - * @param {boolean} [labVirtualMachineCreationParameter.allowClaim] Indicates - * whether another user can take ownership of the virtual machine - * - * @param {string} [labVirtualMachineCreationParameter.storageType] Storage - * type to use for virtual machine (i.e. Standard, Premium). - * - * @param {string} - * [labVirtualMachineCreationParameter.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' - * - * @param {string} [labVirtualMachineCreationParameter.environmentId] The - * resource ID of the environment that contains this virtual machine, if any. - * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. - * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} [labVirtualMachineCreationParameter.name] The name of the - * virtual machine or environment + * @param {string} [labVirtualMachineCreationParameter.name] The name of the + * virtual machine or environment * * @param {string} [labVirtualMachineCreationParameter.location] The location * of the new virtual machine or environment @@ -4824,6 +4828,117 @@ class Labs { } } + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + importVirtualMachineWithHttpOperationResponse(resourceGroupName, name, importLabVirtualMachineRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._importVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + importVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, 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._importVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._importVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, optionalCallback); + } + } + /** * List disk images available for custom image creation. * @@ -4838,7 +4953,7 @@ class Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -4875,7 +4990,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLabVhd} - The deserialized result object. + * @resolve {LabVhdList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4884,8 +4999,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVhd} for more - * information. + * See {@link LabVhdList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4925,6 +5039,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -4932,11 +5054,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? + * + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -4981,6 +5130,14 @@ class Labs { * be either Premium or Standard. Default is Premium. Possible values include: * 'Standard', 'Premium' * + * @param {array} [lab.mandatoryArtifactsResourceIdsLinux] The ordered list of + * artifact resource IDs that should be applied on all Linux VM creations by + * default, prior to the artifacts specified by the user. + * + * @param {array} [lab.mandatoryArtifactsResourceIdsWindows] The ordered list + * of artifact resource IDs that should be applied on all Windows VM creations + * by default, prior to the artifacts specified by the user. + * * @param {string} [lab.premiumDataDisks] The setting to enable usage of * premium data disks. * When its value is 'Enabled', creation of standard or premium data disks is @@ -4988,11 +5145,38 @@ class Labs { * When its value is 'Disabled', only creation of standard data disks is * allowed. Possible values include: 'Disabled', 'Enabled' * - * @param {string} [lab.provisioningState] The provisioning status of the - * resource. + * @param {string} [lab.environmentPermission] The access rights to be granted + * to the user when provisioning an environment. Possible values include: + * 'Reader', 'Contributor' + * + * @param {object} [lab.announcement] The properties of any lab announcement + * associated with this lab + * + * @param {string} [lab.announcement.title] The plain text title for the lab + * announcement + * + * @param {string} [lab.announcement.markdown] The markdown text (if any) that + * this lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {string} [lab.announcement.enabled] Is the lab announcement + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {date} [lab.announcement.expirationDate] The time at which the + * announcement expires (null for never) + * + * @param {boolean} [lab.announcement.expired] Has this announcement expired? * - * @param {string} [lab.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * @param {object} [lab.support] The properties of any lab support message + * associated with this lab + * + * @param {string} [lab.support.enabled] Is the lab support banner + * active/enabled at this time?. Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [lab.support.markdown] The markdown text (if any) that this + * lab displays in the UI. If left empty/null, nothing will be shown. + * + * @param {object} [lab.extendedProperties] Extended properties of the lab used + * for experimental features * * @param {string} [lab.location] The location of the resource. * @@ -5253,6 +5437,9 @@ class Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -5330,30 +5517,8 @@ class Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -5400,107 +5565,6 @@ class Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -5518,11 +5582,14 @@ class Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created + * + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -5594,6 +5661,9 @@ class Labs { * @param {date} [labVirtualMachineCreationParameter.createdDate] The creation * date of the virtual machine. * + * @param {string} [labVirtualMachineCreationParameter.computeId] The resource + * identifier (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachineCreationParameter.customImageId] The * custom image identifier of the virtual machine. * @@ -5671,30 +5741,8 @@ class Labs { * [labVirtualMachineCreationParameter.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachineCreationParameter.computeVm] The compute - * virtual machine properties. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.statuses] Gets - * the statuses of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osType] Gets - * the OS type of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.vmSize] Gets - * the size of the virtual machine. - * - * @param {string} - * [labVirtualMachineCreationParameter.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachineCreationParameter.computeVm.osDiskId] Gets - * OS disk blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDiskIds] - * Gets data disks blob uri for the virtual machine. - * - * @param {array} [labVirtualMachineCreationParameter.computeVm.dataDisks] Gets - * all data disks attached to the virtual machine. + * @param {string} [labVirtualMachineCreationParameter.planId] The id of the + * plan associated with the virtual machine image * * @param {object} [labVirtualMachineCreationParameter.networkInterface] The * network interface properties. @@ -5741,107 +5789,6 @@ class Labs { * [labVirtualMachineCreationParameter.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule] The - * applicable schedule for the virtual machine. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.taskType] - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence] - * If the schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence] - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence] - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.timeZoneId] - * The time zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.targetResourceId] - * The resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.provisioningState] - * The provisioning status of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.uniqueIdentifier] - * The unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.location] - * The location of the resource. - * - * @param {object} - * [labVirtualMachineCreationParameter.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} - * [labVirtualMachineCreationParameter.applicableSchedule.location] The - * location of the resource. - * - * @param {object} [labVirtualMachineCreationParameter.applicableSchedule.tags] - * The tags of the resource. - * * @param {date} [labVirtualMachineCreationParameter.expirationDate] The * expiration date for VM. * @@ -5859,11 +5806,14 @@ class Labs { * @param {string} [labVirtualMachineCreationParameter.environmentId] The * resource ID of the environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachineCreationParameter.provisioningState] The - * provisioning status of the resource. + * @param {array} [labVirtualMachineCreationParameter.dataDiskParameters] New + * or existing data disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachineCreationParameter.scheduleParameters] + * Virtual Machine schedules to be created * - * @param {string} [labVirtualMachineCreationParameter.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachineCreationParameter.lastKnownPowerState] + * Last known compute power state captured in DTL * * @param {string} [labVirtualMachineCreationParameter.name] The name of the * virtual machine or environment @@ -6029,6 +5979,117 @@ class Labs { } } + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + beginImportVirtualMachineWithHttpOperationResponse(resourceGroupName, name, importLabVirtualMachineRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Import a virtual machine into a different lab. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} name The name of the lab. + * + * @param {object} importLabVirtualMachineRequest This represents the payload + * required to import a virtual machine from a different lab into the current + * one + * + * @param {string} + * [importLabVirtualMachineRequest.sourceVirtualMachineResourceId] The full + * resource ID of the virtual machine to be imported. + * + * @param {string} + * [importLabVirtualMachineRequest.destinationVirtualMachineName] The name of + * the virtual machine in the destination lab + * + * @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. + */ + beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, 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._beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginImportVirtualMachine(resourceGroupName, name, importLabVirtualMachineRequest, options, optionalCallback); + } + } + /** * List labs in a subscription. * @@ -6042,7 +6103,7 @@ class Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6078,7 +6139,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6087,8 +6148,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6127,7 +6187,7 @@ class Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6163,7 +6223,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLab} - The deserialized result object. + * @resolve {LabList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6172,8 +6232,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLab} for more - * information. + * See {@link LabList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6212,7 +6271,7 @@ class Labs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6248,7 +6307,7 @@ class Labs { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLabVhd} - The deserialized result object. + * @resolve {LabVhdList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6257,8 +6316,7 @@ class Labs { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVhd} for more - * information. + * See {@link LabVhdList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/notificationChannels.js b/lib/services/devTestLabs/lib/operations/notificationChannels.js index 87e9a1c9a5..be4a26b17f 100644 --- a/lib/services/devTestLabs/lib/operations/notificationChannels.js +++ b/lib/services/devTestLabs/lib/operations/notificationChannels.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=webHookUrl)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,8 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationNotificationChannel} - * for more information. + * See {@link NotificationChannelList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +185,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationNotificationChannel']().mapper(); + let resultMapper = new client.models['NotificationChannelList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -374,18 +375,19 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [notificationChannel.location] The location of the resource. * * @param {object} [notificationChannel.tags] The tags of the resource. @@ -713,20 +715,19 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [notificationChannel.location] The location of the resource. - * * @param {object} [notificationChannel.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1064,8 +1065,8 @@ function _notify(resourceGroupName, labName, name, notifyParameters, 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 ResponseWithContinuationNotificationChannel} - * for more information. + * See {@link NotificationChannelList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1159,7 +1160,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationNotificationChannel']().mapper(); + let resultMapper = new client.models['NotificationChannelList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1204,19 +1205,20 @@ class NotificationChannels { * 'properties($select=webHookUrl)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1247,12 +1249,13 @@ class NotificationChannels { * 'properties($select=webHookUrl)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1264,7 +1267,7 @@ class NotificationChannels { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationNotificationChannel} - The deserialized result object. + * @resolve {NotificationChannelList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1273,8 +1276,8 @@ class NotificationChannels { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationNotificationChannel} - * for more information. + * See {@link NotificationChannelList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1410,18 +1413,19 @@ class NotificationChannels { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [notificationChannel.location] The location of the resource. * * @param {object} [notificationChannel.tags] The tags of the resource. @@ -1465,18 +1469,19 @@ class NotificationChannels { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [notificationChannel.location] The location of the resource. * * @param {object} [notificationChannel.tags] The tags of the resource. @@ -1631,20 +1636,19 @@ class NotificationChannels { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [notificationChannel.location] The location of the resource. - * * @param {object} [notificationChannel.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1686,20 +1690,19 @@ class NotificationChannels { * @param {string} [notificationChannel.webHookUrl] The webhook URL to send * notifications to. * + * @param {string} [notificationChannel.emailRecipient] The email recipient to + * send notifications to (can be a list of semi-colon seperated email + * addresses). + * + * @param {string} [notificationChannel.notificationLocale] The locale to use + * when sending a notification (fallback for unsupported languages is EN). + * * @param {string} [notificationChannel.description] Description of * notification. * * @param {array} [notificationChannel.events] The list of event for which this * notification is enabled. * - * @param {string} [notificationChannel.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [notificationChannel.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [notificationChannel.location] The location of the resource. - * * @param {object} [notificationChannel.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1867,7 +1870,7 @@ class NotificationChannels { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1903,7 +1906,7 @@ class NotificationChannels { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationNotificationChannel} - The deserialized result object. + * @resolve {NotificationChannelList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1912,8 +1915,8 @@ class NotificationChannels { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationNotificationChannel} - * for more information. + * See {@link NotificationChannelList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/policies.js b/lib/services/devTestLabs/lib/operations/policies.js index 3341fe93c0..09ec554a0c 100644 --- a/lib/services/devTestLabs/lib/operations/policies.js +++ b/lib/services/devTestLabs/lib/operations/policies.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationPolicy} for more - * information. + * See {@link PolicyList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, policySetName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationPolicy']().mapper(); + let resultMapper = new client.models['PolicyList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -394,7 +394,8 @@ function _get(resourceGroupName, labName, policySetName, name, options, callback * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -406,12 +407,6 @@ function _get(resourceGroupName, labName, policySetName, name, options, callback * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [policy.location] The location of the resource. * * @param {object} [policy.tags] The tags of the resource. @@ -757,7 +752,8 @@ function _deleteMethod(resourceGroupName, labName, policySetName, name, options, * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -769,14 +765,6 @@ function _deleteMethod(resourceGroupName, labName, policySetName, name, options, * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * - * @param {string} [policy.location] The location of the resource. - * * @param {object} [policy.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -960,8 +948,7 @@ function _update(resourceGroupName, labName, policySetName, name, policy, 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 ResponseWithContinuationPolicy} for more - * information. + * See {@link PolicyList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1055,7 +1042,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationPolicy']().mapper(); + let resultMapper = new client.models['PolicyList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1101,19 +1088,20 @@ class Policies { * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1146,12 +1134,13 @@ class Policies { * 'properties($select=description)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1163,7 +1152,7 @@ class Policies { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationPolicy} - The deserialized result object. + * @resolve {PolicyList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1172,8 +1161,7 @@ class Policies { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationPolicy} for more - * information. + * See {@link PolicyList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1321,7 +1309,8 @@ class Policies { * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -1333,12 +1322,6 @@ class Policies { * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [policy.location] The location of the resource. * * @param {object} [policy.tags] The tags of the resource. @@ -1390,7 +1373,8 @@ class Policies { * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -1402,12 +1386,6 @@ class Policies { * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [policy.location] The location of the resource. * * @param {object} [policy.tags] The tags of the resource. @@ -1574,7 +1552,8 @@ class Policies { * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -1586,14 +1565,6 @@ class Policies { * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * - * @param {string} [policy.location] The location of the resource. - * * @param {object} [policy.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1643,7 +1614,8 @@ class Policies { * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost' + * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate', + * 'ScheduleEditPermission' * * @param {string} [policy.factData] The fact data of the policy. * @@ -1655,14 +1627,6 @@ class Policies { * (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: * 'AllowedValuesPolicy', 'MaxValuePolicy' * - * @param {string} [policy.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [policy.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * - * @param {string} [policy.location] The location of the resource. - * * @param {object} [policy.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1725,7 +1689,7 @@ class Policies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1761,7 +1725,7 @@ class Policies { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationPolicy} - The deserialized result object. + * @resolve {PolicyList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1770,8 +1734,7 @@ class Policies { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationPolicy} for more - * information. + * See {@link PolicyList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/schedules.js b/lib/services/devTestLabs/lib/operations/schedules.js index 8b3128937a..85aee916e1 100644 --- a/lib/services/devTestLabs/lib/operations/schedules.js +++ b/lib/services/devTestLabs/lib/operations/schedules.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -405,7 +405,7 @@ function _get(resourceGroupName, labName, name, options, callback) { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -413,14 +413,16 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -780,7 +782,7 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -788,16 +790,16 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -1046,8 +1048,7 @@ function _execute(resourceGroupName, labName, 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 ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1162,7 +1163,7 @@ function _listApplicable(resourceGroupName, labName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1328,8 +1329,7 @@ function _beginExecute(resourceGroupName, labName, 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 ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1423,7 +1423,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1456,8 +1456,7 @@ function _listNext(nextPageLink, 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 ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1551,7 +1550,7 @@ function _listApplicableNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1599,19 +1598,20 @@ class Schedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1642,12 +1642,13 @@ class Schedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1659,7 +1660,7 @@ class Schedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1668,8 +1669,7 @@ class Schedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1836,7 +1836,7 @@ class Schedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -1844,14 +1844,16 @@ class Schedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -1927,7 +1929,7 @@ class Schedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -1935,14 +1937,16 @@ class Schedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -2129,7 +2133,7 @@ class Schedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2137,16 +2141,16 @@ class Schedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -2220,7 +2224,7 @@ class Schedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2228,16 +2232,16 @@ class Schedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -2393,7 +2397,7 @@ class Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2432,7 +2436,7 @@ class Schedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2441,8 +2445,7 @@ class Schedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2570,7 +2573,7 @@ class Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2606,7 +2609,7 @@ class Schedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2615,8 +2618,7 @@ class Schedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2655,7 +2657,7 @@ class Schedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2691,7 +2693,7 @@ class Schedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2700,8 +2702,7 @@ class Schedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/secrets.js b/lib/services/devTestLabs/lib/operations/secrets.js index d454c0733f..e2062cb27c 100644 --- a/lib/services/devTestLabs/lib/operations/secrets.js +++ b/lib/services/devTestLabs/lib/operations/secrets.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=value)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * See {@link SecretList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, userName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSecret']().mapper(); + let resultMapper = new client.models['SecretList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -372,8 +372,10 @@ function _get(resourceGroupName, labName, userName, name, options, callback) { }); } + /** - * Create or replace an existing secret. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -387,12 +389,6 @@ function _get(resourceGroupName, labName, userName, name, options, callback) { * * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [secret.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [secret.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [secret.location] The location of the resource. * * @param {object} [secret.tags] The tags of the resource. @@ -422,6 +418,232 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt callback = options; options = null; } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, 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['Secret']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Delete secret. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @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, labName, userName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 !== 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); + }); +} + +/** + * Modify properties of secrets. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {object} [secret.tags] The tags of the 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 Secret} 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, labName, userName, name, secret, 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.'); } @@ -471,7 +693,7 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -494,7 +716,7 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt let requestModel = null; try { if (secret !== null && secret !== undefined) { - let requestModelMapper = new client.models['Secret']().mapper(); + let requestModelMapper = new client.models['SecretFragment']().mapper(); requestModel = client.serialize(requestModelMapper, secret, 'secret'); requestContent = JSON.stringify(requestModel); } @@ -510,7 +732,7 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -555,30 +777,14 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt return callback(deserializationError); } } - // 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['Secret']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError1.request = msRest.stripRequest(httpRequest); - deserializationError1.response = msRest.stripResponse(response); - return callback(deserializationError1); - } - } return callback(null, result, httpRequest, response); }); } /** - * Delete secret. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -588,6 +794,14 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt * * @param {string} name The name of the secret. * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {string} [secret.location] The location of the resource. + * + * @param {object} [secret.tags] The tags of the resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -599,13 +813,14 @@ function _createOrUpdate(resourceGroupName, labName, userName, name, secret, opt * * {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 Secret} 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 _deleteMethod(resourceGroupName, labName, userName, name, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -632,6 +847,9 @@ function _deleteMethod(resourceGroupName, labName, userName, name, 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 (secret === null || secret === undefined) { + throw new Error('secret cannot be null or undefined.'); + } 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.'); } @@ -658,7 +876,7 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -676,14 +894,28 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (secret !== null && secret !== undefined) { + let requestModelMapper = new client.models['Secret']().mapper(); + requestModel = client.serialize(requestModelMapper, secret, 'secret'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(secret, 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 !== 204) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -711,6 +943,40 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call // 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['Secret']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Secret']().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); }); @@ -734,8 +1000,7 @@ function _deleteMethod(resourceGroupName, labName, userName, name, options, call * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * See {@link SecretList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -829,7 +1094,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSecret']().mapper(); + let resultMapper = new client.models['SecretList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -856,6 +1121,8 @@ class Secrets { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._update = _update; + this._beginCreateOrUpdate = _beginCreateOrUpdate; this._listNext = _listNext; } @@ -874,19 +1141,20 @@ class Secrets { * 'properties($select=value)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -919,12 +1187,13 @@ class Secrets { * 'properties($select=value)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -936,7 +1205,7 @@ class Secrets { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSecret} - The deserialized result object. + * @resolve {SecretList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -945,8 +1214,7 @@ class Secrets { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * See {@link SecretList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1073,7 +1341,8 @@ class Secrets { } /** - * Create or replace an existing secret. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1087,12 +1356,6 @@ class Secrets { * * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [secret.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [secret.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [secret.location] The location of the resource. * * @param {object} [secret.tags] The tags of the resource. @@ -1123,7 +1386,8 @@ class Secrets { } /** - * Create or replace an existing secret. + * Create or replace an existing secret. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1137,12 +1401,6 @@ class Secrets { * * @param {string} [secret.value] The value of the secret for secret creation. * - * @param {string} [secret.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [secret.uniqueIdentifier] The unique immutable identifier of - * a resource (Guid). - * * @param {string} [secret.location] The location of the resource. * * @param {object} [secret.tags] The tags of the resource. @@ -1287,6 +1545,224 @@ class Secrets { } } + /** + * Modify properties of secrets. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {object} [secret.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, userName, name, secret, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, userName, name, secret, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of secrets. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {object} [secret.tags] The tags of the resource. + * + * @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 {Secret} - 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 Secret} 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, labName, userName, name, secret, 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, labName, userName, name, secret, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, userName, name, secret, options, optionalCallback); + } + } + + /** + * Create or replace an existing secret. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {string} [secret.location] The location of the resource. + * + * @param {object} [secret.tags] The 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} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, labName, userName, name, secret, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing secret. This operation can take a while to + * complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the secret. + * + * @param {object} secret A secret. + * + * @param {string} [secret.value] The value of the secret for secret creation. + * + * @param {string} [secret.location] The location of the resource. + * + * @param {object} [secret.tags] The tags of the resource. + * + * @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 {Secret} - 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 Secret} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, secret, options, optionalCallback); + } + } + /** * List secrets in a given user profile. * @@ -1300,7 +1776,7 @@ class Secrets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1336,7 +1812,7 @@ class Secrets { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSecret} - The deserialized result object. + * @resolve {SecretList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1345,8 +1821,7 @@ class Secrets { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSecret} for more - * information. + * See {@link SecretList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/serviceFabricSchedules.js b/lib/services/devTestLabs/lib/operations/serviceFabricSchedules.js new file mode 100644 index 0000000000..a03d07d7a2 --- /dev/null +++ b/lib/services/devTestLabs/lib/operations/serviceFabricSchedules.js @@ -0,0 +1,2411 @@ +/* + * 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; + +/** + * List schedules in a given service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 ScheduleList} 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(resourceGroupName, labName, userName, serviceFabricName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + // 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + 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['ScheduleList']().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); + }); +} + +/** + * Get schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @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 Schedule} 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, labName, userName, serviceFabricName, 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 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName cannot be null or undefined and it must be of type string.'); + } + 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 (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + 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['Schedule']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The tags of the 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 Schedule} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, labName, userName, serviceFabricName, name, schedule, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName cannot be null or undefined and it must be of type string.'); + } + 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 (schedule === null || schedule === undefined) { + throw new Error('schedule cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (schedule !== null && schedule !== undefined) { + let requestModelMapper = new client.models['Schedule']().mapper(); + requestModel = client.serialize(requestModelMapper, schedule, 'schedule'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(schedule, 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 !== 201) { + 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['Schedule']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Schedule']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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, labName, userName, serviceFabricName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 !== 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); + }); +} + +/** + * Modify properties of schedules. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {object} [schedule.tags] The tags of the 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 Schedule} 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, labName, userName, serviceFabricName, name, schedule, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName cannot be null or undefined and it must be of type string.'); + } + 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 (schedule === null || schedule === undefined) { + throw new Error('schedule cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (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 (schedule !== null && schedule !== undefined) { + let requestModelMapper = new client.models['ScheduleFragment']().mapper(); + requestModel = client.serialize(requestModelMapper, schedule, 'schedule'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(schedule, 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['Schedule']().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); + }); +} + + +/** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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 _execute(resourceGroupName, labName, userName, serviceFabricName, 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.beginExecute(resourceGroupName, labName, userName, serviceFabricName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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 _beginExecute(resourceGroupName, labName, userName, serviceFabricName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + if (serviceFabricName === null || serviceFabricName === undefined || typeof serviceFabricName.valueOf() !== 'string') { + throw new Error('serviceFabricName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}/execute'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{serviceFabricName}', encodeURIComponent(serviceFabricName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List schedules in a given service fabric. + * + * @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 ScheduleList} 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['ScheduleList']().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 ServiceFabricSchedules. */ +class ServiceFabricSchedules { + /** + * Create a ServiceFabricSchedules. + * @param {DevTestLabsClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._execute = _execute; + this._beginExecute = _beginExecute; + this._listNext = _listNext; + } + + /** + * List schedules in a given service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName, labName, userName, serviceFabricName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, labName, userName, serviceFabricName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List schedules in a given service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {ScheduleList} - 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 ScheduleList} 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(resourceGroupName, labName, userName, serviceFabricName, 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(resourceGroupName, labName, userName, serviceFabricName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, labName, userName, serviceFabricName, options, optionalCallback); + } + } + + /** + * Get schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @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, labName, userName, serviceFabricName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($select=status)' + * + * @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 {Schedule} - 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 Schedule} 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, labName, userName, serviceFabricName, 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._get(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, labName, userName, serviceFabricName, name, options, optionalCallback); + } + } + + /** + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The 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} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {string} [schedule.location] The location of the resource. + * + * @param {object} [schedule.tags] The tags of the resource. + * + * @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 {Schedule} - 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 Schedule} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, optionalCallback); + } + } + + /** + * Delete schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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, labName, userName, serviceFabricName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete schedule. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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, labName, userName, serviceFabricName, 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._deleteMethod(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, labName, userName, serviceFabricName, name, options, optionalCallback); + } + } + + /** + * Modify properties of schedules. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {object} [schedule.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of schedules. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @param {object} schedule A schedule. + * + * @param {string} [schedule.status] The status of the schedule (i.e. Enabled, + * Disabled). Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [schedule.taskType] The task type of the schedule (e.g. + * LabVmsShutdownTask, LabVmAutoStart). + * + * @param {object} [schedule.weeklyRecurrence] If the schedule will occur only + * some days of the week, specify the weekly recurrence. + * + * @param {array} [schedule.weeklyRecurrence.weekdays] The days of the week for + * which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). + * + * @param {string} [schedule.weeklyRecurrence.time] The time of the day the + * schedule will occur. + * + * @param {object} [schedule.dailyRecurrence] If the schedule will occur once + * each day of the week, specify the daily recurrence. + * + * @param {string} [schedule.dailyRecurrence.time] The time of day the schedule + * will occur. + * + * @param {object} [schedule.hourlyRecurrence] If the schedule will occur + * multiple times a day, specify the hourly recurrence. + * + * @param {number} [schedule.hourlyRecurrence.minute] Minutes of the hour the + * schedule will run. + * + * @param {string} [schedule.timeZoneId] The time zone ID (e.g. Pacific + * Standard time). + * + * @param {object} [schedule.notificationSettings] Notification settings. + * + * @param {string} [schedule.notificationSettings.status] If notifications are + * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: + * 'Enabled', 'Disabled' + * + * @param {number} [schedule.notificationSettings.timeInMinutes] Time in + * minutes before event at which notification will be sent. + * + * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL + * to which the notification will be sent. + * + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). + * + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs + * + * @param {object} [schedule.tags] The tags of the resource. + * + * @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 {Schedule} - 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 Schedule} 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, labName, userName, serviceFabricName, name, schedule, 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, labName, userName, serviceFabricName, name, schedule, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, userName, serviceFabricName, name, schedule, options, optionalCallback); + } + } + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + executeWithHttpOperationResponse(resourceGroupName, labName, userName, serviceFabricName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._execute(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + execute(resourceGroupName, labName, userName, serviceFabricName, 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._execute(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._execute(resourceGroupName, labName, userName, serviceFabricName, name, options, optionalCallback); + } + } + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + beginExecuteWithHttpOperationResponse(resourceGroupName, labName, userName, serviceFabricName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginExecute(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Execute a schedule. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} serviceFabricName The name of the service Fabric. + * + * @param {string} name The name of the schedule. + * + * @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. + */ + beginExecute(resourceGroupName, labName, userName, serviceFabricName, 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._beginExecute(resourceGroupName, labName, userName, serviceFabricName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginExecute(resourceGroupName, labName, userName, serviceFabricName, name, options, optionalCallback); + } + } + + /** + * List schedules in a given service fabric. + * + * @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; + }); + }); + } + + /** + * List schedules in a given service fabric. + * + * @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 {ScheduleList} - 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 ScheduleList} 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 = ServiceFabricSchedules; diff --git a/lib/services/devTestLabs/lib/operations/serviceFabrics.js b/lib/services/devTestLabs/lib/operations/serviceFabrics.js new file mode 100644 index 0000000000..27ec04ac73 --- /dev/null +++ b/lib/services/devTestLabs/lib/operations/serviceFabrics.js @@ -0,0 +1,3089 @@ +/* + * 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; + +/** + * List service fabrics in a given user profile. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 ServiceFabricList} 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(resourceGroupName, labName, userName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + // 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + 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['ServiceFabricList']().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); + }); +} + +/** + * Get service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @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 ServiceFabric} 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, labName, userName, 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 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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 (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + 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['ServiceFabric']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the 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 ServiceFabric} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, 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['ServiceFabric']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, 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.beginDeleteMethod(resourceGroupName, labName, userName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Modify properties of service fabrics. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {object} [serviceFabric.tags] The tags of the 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 ServiceFabric} 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, labName, userName, name, serviceFabric, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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 (serviceFabric === null || serviceFabric === undefined) { + throw new Error('serviceFabric cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (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 (serviceFabric !== null && serviceFabric !== undefined) { + let requestModelMapper = new client.models['ServiceFabricFragment']().mapper(); + requestModel = client.serialize(requestModelMapper, serviceFabric, 'serviceFabric'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(serviceFabric, 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['ServiceFabric']().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 the applicable start/stop schedules, if any. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 ApplicableSchedule} 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 _listApplicableSchedules(resourceGroupName, labName, userName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/listApplicableSchedules'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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['ApplicableSchedule']().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); + }); +} + + +/** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 _start(resourceGroupName, labName, userName, 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.beginStart(resourceGroupName, labName, userName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 _stop(resourceGroupName, labName, userName, 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.beginStop(resourceGroupName, labName, userName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the 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 ServiceFabric} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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 (serviceFabric === null || serviceFabric === undefined) { + throw new Error('serviceFabric cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (serviceFabric !== null && serviceFabric !== undefined) { + let requestModelMapper = new client.models['ServiceFabric']().mapper(); + requestModel = client.serialize(requestModelMapper, serviceFabric, 'serviceFabric'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(serviceFabric, 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 !== 201) { + 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['ServiceFabric']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceFabric']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 _beginStart(resourceGroupName, labName, userName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/start'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 _beginStop(resourceGroupName, labName, userName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + if (userName === null || userName === undefined || typeof userName.valueOf() !== 'string') { + throw new Error('userName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/stop'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List service fabrics in a given user profile. + * + * @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 ServiceFabricList} 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['ServiceFabricList']().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 ServiceFabrics. */ +class ServiceFabrics { + /** + * Create a ServiceFabrics. + * @param {DevTestLabsClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._listApplicableSchedules = _listApplicableSchedules; + this._start = _start; + this._stop = _stop; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginStart = _beginStart; + this._beginStop = _beginStop; + this._listNext = _listNext; + } + + /** + * List service fabrics in a given user profile. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName, labName, userName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, labName, userName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List service fabrics in a given user profile. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {ServiceFabricList} - 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 ServiceFabricList} 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(resourceGroupName, labName, userName, 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(resourceGroupName, labName, userName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, labName, userName, options, optionalCallback); + } + } + + /** + * Get service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @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, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get service fabric. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=applicableSchedule)' + * + * @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 {ServiceFabric} - 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 ServiceFabric} 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, labName, userName, 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._get(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The 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} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, userName, name, serviceFabric, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the resource. + * + * @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 {ServiceFabric} - 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 ServiceFabric} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, optionalCallback); + } + } + + /** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, 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._deleteMethod(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Modify properties of service fabrics. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {object} [serviceFabric.tags] The 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, labName, userName, name, serviceFabric, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Modify properties of service fabrics. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {object} [serviceFabric.tags] The tags of the resource. + * + * @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 {ServiceFabric} - 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 ServiceFabric} 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, labName, userName, name, serviceFabric, 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, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, userName, name, serviceFabric, options, optionalCallback); + } + } + + /** + * Lists the applicable start/stop schedules, if any. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + listApplicableSchedulesWithHttpOperationResponse(resourceGroupName, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listApplicableSchedules(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists the applicable start/stop schedules, if any. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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 {ApplicableSchedule} - 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 ApplicableSchedule} 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. + */ + listApplicableSchedules(resourceGroupName, labName, userName, 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._listApplicableSchedules(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listApplicableSchedules(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + startWithHttpOperationResponse(resourceGroupName, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._start(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + start(resourceGroupName, labName, userName, 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._start(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._start(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + stopWithHttpOperationResponse(resourceGroupName, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._stop(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + stop(resourceGroupName, labName, userName, 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._stop(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._stop(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The 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} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, labName, userName, name, serviceFabric, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing Service Fabric. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @param {object} serviceFabric A Service Fabric. + * + * @param {string} [serviceFabric.externalServiceFabricId] The backing service + * fabric resource's id + * + * @param {string} [serviceFabric.environmentId] The resource id of the + * environment under which the service fabric resource is present + * + * @param {string} [serviceFabric.location] The location of the resource. + * + * @param {object} [serviceFabric.tags] The tags of the resource. + * + * @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 {ServiceFabric} - 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 ServiceFabric} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, labName, userName, name, serviceFabric, options, optionalCallback); + } + } + + /** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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, labName, userName, 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._beginDeleteMethod(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + beginStartWithHttpOperationResponse(resourceGroupName, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStart(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Start a service fabric. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + beginStart(resourceGroupName, labName, userName, 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._beginStart(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStart(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + beginStopWithHttpOperationResponse(resourceGroupName, labName, userName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStop(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Stop a service fabric This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} userName The name of the user profile. + * + * @param {string} name The name of the service Fabric. + * + * @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. + */ + beginStop(resourceGroupName, labName, userName, 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._beginStop(resourceGroupName, labName, userName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStop(resourceGroupName, labName, userName, name, options, optionalCallback); + } + } + + /** + * List service fabrics in a given user profile. + * + * @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; + }); + }); + } + + /** + * List service fabrics in a given user profile. + * + * @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 {ServiceFabricList} - 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 ServiceFabricList} 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 = ServiceFabrics; diff --git a/lib/services/devTestLabs/lib/operations/serviceRunners.js b/lib/services/devTestLabs/lib/operations/serviceRunners.js index 5d5bb668ba..e1cd6c95ce 100644 --- a/lib/services/devTestLabs/lib/operations/serviceRunners.js +++ b/lib/services/devTestLabs/lib/operations/serviceRunners.js @@ -24,12 +24,13 @@ const WebResource = msRest.WebResource; * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41,8 +42,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationServiceRunner} for - * more information. + * See {@link ServiceRunnerList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -174,7 +174,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationServiceRunner']().mapper(); + let resultMapper = new client.models['ServiceRunnerList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -696,8 +696,7 @@ function _deleteMethod(resourceGroupName, labName, 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 ResponseWithContinuationServiceRunner} for - * more information. + * See {@link ServiceRunnerList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -791,7 +790,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationServiceRunner']().mapper(); + let resultMapper = new client.models['ServiceRunnerList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -831,19 +830,20 @@ class ServiceRunners { * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -871,12 +871,13 @@ class ServiceRunners { * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -888,7 +889,7 @@ class ServiceRunners { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationServiceRunner} - The deserialized result object. + * @resolve {ServiceRunnerList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -897,8 +898,7 @@ class ServiceRunners { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationServiceRunner} for - * more information. + * See {@link ServiceRunnerList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1246,7 +1246,7 @@ class ServiceRunners { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1282,7 +1282,7 @@ class ServiceRunners { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationServiceRunner} - The deserialized result object. + * @resolve {ServiceRunnerList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1291,8 +1291,7 @@ class ServiceRunners { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationServiceRunner} for - * more information. + * See {@link ServiceRunnerList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/users.js b/lib/services/devTestLabs/lib/operations/users.js index bdac555cdb..74af42e001 100644 --- a/lib/services/devTestLabs/lib/operations/users.js +++ b/lib/services/devTestLabs/lib/operations/users.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($select=identity)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationUser} for more - * information. + * See {@link UserList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationUser']().mapper(); + let resultMapper = new client.models['UserList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -360,8 +360,10 @@ function _get(resourceGroupName, labName, name, options, callback) { }); } + /** - * Create or replace an existing user profile. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -398,12 +400,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [user.location] The location of the resource. * * @param {object} [user.tags] The tags of the resource. @@ -433,6 +429,181 @@ function _createOrUpdate(resourceGroupName, labName, name, user, options, callba callback = options; options = null; } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, labName, name, user, 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['User']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Delete user profile. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @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, labName, 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.beginDeleteMethod(resourceGroupName, labName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Modify properties of user profiles. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {object} [user.tags] The tags of the 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 User} 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, labName, name, user, 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.'); } @@ -478,7 +649,7 @@ function _createOrUpdate(resourceGroupName, labName, name, user, options, callba // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -501,7 +672,7 @@ function _createOrUpdate(resourceGroupName, labName, name, user, options, callba let requestModel = null; try { if (user !== null && user !== undefined) { - let requestModelMapper = new client.models['User']().mapper(); + let requestModelMapper = new client.models['UserFragment']().mapper(); requestModel = client.serialize(requestModelMapper, user, 'user'); requestContent = JSON.stringify(requestModel); } @@ -517,7 +688,7 @@ function _createOrUpdate(resourceGroupName, labName, name, user, options, callba return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -562,95 +733,14 @@ function _createOrUpdate(resourceGroupName, labName, name, user, options, callba return callback(deserializationError); } } - // 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['User']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError1.request = msRest.stripRequest(httpRequest); - deserializationError1.response = msRest.stripResponse(response); - return callback(deserializationError1); - } - } return callback(null, result, httpRequest, response); }); } - /** - * Delete user profile. This operation can take a while to complete. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the user profile. - * - * @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, labName, 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.beginDeleteMethod(resourceGroupName, labName, 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 - - return callback(null, result, httpRequest, response); - }); - }); -} - -/** - * Modify properties of user profiles. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -687,12 +777,6 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [user.location] The location of the resource. * * @param {object} [user.tags] The tags of the resource. @@ -715,7 +799,7 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, labName, name, user, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, labName, name, user, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -767,7 +851,7 @@ function _update(resourceGroupName, labName, name, user, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -790,7 +874,7 @@ function _update(resourceGroupName, labName, name, user, options, callback) { let requestModel = null; try { if (user !== null && user !== undefined) { - let requestModelMapper = new client.models['UserFragment']().mapper(); + let requestModelMapper = new client.models['User']().mapper(); requestModel = client.serialize(requestModelMapper, user, 'user'); requestContent = JSON.stringify(requestModel); } @@ -806,7 +890,7 @@ function _update(resourceGroupName, labName, name, user, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -851,6 +935,23 @@ function _update(resourceGroupName, labName, name, user, options, callback) { return callback(deserializationError); } } + // 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['User']().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); }); @@ -956,7 +1057,7 @@ function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1007,8 +1108,7 @@ function _beginDeleteMethod(resourceGroupName, labName, 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 ResponseWithContinuationUser} for more - * information. + * See {@link UserList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1102,7 +1202,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationUser']().mapper(); + let resultMapper = new client.models['UserList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1130,6 +1230,7 @@ class Users { this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; this._update = _update; + this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._listNext = _listNext; } @@ -1147,19 +1248,20 @@ class Users { * 'properties($select=identity)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1190,12 +1292,13 @@ class Users { * 'properties($select=identity)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1207,7 +1310,7 @@ class Users { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationUser} - The deserialized result object. + * @resolve {UserList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1216,8 +1319,7 @@ class Users { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationUser} for more - * information. + * See {@link UserList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1340,7 +1442,8 @@ class Users { } /** - * Create or replace an existing user profile. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1377,12 +1480,6 @@ class Users { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [user.location] The location of the resource. * * @param {object} [user.tags] The tags of the resource. @@ -1413,7 +1510,8 @@ class Users { } /** - * Create or replace an existing user profile. + * Create or replace an existing user profile. This operation can take a while + * to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1450,12 +1548,6 @@ class Users { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * * @param {string} [user.location] The location of the resource. * * @param {object} [user.tags] The tags of the resource. @@ -1634,14 +1726,6 @@ class Users { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. - * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). - * - * @param {string} [user.location] The location of the resource. - * * @param {object} [user.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1707,11 +1791,161 @@ class Users { * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key * vault. * - * @param {string} [user.provisioningState] The provisioning status of the - * resource. + * @param {object} [user.tags] The tags of the resource. + * + * @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 {User} - 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. * - * @param {string} [user.uniqueIdentifier] The unique immutable identifier of a - * resource (Guid). + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link User} 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, labName, name, user, 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, labName, name, user, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, labName, name, user, options, optionalCallback); + } + } + + /** + * Create or replace an existing user profile. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. + * + * @param {string} [user.location] The location of the resource. + * + * @param {object} [user.tags] The 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} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, user, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, name, user, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing user profile. This operation can take a while + * to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the user profile. + * + * @param {object} user Profile of a lab user. + * + * @param {object} [user.identity] The identity of the user. + * + * @param {string} [user.identity.principalName] Set to the principal name / + * UPN of the client JWT making the request. + * + * @param {string} [user.identity.principalId] Set to the principal Id of the + * client JWT making the request. Service principal will not have the principal + * Id. + * + * @param {string} [user.identity.tenantId] Set to the tenant ID of the client + * JWT making the request. + * + * @param {string} [user.identity.objectId] Set to the object Id of the client + * JWT making the request. Not all users have object Id. For CSP (reseller) + * scenarios for example, object Id is not available. + * + * @param {string} [user.identity.appId] Set to the app Id of the client JWT + * making the request. + * + * @param {object} [user.secretStore] The secret store of the user. + * + * @param {string} [user.secretStore.keyVaultUri] The URI of the user's Key + * vault. + * + * @param {string} [user.secretStore.keyVaultId] The ID of the user's Key + * vault. * * @param {string} [user.location] The location of the resource. * @@ -1744,7 +1978,7 @@ class Users { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, labName, name, user, options, optionalCallback) { + beginCreateOrUpdate(resourceGroupName, labName, name, user, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1753,14 +1987,14 @@ class Users { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, labName, name, user, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, labName, name, user, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, labName, name, user, options, optionalCallback); + return self._beginCreateOrUpdate(resourceGroupName, labName, name, user, options, optionalCallback); } } @@ -1866,7 +2100,7 @@ class Users { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1902,7 +2136,7 @@ class Users { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationUser} - The deserialized result object. + * @resolve {UserList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1911,8 +2145,7 @@ class Users { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationUser} for more - * information. + * See {@link UserList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/virtualMachineSchedules.js b/lib/services/devTestLabs/lib/operations/virtualMachineSchedules.js index 281e063938..d310b7c8f7 100644 --- a/lib/services/devTestLabs/lib/operations/virtualMachineSchedules.js +++ b/lib/services/devTestLabs/lib/operations/virtualMachineSchedules.js @@ -29,12 +29,13 @@ const WebResource = msRest.WebResource; * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46,8 +47,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -190,7 +190,7 @@ function _list(resourceGroupName, labName, virtualMachineName, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -419,7 +419,7 @@ function _get(resourceGroupName, labName, virtualMachineName, name, options, cal * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -427,14 +427,16 @@ function _get(resourceGroupName, labName, virtualMachineName, name, options, cal * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -806,7 +808,7 @@ function _deleteMethod(resourceGroupName, labName, virtualMachineName, name, opt * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -814,16 +816,16 @@ function _deleteMethod(resourceGroupName, labName, virtualMachineName, name, opt * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). - * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -1214,8 +1216,7 @@ function _beginExecute(resourceGroupName, labName, virtualMachineName, name, opt * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1309,7 +1310,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationSchedule']().mapper(); + let resultMapper = new client.models['ScheduleList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1357,19 +1358,20 @@ class VirtualMachineSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1402,12 +1404,13 @@ class VirtualMachineSchedules { * 'properties($select=status)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1419,7 +1422,7 @@ class VirtualMachineSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1428,8 +1431,7 @@ class VirtualMachineSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1602,7 +1604,7 @@ class VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -1610,14 +1612,16 @@ class VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -1695,7 +1699,7 @@ class VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -1703,14 +1707,16 @@ class VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {string} [schedule.location] The location of the resource. * @@ -1903,7 +1909,7 @@ class VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -1911,16 +1917,16 @@ class VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -1996,7 +2002,7 @@ class VirtualMachineSchedules { * * @param {string} [schedule.notificationSettings.status] If notifications are * enabled for this schedule (i.e. Enabled, Disabled). Possible values include: - * 'Disabled', 'Enabled' + * 'Enabled', 'Disabled' * * @param {number} [schedule.notificationSettings.timeInMinutes] Time in * minutes before event at which notification will be sent. @@ -2004,16 +2010,16 @@ class VirtualMachineSchedules { * @param {string} [schedule.notificationSettings.webhookUrl] The webhook URL * to which the notification will be sent. * - * @param {string} [schedule.targetResourceId] The resource ID to which the - * schedule belongs - * - * @param {string} [schedule.provisioningState] The provisioning status of the - * resource. + * @param {string} [schedule.notificationSettings.emailRecipient] The email + * recipient to send notifications to (can be a list of semi-colon seperated + * email addresses). * - * @param {string} [schedule.uniqueIdentifier] The unique immutable identifier - * of a resource (Guid). + * @param {string} [schedule.notificationSettings.notificationLocale] The + * locale to use when sending a notification (fallback for unsupported + * languages is EN). * - * @param {string} [schedule.location] The location of the resource. + * @param {string} [schedule.targetResourceId] The resource ID to which the + * schedule belongs * * @param {object} [schedule.tags] The tags of the resource. * @@ -2263,7 +2269,7 @@ class VirtualMachineSchedules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2299,7 +2305,7 @@ class VirtualMachineSchedules { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationSchedule} - The deserialized result object. + * @resolve {ScheduleList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2308,8 +2314,7 @@ class VirtualMachineSchedules { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationSchedule} for more - * information. + * See {@link ScheduleList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/virtualMachines.js b/lib/services/devTestLabs/lib/operations/virtualMachines.js index 9529a5da03..84a08ebc51 100644 --- a/lib/services/devTestLabs/lib/operations/virtualMachines.js +++ b/lib/services/devTestLabs/lib/operations/virtualMachines.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVirtualMachine} - * for more information. + * See {@link LabVirtualMachineList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationLabVirtualMachine']().mapper(); + let resultMapper = new client.models['LabVirtualMachineList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -390,6 +390,9 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -457,29 +460,8 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -518,100 +500,6 @@ function _get(resourceGroupName, labName, name, options, callback) { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. - * * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another @@ -627,11 +515,14 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [labVirtualMachine.environmentId] The resource ID of the * environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * * @param {string} [labVirtualMachine.location] The location of the resource. * @@ -800,6 +691,9 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -867,29 +761,8 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -928,100 +801,6 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. - * * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another @@ -1037,13 +816,14 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [labVirtualMachine.environmentId] The resource ID of the * environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * * @param {object} [labVirtualMachine.tags] The tags of the resource. * @@ -1506,7 +1286,8 @@ function _detachDataDisk(resourceGroupName, labName, name, detachDataDiskPropert } /** - * Lists all applicable schedules + * Gets a string that represents the contents of the RDP file for the virtual + * machine * * @param {string} resourceGroupName The name of the resource group. * @@ -1526,13 +1307,13 @@ function _detachDataDisk(resourceGroupName, labName, name, detachDataDiskPropert * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicableSchedule} for more information. + * See {@link RdpConnection} 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 _listApplicableSchedules(resourceGroupName, labName, name, options, callback) { +function _getRdpFileContents(resourceGroupName, labName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1568,7 +1349,7 @@ function _listApplicableSchedules(resourceGroupName, labName, name, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/getRdpFileContents'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -1641,7 +1422,7 @@ function _listApplicableSchedules(resourceGroupName, labName, name, options, cal parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ApplicableSchedule']().mapper(); + let resultMapper = new client.models['RdpConnection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1656,9 +1437,8 @@ function _listApplicableSchedules(resourceGroupName, labName, name, options, cal }); } - /** - * Start a virtual machine. This operation can take a while to complete. + * Lists the applicable start/stop schedules, if any. * * @param {string} resourceGroupName The name of the resource group. * @@ -1677,53 +1457,140 @@ function _listApplicableSchedules(resourceGroupName, labName, name, options, cal * * {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 ApplicableSchedule} 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 _start(resourceGroupName, labName, name, options, callback) { +function _listApplicableSchedules(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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); + } - // Send request - this.beginStart(resourceGroupName, labName, 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; + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } - httpRequest = pollingResult.request; - response = pollingResult.response; - let responseBody = pollingResult.body; + // 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['ApplicableSchedule']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } - // Deserialize Response - - return callback(null, result, httpRequest, response); - }); + return callback(null, result, httpRequest, response); }); } /** - * Stop a virtual machine This operation can take a while to complete. + * Redeploy a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1748,7 +1615,7 @@ function _start(resourceGroupName, labName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(resourceGroupName, labName, name, options, callback) { +function _redeploy(resourceGroupName, labName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1761,7 +1628,7 @@ function _stop(resourceGroupName, labName, name, options, callback) { } // Send request - this.beginStop(resourceGroupName, labName, name, options, (err, parsedResult, httpRequest, response) => { + this.beginRedeploy(resourceGroupName, labName, name, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -1786,9 +1653,9 @@ function _stop(resourceGroupName, labName, name, options, callback) { }); } + /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -1796,450 +1663,266 @@ function _stop(resourceGroupName, labName, name, options, callback) { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. - * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. - * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. - * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. - * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. - * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. + * @param {function} callback - The callback. * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. + * @returns {function} callback(err, result, request, response) * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _resize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, 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.beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, 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); + }); + }); +} + + +/** + * Restart a virtual machine. This operation can take a while to complete. * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. + * @param {string} labName The name of the lab. * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. + * @param {function} callback - The callback. * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. + * @returns {function} callback(err, result, request, response) * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _restart(resourceGroupName, labName, 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.beginRestart(resourceGroupName, labName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Start a virtual machine. This operation can take a while to complete. * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. + * @param {string} name The name of the virtual machine. * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @param {function} callback - The callback. * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @returns {function} callback(err, result, request, response) * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _start(resourceGroupName, labName, 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.beginStart(resourceGroupName, labName, 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 + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Stop a virtual machine This operation can take a while to complete. * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * @param {function} callback - The callback. * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * @returns {function} callback(err, result, request, response) * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules - * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. - * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. - * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine - * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). - * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' - * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. - * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. - * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [labVirtualMachine.location] The location of the resource. - * - * @param {object} [labVirtualMachine.tags] The tags of the 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 LabVirtualMachine} for more information. - * - * {object} [request] - The HTTP Request 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 _beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, callback) { +function _stop(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { - throw new Error('labName cannot be null or undefined and it must be of type string.'); - } - 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 (labVirtualMachine === null || labVirtualMachine === undefined) { - throw new Error('labVirtualMachine cannot be null or undefined.'); - } - 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.DevTestLab/labs/{labName}/virtualmachines/{name}'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); - requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } + // Send request + this.beginStop(resourceGroupName, labName, name, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); - // 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 (labVirtualMachine !== null && labVirtualMachine !== undefined) { - let requestModelMapper = new client.models['LabVirtualMachine']().mapper(); - requestModel = client.serialize(requestModelMapper, labVirtualMachine, 'labVirtualMachine'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(labVirtualMachine, 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 !== 201) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // 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['LabVirtualMachine']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - // Deserialize Response - if (statusCode === 201) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['LabVirtualMachine']().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); + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); }); } + /** - * Delete virtual machine. This operation can take a while to complete. + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -2264,116 +1947,48 @@ function _beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachin * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) { +function _transferDisks(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { - throw new Error('labName cannot be null or undefined and it must be of type string.'); - } - 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); - requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } + // Send request + this.beginTransferDisks(resourceGroupName, labName, name, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - return callback(null, result, httpRequest, response); + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); }); } + /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -2381,29 +1996,6 @@ function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. - * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2421,145 +2013,210 @@ function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, callback) { +function _unClaim(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { - throw new Error('labName cannot be null or undefined and it must be of type string.'); - } - 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 (dataDiskProperties === null || dataDiskProperties === undefined) { - throw new Error('dataDiskProperties cannot be null or undefined.'); - } - 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.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); - requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } + // Send request + this.beginUnClaim(resourceGroupName, labName, name, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); - // 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 (dataDiskProperties !== null && dataDiskProperties !== undefined) { - let requestModelMapper = new client.models['DataDiskProperties']().mapper(); - requestModel = client.serialize(requestModelMapper, dataDiskProperties, 'dataDiskProperties'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(dataDiskProperties, 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); + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - return callback(null, result, httpRequest, response); + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); }); } /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. - * + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. + * * @param {string} resourceGroupName The name of the resource group. * * @param {string} labName The name of the lab. * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. + * @param {object} labVirtualMachine A virtual machine. * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. + * + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image + * + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. + * + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. + * + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. + * + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine + * + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. + * + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL + * + * @param {string} [labVirtualMachine.location] The location of the resource. + * + * @param {object} [labVirtualMachine.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. * @@ -2572,13 +2229,14 @@ function _beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, * * {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 LabVirtualMachine} 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 _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, callback) { +function _beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2602,8 +2260,8 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe 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 (applyArtifactsRequest === null || applyArtifactsRequest === undefined) { - throw new Error('applyArtifactsRequest cannot be null or undefined.'); + if (labVirtualMachine === null || labVirtualMachine === undefined) { + throw new Error('labVirtualMachine cannot be null or undefined.'); } 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.'); @@ -2617,7 +2275,7 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -2630,7 +2288,7 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2652,14 +2310,14 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe let requestContent = null; let requestModel = null; try { - if (applyArtifactsRequest !== null && applyArtifactsRequest !== undefined) { - let requestModelMapper = new client.models['ApplyArtifactsRequest']().mapper(); - requestModel = client.serialize(requestModelMapper, applyArtifactsRequest, 'applyArtifactsRequest'); + if (labVirtualMachine !== null && labVirtualMachine !== undefined) { + let requestModelMapper = new client.models['LabVirtualMachine']().mapper(); + requestModel = client.serialize(requestModelMapper, labVirtualMachine, 'labVirtualMachine'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(applyArtifactsRequest, null, 2)}.`); + `payload - ${JSON.stringify(labVirtualMachine, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2669,7 +2327,7 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2697,14 +2355,47 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe // 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['LabVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['LabVirtualMachine']().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); }); } /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Delete virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -2729,7 +2420,7 @@ function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRe * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginClaim(resourceGroupName, labName, name, options, callback) { +function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2765,7 +2456,7 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -2778,7 +2469,7 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2803,7 +2494,7 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2837,8 +2528,8 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { } /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -2846,11 +2537,28 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. + * + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' + * + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * * @param {object} [options] Optional Parameters. * @@ -2869,7 +2577,7 @@ function _beginClaim(resourceGroupName, labName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, callback) { +function _beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2893,8 +2601,8 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr 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 (detachDataDiskProperties === null || detachDataDiskProperties === undefined) { - throw new Error('detachDataDiskProperties cannot be null or undefined.'); + if (dataDiskProperties === null || dataDiskProperties === undefined) { + throw new Error('dataDiskProperties cannot be null or undefined.'); } 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.'); @@ -2908,7 +2616,7 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -2943,14 +2651,14 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr let requestContent = null; let requestModel = null; try { - if (detachDataDiskProperties !== null && detachDataDiskProperties !== undefined) { - let requestModelMapper = new client.models['DetachDataDiskProperties']().mapper(); - requestModel = client.serialize(requestModelMapper, detachDataDiskProperties, 'detachDataDiskProperties'); + if (dataDiskProperties !== null && dataDiskProperties !== undefined) { + let requestModelMapper = new client.models['DataDiskProperties']().mapper(); + requestModel = client.serialize(requestModelMapper, dataDiskProperties, 'dataDiskProperties'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(detachDataDiskProperties, null, 2)}.`); + `payload - ${JSON.stringify(dataDiskProperties, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2994,7 +2702,8 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr } /** - * Start a virtual machine. This operation can take a while to complete. + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -3002,6 +2711,12 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr * * @param {string} name The name of the virtual machine. * + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. + * + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3019,7 +2734,7 @@ function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskPr * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginStart(resourceGroupName, labName, name, options, callback) { +function _beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3043,6 +2758,9 @@ function _beginStart(resourceGroupName, labName, 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 (applyArtifactsRequest === null || applyArtifactsRequest === undefined) { + throw new Error('applyArtifactsRequest cannot be null or undefined.'); + } 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.'); } @@ -3055,7 +2773,7 @@ function _beginStart(resourceGroupName, labName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -3086,7 +2804,21 @@ function _beginStart(resourceGroupName, labName, name, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (applyArtifactsRequest !== null && applyArtifactsRequest !== undefined) { + let requestModelMapper = new client.models['ApplyArtifactsRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, applyArtifactsRequest, 'applyArtifactsRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(applyArtifactsRequest, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3127,7 +2859,8 @@ function _beginStart(resourceGroupName, labName, name, options, callback) { } /** - * Stop a virtual machine This operation can take a while to complete. + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -3152,7 +2885,7 @@ function _beginStart(resourceGroupName, labName, name, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginStop(resourceGroupName, labName, name, options, callback) { +function _beginClaim(resourceGroupName, labName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3188,7 +2921,7 @@ function _beginStop(resourceGroupName, labName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); @@ -3260,10 +2993,20 @@ function _beginStop(resourceGroupName, labName, name, options, callback) { } /** - * List virtual machines in a given lab. + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. + * + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * * @param {object} [options] Optional Parameters. * @@ -3276,15 +3019,13 @@ function _beginStop(resourceGroupName, labName, 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 ResponseWithContinuationLabVirtualMachine} - * 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 _listNext(nextPageLink, options, callback) { +function _beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3296,8 +3037,23 @@ function _listNext(nextPageLink, options, callback) { } // 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.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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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 (detachDataDiskProperties === null || detachDataDiskProperties === undefined) { + throw new Error('detachDataDiskProperties cannot be null or undefined.'); + } + 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.'); @@ -3307,12 +3063,21 @@ function _listNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3330,14 +3095,28 @@ function _listNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (detachDataDiskProperties !== null && detachDataDiskProperties !== undefined) { + let requestModelMapper = new client.models['DetachDataDiskProperties']().mapper(); + requestModel = client.serialize(requestModelMapper, detachDataDiskProperties, 'detachDataDiskProperties'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(detachDataDiskProperties, 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) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3365,121 +3144,1702 @@ function _listNext(nextPageLink, 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['ResponseWithContinuationLabVirtualMachine']().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 VirtualMachines. */ -class VirtualMachines { - /** - * Create a VirtualMachines. - * @param {DevTestLabsClient} client Reference to the service client. - */ - constructor(client) { - this.client = client; - this._list = _list; - this._get = _get; - this._createOrUpdate = _createOrUpdate; - this._deleteMethod = _deleteMethod; - this._update = _update; - this._addDataDisk = _addDataDisk; - this._applyArtifacts = _applyArtifacts; - this._claim = _claim; - this._detachDataDisk = _detachDataDisk; - this._listApplicableSchedules = _listApplicableSchedules; - this._start = _start; - this._stop = _stop; - this._beginCreateOrUpdate = _beginCreateOrUpdate; - this._beginDeleteMethod = _beginDeleteMethod; - this._beginAddDataDisk = _beginAddDataDisk; - this._beginApplyArtifacts = _beginApplyArtifacts; - this._beginClaim = _beginClaim; - this._beginDetachDataDisk = _beginDetachDataDisk; - this._beginStart = _beginStart; - this._beginStop = _beginStop; - this._listNext = _listNext; +/** + * Redeploy a virtual machine This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginRedeploy(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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); } - /** - * List virtual machines in a given lab. + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/redeploy'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Resize Virtual Machine. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. + * + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. + * + * @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 _beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, 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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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 (resizeLabVirtualMachineProperties === null || resizeLabVirtualMachineProperties === undefined) { + throw new Error('resizeLabVirtualMachineProperties cannot be null or undefined.'); + } + 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.DevTestLab/labs/{labName}/virtualmachines/{name}/resize'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 (resizeLabVirtualMachineProperties !== null && resizeLabVirtualMachineProperties !== undefined) { + let requestModelMapper = new client.models['ResizeLabVirtualMachineProperties']().mapper(); + requestModel = client.serialize(requestModelMapper, resizeLabVirtualMachineProperties, 'resizeLabVirtualMachineProperties'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(resizeLabVirtualMachineProperties, 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Restart a virtual machine. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginRestart(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}/restart'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Start a virtual machine. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginStart(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}/start'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Stop a virtual machine This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginStop(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}/stop'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginTransferDisks(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}/transferDisks'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Release ownership of an existing virtual machine This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @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 _beginUnClaim(resourceGroupName, labName, 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 (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 (labName === null || labName === undefined || typeof labName.valueOf() !== 'string') { + throw new Error('labName cannot be null or undefined and it must be of type string.'); + } + 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.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.DevTestLab/labs/{labName}/virtualmachines/{name}/unClaim'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{labName}', encodeURIComponent(labName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + 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 && 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List virtual machines in a given lab. + * + * @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 LabVirtualMachineList} 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['LabVirtualMachineList']().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 VirtualMachines. */ +class VirtualMachines { + /** + * Create a VirtualMachines. + * @param {DevTestLabsClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._addDataDisk = _addDataDisk; + this._applyArtifacts = _applyArtifacts; + this._claim = _claim; + this._detachDataDisk = _detachDataDisk; + this._getRdpFileContents = _getRdpFileContents; + this._listApplicableSchedules = _listApplicableSchedules; + this._redeploy = _redeploy; + this._resize = _resize; + this._restart = _restart; + this._start = _start; + this._stop = _stop; + this._transferDisks = _transferDisks; + this._unClaim = _unClaim; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginAddDataDisk = _beginAddDataDisk; + this._beginApplyArtifacts = _beginApplyArtifacts; + this._beginClaim = _beginClaim; + this._beginDetachDataDisk = _beginDetachDataDisk; + this._beginRedeploy = _beginRedeploy; + this._beginResize = _beginResize; + this._beginRestart = _beginRestart; + this._beginStart = _beginStart; + this._beginStop = _beginStop; + this._beginTransferDisks = _beginTransferDisks; + this._beginUnClaim = _beginUnClaim; + this._listNext = _listNext; + } + + /** + * List virtual machines in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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(resourceGroupName, labName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, labName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List virtual machines in a given lab. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * + * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') + * + * @param {number} [options.top] The maximum number of resources to return from + * the operation. Example: '$top=10' + * + * @param {string} [options.orderby] The ordering expression for the results, + * using OData notation. Example: '$orderby=name desc' + * + * @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 {LabVirtualMachineList} - 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 LabVirtualMachineList} 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(resourceGroupName, labName, 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(resourceGroupName, labName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, labName, options, optionalCallback); + } + } + + /** + * Get virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * + * @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, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] Specify the $expand query. Example: + * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * + * @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 {LabVirtualMachine} - 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 LabVirtualMachine} 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, labName, 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._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} labVirtualMachine A virtual machine. + * + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. + * + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image + * + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. + * + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. + * + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. + * + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine + * + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). + * + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. + * + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL + * + * @param {string} [labVirtualMachine.location] The location of the resource. + * + * @param {object} [labVirtualMachine.tags] The 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} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} labVirtualMachine A virtual machine. + * + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. + * + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. + * + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. + * + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. + * + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. + * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. * - * @param {string} labName The name of the lab. + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. * - * @returns {Promise} A promise is returned + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. * - * @reject {Error} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName, labName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._list(resourceGroupName, labName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * List virtual machines in a given lab. + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. * - * @param {string} labName The name of the lab. + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. * - * @param {object} [options] Optional Parameters. + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' + * + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. + * + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation + * + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created + * + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL + * + * @param {string} [labVirtualMachine.location] The location of the resource. + * + * @param {object} [labVirtualMachine.tags] The tags of the resource. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3491,7 +4851,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLabVirtualMachine} - The deserialized result object. + * @resolve {LabVirtualMachine} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3500,14 +4860,13 @@ class VirtualMachines { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVirtualMachine} - * for more information. + * See {@link LabVirtualMachine} 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(resourceGroupName, labName, options, optionalCallback) { + createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3516,19 +4875,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, labName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, labName, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); } } /** - * Get virtual machine. + * Delete virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -3538,23 +4897,20 @@ class VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * * @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} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, labName, name, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3565,7 +4921,7 @@ class VirtualMachines { } /** - * Get virtual machine. + * Delete virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -3575,9 +4931,6 @@ class VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Specify the $expand query. Example: - * 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3588,7 +4941,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3596,14 +4949,13 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} 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. */ - get(resourceGroupName, labName, name, options, optionalCallback) { + deleteMethod(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3612,20 +4964,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, labName, name, options, optionalCallback); + return self._deleteMethod(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Modify properties of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * @@ -3652,6 +5003,9 @@ class VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -3719,29 +5073,8 @@ class VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -3780,100 +5113,6 @@ class VirtualMachines { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. - * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. - * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. - * * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another @@ -3889,13 +5128,14 @@ class VirtualMachines { * @param {string} [labVirtualMachine.environmentId] The resource ID of the * environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * * @param {object} [labVirtualMachine.tags] The tags of the resource. * @@ -3910,11 +5150,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { + updateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._update(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3925,8 +5165,7 @@ class VirtualMachines { } /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Modify properties of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * @@ -3953,6 +5192,9 @@ class VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -4020,29 +5262,8 @@ class VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -4050,130 +5271,36 @@ class VirtualMachines { * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The * resource ID of the virtual network. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. - * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. - * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. - * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. - * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. - * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). - * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. - * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. - * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules - * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. - * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. - * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. - * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). - * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. - * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' - * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules * * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * @@ -4190,13 +5317,14 @@ class VirtualMachines { * @param {string} [labVirtualMachine.environmentId] The resource ID of the * environment that contains this virtual machine, if any. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * * @param {object} [labVirtualMachine.tags] The tags of the resource. * @@ -4227,7 +5355,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { + update(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4236,19 +5364,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._update(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); + return self._update(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); } } /** - * Delete virtual machine. This operation can take a while to complete. + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -4256,6 +5385,29 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. + * + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. + * + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' + * + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4267,11 +5419,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, labName, name, options) { + addDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, dataDiskProperties, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4282,7 +5434,8 @@ class VirtualMachines { } /** - * Delete virtual machine. This operation can take a while to complete. + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -4290,6 +5443,29 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. + * + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. + * + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' + * + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4316,7 +5492,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, labName, name, options, optionalCallback) { + addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4325,19 +5501,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, labName, name, options, optionalCallback); + return self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback); } } /** - * Modify properties of virtual machines. + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -4345,271 +5522,205 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. - * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. - * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. - * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. - * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. - * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. - * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. - * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. - * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. - * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. - * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. - * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. - * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. - * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. - * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. - * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. - * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. - * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. - * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. - * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. - * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. - * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. - * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. - * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. - * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * @returns {Promise} A promise is returned * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @reject {Error} - The error object. + */ + applyArtifactsWithHttpOperationResponse(resourceGroupName, labName, name, applyArtifactsRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * {Promise} A promise is returned * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules + * @resolve {null} - The deserialized result object. * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @reject {Error} - The error object. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * {function} optionalCallback(err, result, request, response) * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, 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._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback); + } + } + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} labName The name of the lab. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} name The name of the virtual machine. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {object} [options] Optional Parameters. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @returns {Promise} A promise is returned * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * @reject {Error} - The error object. + */ + claimWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._claim(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * @param {string} resourceGroupName The name of the resource group. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @param {string} labName The name of the lab. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @param {string} name The name of the virtual machine. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * {Promise} A promise is returned * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @resolve {null} - The deserialized result object. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @reject {Error} - The error object. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * {function} optionalCallback(err, result, request, response) * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + claim(resourceGroupName, labName, 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._claim(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._claim(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. + * + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * * @param {object} [options] Optional Parameters. * @@ -4618,15 +5729,15 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { + detachDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, detachDataDiskProperties, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4637,7 +5748,8 @@ class VirtualMachines { } /** - * Modify properties of virtual machines. + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -4645,271 +5757,282 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. - * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. - * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. - * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. - * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. - * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. - * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. - * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. - * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. - * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. + * {Promise} A promise is returned * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. + * @resolve {null} - The deserialized result object. * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. + * @reject {Error} - The error object. * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, 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._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback); + } + } + + /** + * Gets a string that represents the contents of the RDP file for the virtual + * machine * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. + * @returns {Promise} A promise is returned * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @reject {Error} - The error object. + */ + getRdpFileContentsWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getRdpFileContents(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a string that represents the contents of the RDP file for the virtual + * machine * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * {Promise} A promise is returned * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * @resolve {RdpConnection} - The deserialized result object. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * @reject {Error} - The error object. * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * {function} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RdpConnection} for more information. * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getRdpFileContents(resourceGroupName, labName, 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._getRdpFileContents(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getRdpFileContents(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Lists the applicable start/stop schedules, if any. * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @returns {Promise} A promise is returned * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @reject {Error} - The error object. + */ + listApplicableSchedulesWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listApplicableSchedules(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists the applicable start/stop schedules, if any. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} labName The name of the lab. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {string} name The name of the virtual machine. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options] Optional Parameters. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @param {function} [optionalCallback] - The optional callback. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * {Promise} A promise is returned * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @resolve {ApplicableSchedule} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @reject {Error} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicableSchedule} for more information. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listApplicableSchedules(resourceGroupName, labName, 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._listApplicableSchedules(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listApplicableSchedules(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Redeploy a virtual machine This operation can take a while to complete. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {string} labName The name of the lab. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {string} name The name of the virtual machine. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @reject {Error} - The error object. + */ + redeployWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._redeploy(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Redeploy a virtual machine This operation can take a while to complete. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} name The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -4923,7 +6046,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4931,14 +6054,13 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} 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. */ - update(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { + redeploy(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4947,20 +6069,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._redeploy(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); + return self._redeploy(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -4968,28 +6089,11 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -5002,11 +6106,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - addDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, dataDiskProperties, options) { + resizeWithHttpOperationResponse(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { + self._resize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5017,37 +6121,19 @@ class VirtualMachines { } /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} labName The name of the lab. - * - * @param {string} name The name of the virtual machine. + * Resize Virtual Machine. This operation can take a while to complete. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. + * @param {string} labName The name of the lab. * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' + * @param {string} name The name of the virtual machine. * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -5075,7 +6161,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback) { + resize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5084,20 +6170,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { + self._resize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._addDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback); + return self._resize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, optionalCallback); } } /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5105,12 +6190,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5122,11 +6201,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - applyArtifactsWithHttpOperationResponse(resourceGroupName, labName, name, applyArtifactsRequest, options) { + restartWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + self._restart(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5137,8 +6216,7 @@ class VirtualMachines { } /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5146,12 +6224,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5178,7 +6250,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback) { + restart(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5187,20 +6259,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + self._restart(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._applyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback); + return self._restart(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5219,11 +6290,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - claimWithHttpOperationResponse(resourceGroupName, labName, name, options) { + startWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._claim(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._start(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5234,8 +6305,7 @@ class VirtualMachines { } /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5269,7 +6339,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - claim(resourceGroupName, labName, name, options, optionalCallback) { + start(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5278,20 +6348,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._claim(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._start(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._claim(resourceGroupName, labName, name, options, optionalCallback); + return self._start(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5299,12 +6368,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5316,11 +6379,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - detachDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, detachDataDiskProperties, options) { + stopWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + self._stop(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5331,8 +6394,7 @@ class VirtualMachines { } /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5340,12 +6402,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5372,7 +6428,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback) { + stop(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5381,19 +6437,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + self._stop(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._detachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback); + return self._stop(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Lists all applicable schedules + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5408,15 +6465,15 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listApplicableSchedulesWithHttpOperationResponse(resourceGroupName, labName, name, options) { + transferDisksWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listApplicableSchedules(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._transferDisks(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5427,7 +6484,8 @@ class VirtualMachines { } /** - * Lists all applicable schedules + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5447,7 +6505,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {ApplicableSchedule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5455,14 +6513,13 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicableSchedule} 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. */ - listApplicableSchedules(resourceGroupName, labName, name, options, optionalCallback) { + transferDisks(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5471,19 +6528,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listApplicableSchedules(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._transferDisks(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listApplicableSchedules(resourceGroupName, labName, name, options, optionalCallback); + return self._transferDisks(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Start a virtual machine. This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5502,11 +6560,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - startWithHttpOperationResponse(resourceGroupName, labName, name, options) { + unClaimWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._start(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._unClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5517,7 +6575,8 @@ class VirtualMachines { } /** - * Start a virtual machine. This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5551,7 +6610,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName, labName, name, options, optionalCallback) { + unClaim(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5560,19 +6619,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._start(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._unClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._start(resourceGroupName, labName, name, options, optionalCallback); + return self._unClaim(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Stop a virtual machine This operation can take a while to complete. + * Create or replace an existing Virtual machine. This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5580,84 +6640,186 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {object} labVirtualMachine A virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. * - * @returns {Promise} A promise is returned + * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of + * the owner of the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user + * principal name of the virtual machine owner. * - * @reject {Error} - The error object. - */ - stopWithHttpOperationResponse(resourceGroupName, labName, name, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._stop(resourceGroupName, labName, name, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Stop a virtual machine This operation can take a while to complete. + * @param {string} [labVirtualMachine.createdByUserId] The object identifier of + * the creator of the virtual machine. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [labVirtualMachine.createdByUser] The email address of + * creator of the virtual machine. * - * @param {string} labName The name of the lab. + * @param {date} [labVirtualMachine.createdDate] The creation date of the + * virtual machine. * - * @param {string} name The name of the virtual machine. + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * + * @param {string} [labVirtualMachine.customImageId] The custom image + * identifier of the virtual machine. + * + * @param {string} [labVirtualMachine.osType] The OS type of the virtual + * machine. + * + * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * + * @param {string} [labVirtualMachine.userName] The user name of the virtual + * machine. + * + * @param {string} [labVirtualMachine.password] The password of the virtual + * machine administrator. + * + * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual + * machine administrator. + * + * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates + * whether this virtual machine uses an SSH key for authentication. + * + * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of + * the virtual machine. + * + * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the + * virtual machine. + * + * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual + * network identifier of the virtual machine. + * + * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates + * whether the virtual machine is to be created without a public IP address. + * + * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed + * on the virtual machine. + * + * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact + * deployment status for the virtual machine. + * + * @param {string} + * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment + * status of the artifact. + * + * @param {number} + * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total + * count of the artifacts that were successfully applied. + * + * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] + * The total count of the artifacts that were tentatively applied. + * + * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft + * Azure Marketplace image reference of the virtual machine. + * + * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of + * the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.publisher] The + * publisher of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the + * gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type + * of the gallery image. + * + * @param {string} [labVirtualMachine.galleryImageReference.version] The + * version of the gallery image. + * + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image + * + * @param {object} [labVirtualMachine.networkInterface] The network interface + * properties. + * + * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The + * resource ID of the virtual network. + * + * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource + * ID of the sub net. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The + * resource ID of the public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The + * public IP address. + * + * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The + * private IP address. + * + * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * + * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The + * RdpAuthority property is a server DNS host name or IP address followed by + * the service port number for RDP (Remote Desktop Protocol). + * + * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The + * SshAuthority property is a server DNS host name or IP address followed by + * the service port number for SSH. + * + * @param {object} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The + * configuration for sharing a public IP address across multiple virtual + * machines. + * + * @param {array} + * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] + * The incoming NAT rules + * + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine + * + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {object} [options] Optional Parameters. + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {function} [optionalCallback] - The optional callback. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * {Promise} A promise is returned + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @resolve {null} - The deserialized result object. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @reject {Error} - The error object. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * {function} optionalCallback(err, result, request, response) + * @param {object} [options] Optional Parameters. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {null} [result] - The deserialized result object if an error did not occur. + * @returns {Promise} A promise is returned * - * {object} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {stream} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error} - The error object. */ - stop(resourceGroupName, labName, name, options, optionalCallback) { + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { let client = this.client; let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._stop(resourceGroupName, labName, name, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; }); - } else { - return self._stop(resourceGroupName, labName, name, options, optionalCallback); - } + }); } /** @@ -5689,6 +6851,9 @@ class VirtualMachines { * @param {date} [labVirtualMachine.createdDate] The creation date of the * virtual machine. * + * @param {string} [labVirtualMachine.computeId] The resource identifier + * (Microsoft.Compute) of the virtual machine. + * * @param {string} [labVirtualMachine.customImageId] The custom image * identifier of the virtual machine. * @@ -5756,29 +6921,8 @@ class VirtualMachines { * @param {string} [labVirtualMachine.galleryImageReference.version] The * version of the gallery image. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. - * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. - * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. - * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {string} [labVirtualMachine.planId] The id of the plan associated + * with the virtual machine image * * @param {object} [labVirtualMachine.networkInterface] The network interface * properties. @@ -5817,124 +6961,202 @@ class VirtualMachines { * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] * The incoming NAT rules * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another + * user can take ownership of the virtual machine * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {string} [labVirtualMachine.storageType] Storage type to use for + * virtual machine (i.e. Standard, Premium). * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells + * source of creation of lab virtual machine. Output property only. Possible + * values include: 'FromCustomImage', 'FromGalleryImage' * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @param {string} [labVirtualMachine.environmentId] The resource ID of the + * environment that contains this virtual machine, if any. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @param {array} [labVirtualMachine.dataDiskParameters] New or existing data + * disks to attach to the virtual machine after creation * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {array} [labVirtualMachine.scheduleParameters] Virtual Machine + * schedules to be created * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {string} [labVirtualMachine.lastKnownPowerState] Last known compute + * power state captured in DTL * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {string} [labVirtualMachine.location] The location of the resource. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @param {object} [labVirtualMachine.tags] The tags of the resource. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * @param {object} [options] Optional Parameters. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @param {function} [optionalCallback] - The optional callback. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * {Promise} A promise is returned * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * @resolve {LabVirtualMachine} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * @reject {Error} - The error object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link LabVirtualMachine} for more information. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); + } + } + + /** + * Delete virtual machine. This operation can take a while to complete. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {string} name The name of the virtual machine. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete virtual machine. This operation can take a while to complete. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @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, labName, 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._beginDeleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. + * + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. + * + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. + * + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. + * + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' + * + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. + * + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * * @param {object} [options] Optional Parameters. * @@ -5943,15 +7165,15 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, labName, name, labVirtualMachine, options) { + beginAddDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, dataDiskProperties, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5962,8 +7184,8 @@ class VirtualMachines { } /** - * Create or replace an existing Virtual machine. This operation can take a - * while to complete. + * Attach a new or existing data disk to virtual machine. This operation can + * take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -5971,271 +7193,325 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} labVirtualMachine A virtual machine. + * @param {object} dataDiskProperties Request body for adding a new or existing + * data disk to a virtual machine. * - * @param {string} [labVirtualMachine.notes] The notes of the virtual machine. + * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies + * options to attach a new disk to the virtual machine. * - * @param {string} [labVirtualMachine.ownerObjectId] The object identifier of - * the owner of the virtual machine. + * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] + * Size of the disk to be attached in GibiBytes. * - * @param {string} [labVirtualMachine.ownerUserPrincipalName] The user - * principal name of the virtual machine owner. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The + * name of the disk to be attached. * - * @param {string} [labVirtualMachine.createdByUserId] The object identifier of - * the creator of the virtual machine. + * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The + * storage type for the disk (i.e. Standard, Premium). Possible values include: + * 'Standard', 'Premium' * - * @param {string} [labVirtualMachine.createdByUser] The email address of - * creator of the virtual machine. + * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the + * existing lab disk id to attach to virtual machine. * - * @param {date} [labVirtualMachine.createdDate] The creation date of the - * virtual machine. + * @param {string} [dataDiskProperties.hostCaching] Caching option for a data + * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' * - * @param {string} [labVirtualMachine.customImageId] The custom image - * identifier of the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.osType] The OS type of the virtual - * machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.size] The size of the virtual machine. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [labVirtualMachine.userName] The user name of the virtual - * machine. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.password] The password of the virtual - * machine administrator. + * {Promise} A promise is returned * - * @param {string} [labVirtualMachine.sshKey] The SSH key of the virtual - * machine administrator. + * @resolve {null} - The deserialized result object. * - * @param {boolean} [labVirtualMachine.isAuthenticationWithSshKey] Indicates - * whether this virtual machine uses an SSH key for authentication. + * @reject {Error} - The error object. * - * @param {string} [labVirtualMachine.fqdn] The fully-qualified domain name of - * the virtual machine. + * {function} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.labSubnetName] The lab subnet name of the - * virtual machine. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.labVirtualNetworkId] The lab virtual - * network identifier of the virtual machine. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {boolean} [labVirtualMachine.disallowPublicIpAddress] Indicates - * whether the virtual machine is to be created without a public IP address. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [labVirtualMachine.artifacts] The artifacts to be installed - * on the virtual machine. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, 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._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback); + } + } + + /** + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * - * @param {object} [labVirtualMachine.artifactDeploymentStatus] The artifact - * deployment status for the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.artifactDeploymentStatus.deploymentStatus] The deployment - * status of the artifact. + * @param {string} labName The name of the lab. * - * @param {number} - * [labVirtualMachine.artifactDeploymentStatus.artifactsApplied] The total - * count of the artifacts that were successfully applied. + * @param {string} name The name of the virtual machine. * - * @param {number} [labVirtualMachine.artifactDeploymentStatus.totalArtifacts] - * The total count of the artifacts that were tentatively applied. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {object} [labVirtualMachine.galleryImageReference] The Microsoft - * Azure Marketplace image reference of the virtual machine. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.galleryImageReference.offer] The offer of - * the gallery image. + * @param {object} [options] Optional Parameters. * - * @param {string} [labVirtualMachine.galleryImageReference.publisher] The - * publisher of the gallery image. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.galleryImageReference.sku] The SKU of the - * gallery image. + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.galleryImageReference.osType] The OS type - * of the gallery image. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.galleryImageReference.version] The - * version of the gallery image. + * @reject {Error} - The error object. + */ + beginApplyArtifactsWithHttpOperationResponse(resourceGroupName, labName, name, applyArtifactsRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Apply artifacts to virtual machine. This operation can take a while to + * complete. * - * @param {object} [labVirtualMachine.computeVm] The compute virtual machine - * properties. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [labVirtualMachine.computeVm.statuses] Gets the statuses of - * the virtual machine. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.computeVm.osType] Gets the OS type of the - * virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.computeVm.vmSize] Gets the size of the - * virtual machine. + * @param {object} applyArtifactsRequest Request body for applying artifacts to + * a virtual machine. * - * @param {string} [labVirtualMachine.computeVm.networkInterfaceId] Gets the - * network interface ID of the virtual machine. + * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to + * apply. * - * @param {string} [labVirtualMachine.computeVm.osDiskId] Gets OS disk blob uri - * for the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {array} [labVirtualMachine.computeVm.dataDiskIds] Gets data disks - * blob uri for the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [labVirtualMachine.computeVm.dataDisks] Gets all data disks - * attached to the virtual machine. + * @param {function} [optionalCallback] - The optional callback. * - * @param {object} [labVirtualMachine.networkInterface] The network interface - * properties. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [labVirtualMachine.networkInterface.virtualNetworkId] The - * resource ID of the virtual network. + * {Promise} A promise is returned * - * @param {string} [labVirtualMachine.networkInterface.subnetId] The resource - * ID of the sub net. + * @resolve {null} - The deserialized result object. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddressId] The - * resource ID of the public IP address. + * @reject {Error} - The error object. * - * @param {string} [labVirtualMachine.networkInterface.publicIpAddress] The - * public IP address. + * {function} optionalCallback(err, result, request, response) * - * @param {string} [labVirtualMachine.networkInterface.privateIpAddress] The - * private IP address. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [labVirtualMachine.networkInterface.dnsName] The DNS name. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [labVirtualMachine.networkInterface.rdpAuthority] The - * RdpAuthority property is a server DNS host name or IP address followed by - * the service port number for RDP (Remote Desktop Protocol). + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [labVirtualMachine.networkInterface.sshAuthority] The - * SshAuthority property is a server DNS host name or IP address followed by - * the service port number for SSH. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, 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._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback); + } + } + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. * - * @param {object} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration] The - * configuration for sharing a public IP address across multiple virtual - * machines. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} - * [labVirtualMachine.networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] - * The incoming NAT rules + * @param {string} labName The name of the lab. * - * @param {object} [labVirtualMachine.applicableSchedule] The applicable - * schedule for the virtual machine. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsShutdown] The - * auto-shutdown schedule, if one has been set at the lab or lab resource - * level. + * @param {object} [options] Optional Parameters. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup] The - * auto-startup schedule, if one has been set at the lab or lab resource level. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [labVirtualMachine.applicableSchedule.labVmsStartup.status] - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled' + * @returns {Promise} A promise is returned * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.taskType] The task type - * of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence] If the - * schedule will occur only some days of the week, specify the weekly - * recurrence. + * @reject {Error} - The error object. + */ + beginClaimWithHttpOperationResponse(resourceGroupName, labName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Take ownership of an existing virtual machine This operation can take a + * while to complete. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} labName The name of the lab. + * + * @param {string} name The name of the virtual machine. * - * @param {array} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). + * @param {object} [options] Optional Parameters. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.weeklyRecurrence.time] - * The time of the day the schedule will occur. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence] If the - * schedule will occur once each day of the week, specify the daily recurrence. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.dailyRecurrence.time] - * The time of day the schedule will occur. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence] If the - * schedule will occur multiple times a day, specify the hourly recurrence. + * {Promise} A promise is returned * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.hourlyRecurrence.minute] - * Minutes of the hour the schedule will run. + * @resolve {null} - The deserialized result object. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.timeZoneId] The time - * zone ID (e.g. Pacific Standard time). + * @reject {Error} - The error object. * - * @param {object} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings] - * Notification settings. + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.status] - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled' + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] - * Time in minutes before event at which notification will be sent. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] - * The webhook URL to which the notification will be sent. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.targetResourceId] The - * resource ID to which the schedule belongs + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginClaim(resourceGroupName, labName, 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._beginClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginClaim(resourceGroupName, labName, name, options, optionalCallback); + } + } + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.provisioningState] The - * provisioning status of the resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.uniqueIdentifier] The - * unique immutable identifier of a resource (Guid). + * @param {string} labName The name of the lab. * - * @param {string} - * [labVirtualMachine.applicableSchedule.labVmsStartup.location] The location - * of the resource. + * @param {string} name The name of the virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.labVmsStartup.tags] - * The tags of the resource. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {string} [labVirtualMachine.applicableSchedule.location] The location - * of the resource. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * - * @param {object} [labVirtualMachine.applicableSchedule.tags] The tags of the - * resource. + * @param {object} [options] Optional Parameters. * - * @param {date} [labVirtualMachine.expirationDate] The expiration date for VM. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [labVirtualMachine.allowClaim] Indicates whether another - * user can take ownership of the virtual machine + * @returns {Promise} A promise is returned * - * @param {string} [labVirtualMachine.storageType] Storage type to use for - * virtual machine (i.e. Standard, Premium). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [labVirtualMachine.virtualMachineCreationSource] Tells - * source of creation of lab virtual machine. Output property only. Possible - * values include: 'FromCustomImage', 'FromGalleryImage' + * @reject {Error} - The error object. + */ + beginDetachDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, detachDataDiskProperties, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Detach the specified disk from the virtual machine. This operation can take + * a while to complete. * - * @param {string} [labVirtualMachine.environmentId] The resource ID of the - * environment that contains this virtual machine, if any. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [labVirtualMachine.provisioningState] The provisioning - * status of the resource. + * @param {string} labName The name of the lab. * - * @param {string} [labVirtualMachine.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). + * @param {string} name The name of the virtual machine. * - * @param {string} [labVirtualMachine.location] The location of the resource. + * @param {object} detachDataDiskProperties Request body for detaching data + * disk from a virtual machine. * - * @param {object} [labVirtualMachine.tags] The tags of the resource. + * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the + * disk resource ID to detach from virtual machine. * * @param {object} [options] Optional Parameters. * @@ -6249,7 +7525,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {LabVirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6257,14 +7533,13 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link LabVirtualMachine} 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. */ - beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback) { + beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6273,19 +7548,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, (err, result, request, response) => { + self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, labName, name, labVirtualMachine, options, optionalCallback); + return self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback); } } /** - * Delete virtual machine. This operation can take a while to complete. + * Redeploy a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6304,11 +7579,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, labName, name, options) { + beginRedeployWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginRedeploy(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6319,7 +7594,7 @@ class VirtualMachines { } /** - * Delete virtual machine. This operation can take a while to complete. + * Redeploy a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6353,7 +7628,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, labName, name, options, optionalCallback) { + beginRedeploy(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6362,20 +7637,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginRedeploy(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, labName, name, options, optionalCallback); + return self._beginRedeploy(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6383,28 +7657,11 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -6417,11 +7674,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginAddDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, dataDiskProperties, options) { + beginResizeWithHttpOperationResponse(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { + self._beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6432,8 +7689,7 @@ class VirtualMachines { } /** - * Attach a new or existing data disk to virtual machine. This operation can - * take a while to complete. + * Resize Virtual Machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6441,28 +7697,11 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} dataDiskProperties Request body for adding a new or existing - * data disk to a virtual machine. - * - * @param {object} [dataDiskProperties.attachNewDataDiskOptions] Specifies - * options to attach a new disk to the virtual machine. - * - * @param {number} [dataDiskProperties.attachNewDataDiskOptions.diskSizeGiB] - * Size of the disk to be attached in GibiBytes. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskName] The - * name of the disk to be attached. - * - * @param {string} [dataDiskProperties.attachNewDataDiskOptions.diskType] The - * storage type for the disk (i.e. Standard, Premium). Possible values include: - * 'Standard', 'Premium' - * - * @param {string} [dataDiskProperties.existingLabDiskId] Specifies the - * existing lab disk id to attach to virtual machine. + * @param {object} resizeLabVirtualMachineProperties Request body for resizing + * a virtual machine. * - * @param {string} [dataDiskProperties.hostCaching] Caching option for a data - * disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'None', - * 'ReadOnly', 'ReadWrite' + * @param {string} [resizeLabVirtualMachineProperties.size] Specifies the size + * of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -6490,7 +7729,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback) { + beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6499,20 +7738,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, (err, result, request, response) => { + self._beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginAddDataDisk(resourceGroupName, labName, name, dataDiskProperties, options, optionalCallback); + return self._beginResize(resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options, optionalCallback); } } /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6520,12 +7758,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6537,11 +7769,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginApplyArtifactsWithHttpOperationResponse(resourceGroupName, labName, name, applyArtifactsRequest, options) { + beginRestartWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + self._beginRestart(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6552,8 +7784,7 @@ class VirtualMachines { } /** - * Apply artifacts to virtual machine. This operation can take a while to - * complete. + * Restart a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6561,12 +7792,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} applyArtifactsRequest Request body for applying artifacts to - * a virtual machine. - * - * @param {array} [applyArtifactsRequest.artifacts] The list of artifacts to - * apply. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6593,7 +7818,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback) { + beginRestart(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6602,20 +7827,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, (err, result, request, response) => { + self._beginRestart(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginApplyArtifacts(resourceGroupName, labName, name, applyArtifactsRequest, options, optionalCallback); + return self._beginRestart(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6634,11 +7858,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginClaimWithHttpOperationResponse(resourceGroupName, labName, name, options) { + beginStartWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginStart(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6649,8 +7873,7 @@ class VirtualMachines { } /** - * Take ownership of an existing virtual machine This operation can take a - * while to complete. + * Start a virtual machine. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6684,7 +7907,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginClaim(resourceGroupName, labName, name, options, optionalCallback) { + beginStart(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6693,20 +7916,19 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginStart(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginClaim(resourceGroupName, labName, name, options, optionalCallback); + return self._beginStart(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6714,12 +7936,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6731,11 +7947,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginDetachDataDiskWithHttpOperationResponse(resourceGroupName, labName, name, detachDataDiskProperties, options) { + beginStopWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + self._beginStop(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6746,8 +7962,7 @@ class VirtualMachines { } /** - * Detach the specified disk from the virtual machine. This operation can take - * a while to complete. + * Stop a virtual machine This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6755,12 +7970,6 @@ class VirtualMachines { * * @param {string} name The name of the virtual machine. * - * @param {object} detachDataDiskProperties Request body for detaching data - * disk from a virtual machine. - * - * @param {string} [detachDataDiskProperties.existingLabDiskId] Specifies the - * disk resource ID to detach from virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6787,7 +7996,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback) { + beginStop(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6796,19 +8005,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, (err, result, request, response) => { + self._beginStop(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDetachDataDisk(resourceGroupName, labName, name, detachDataDiskProperties, options, optionalCallback); + return self._beginStop(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Start a virtual machine. This operation can take a while to complete. + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6827,11 +8037,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName, labName, name, options) { + beginTransferDisksWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginStart(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginTransferDisks(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6842,7 +8052,8 @@ class VirtualMachines { } /** - * Start a virtual machine. This operation can take a while to complete. + * Transfers all data disks attached to the virtual machine to be owned by the + * current user. This operation can take a while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6876,7 +8087,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName, labName, name, options, optionalCallback) { + beginTransferDisks(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6885,19 +8096,20 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginStart(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginTransferDisks(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginStart(resourceGroupName, labName, name, options, optionalCallback); + return self._beginTransferDisks(resourceGroupName, labName, name, options, optionalCallback); } } /** - * Stop a virtual machine This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6916,11 +8128,11 @@ class VirtualMachines { * * @reject {Error} - The error object. */ - beginStopWithHttpOperationResponse(resourceGroupName, labName, name, options) { + beginUnClaimWithHttpOperationResponse(resourceGroupName, labName, name, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginStop(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginUnClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6931,7 +8143,8 @@ class VirtualMachines { } /** - * Stop a virtual machine This operation can take a while to complete. + * Release ownership of an existing virtual machine This operation can take a + * while to complete. * * @param {string} resourceGroupName The name of the resource group. * @@ -6965,7 +8178,7 @@ class VirtualMachines { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginStop(resourceGroupName, labName, name, options, optionalCallback) { + beginUnClaim(resourceGroupName, labName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6974,14 +8187,14 @@ class VirtualMachines { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginStop(resourceGroupName, labName, name, options, (err, result, request, response) => { + self._beginUnClaim(resourceGroupName, labName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginStop(resourceGroupName, labName, name, options, optionalCallback); + return self._beginUnClaim(resourceGroupName, labName, name, options, optionalCallback); } } @@ -6998,7 +8211,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7034,7 +8247,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationLabVirtualMachine} - The deserialized result object. + * @resolve {LabVirtualMachineList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7043,8 +8256,7 @@ class VirtualMachines { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationLabVirtualMachine} - * for more information. + * See {@link LabVirtualMachineList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/lib/operations/virtualNetworks.js b/lib/services/devTestLabs/lib/operations/virtualNetworks.js index 9fb0e65cb8..22d984d8b0 100644 --- a/lib/services/devTestLabs/lib/operations/virtualNetworks.js +++ b/lib/services/devTestLabs/lib/operations/virtualNetworks.js @@ -27,12 +27,13 @@ const WebResource = msRest.WebResource; * 'properties($expand=externalSubnets)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,8 +45,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationVirtualNetwork} for - * more information. + * See {@link VirtualNetworkList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -184,7 +184,7 @@ function _list(resourceGroupName, labName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationVirtualNetwork']().mapper(); + let resultMapper = new client.models['VirtualNetworkList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -382,18 +382,9 @@ function _get(resourceGroupName, labName, name, options, callback) { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -553,20 +544,9 @@ function _deleteMethod(resourceGroupName, labName, name, options, callback) { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [virtualNetwork.location] The location of the resource. - * * @param {object} [virtualNetwork.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -749,18 +729,9 @@ function _update(resourceGroupName, labName, name, virtualNetwork, options, call * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -1041,7 +1012,7 @@ function _beginDeleteMethod(resourceGroupName, labName, name, options, callback) return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1092,8 +1063,7 @@ function _beginDeleteMethod(resourceGroupName, labName, 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 ResponseWithContinuationVirtualNetwork} for - * more information. + * See {@link VirtualNetworkList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1187,7 +1157,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResponseWithContinuationVirtualNetwork']().mapper(); + let resultMapper = new client.models['VirtualNetworkList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1233,19 +1203,20 @@ class VirtualNetworks { * 'properties($expand=externalSubnets)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @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} - The error object. */ @@ -1276,12 +1247,13 @@ class VirtualNetworks { * 'properties($expand=externalSubnets)' * * @param {string} [options.filter] The filter to apply to the operation. + * Example: '$filter=contains(name,'myName') * * @param {number} [options.top] The maximum number of resources to return from - * the operation. + * the operation. Example: '$top=10' * * @param {string} [options.orderby] The ordering expression for the results, - * using OData notation. + * using OData notation. Example: '$orderby=name desc' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1293,7 +1265,7 @@ class VirtualNetworks { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationVirtualNetwork} - The deserialized result object. + * @resolve {VirtualNetworkList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1302,8 +1274,7 @@ class VirtualNetworks { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationVirtualNetwork} for - * more information. + * See {@link VirtualNetworkList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1446,18 +1417,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -1508,18 +1470,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -1680,20 +1633,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [virtualNetwork.location] The location of the resource. - * * @param {object} [virtualNetwork.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1741,20 +1683,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * - * @param {string} [virtualNetwork.location] The location of the resource. - * * @param {object} [virtualNetwork.tags] The tags of the resource. * * @param {object} [options] Optional Parameters. @@ -1825,18 +1756,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -1887,18 +1809,9 @@ class VirtualNetworks { * @param {string} [virtualNetwork.externalProviderResourceId] The * Microsoft.Network resource identifier of the virtual network. * - * @param {array} [virtualNetwork.externalSubnets] The external subnet - * properties. - * * @param {array} [virtualNetwork.subnetOverrides] The subnet overrides of the * virtual network. * - * @param {string} [virtualNetwork.provisioningState] The provisioning status - * of the resource. - * - * @param {string} [virtualNetwork.uniqueIdentifier] The unique immutable - * identifier of a resource (Guid). - * * @param {string} [virtualNetwork.location] The location of the resource. * * @param {object} [virtualNetwork.tags] The tags of the resource. @@ -2052,7 +1965,7 @@ class VirtualNetworks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2088,7 +2001,7 @@ class VirtualNetworks { * * {Promise} A promise is returned * - * @resolve {ResponseWithContinuationVirtualNetwork} - The deserialized result object. + * @resolve {VirtualNetworkList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2097,8 +2010,7 @@ class VirtualNetworks { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResponseWithContinuationVirtualNetwork} for - * more information. + * See {@link VirtualNetworkList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/devTestLabs/package.json b/lib/services/devTestLabs/package.json index cd1c3d1ab0..f3c267785a 100644 --- a/lib/services/devTestLabs/package.json +++ b/lib/services/devTestLabs/package.json @@ -2,21 +2,24 @@ "name": "azure-arm-devtestlabs", "author": "Microsoft Corporation", "description": "DevTestLabsClient Library with typescript type definitions for node", - "version": "2.1.1", + "version": "3.0.0", "dependencies": { - "ms-rest": "^2.3.2", + "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" }, - "keywords": [ "node", "azure" ], + "keywords": [ + "node", + "azure" + ], "license": "MIT", "main": "./lib/devTestLabsClient.js", "types": "./lib/devTestLabsClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/devTestLabs", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } } diff --git a/test/recordings/devTestLabs-tests/DevTestLabs_Get_Lab_should_get_integration_lab_successfully.nock.js b/test/recordings/devTestLabs-tests/DevTestLabs_Get_Lab_should_get_integration_lab_successfully.nock.js index c4b9dccc46..8908b0ec91 100644 --- a/test/recordings/devTestLabs-tests/DevTestLabs_Get_Lab_should_get_integration_lab_successfully.nock.js +++ b/test/recordings/devTestLabs-tests/DevTestLabs_Get_Lab_should_get_integration_lab_successfully.nock.js @@ -7,14 +7,14 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2016-05-15') + .get('/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2018-09-15') .reply(200, "{\"properties\":{\"defaultStorageAccount\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.Storage/storageAccounts/msdtlvm1114508600\",\"artifactsStorageAccount\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.Storage/storageAccounts/msdtlvm1287512904\",\"vaultName\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.KeyVault/vaults/msdtl2063424927\",\"labStorageType\":\"Standard\",\"createdDate\":\"2016-05-04T23:05:53.560711+00:00\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourcegroups/keepintegrationtestresources/providers/microsoft.devtestlab/labs/labforintegration\",\"name\":\"LabForIntegration\",\"type\":\"Microsoft.DevTestLab/labs\",\"location\":\"Southeast Asia\",\"tags\":{\"CreatedOn\":\"5/4/2016 11:05:50 PM +00:00\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '955', 'content-type': 'application/json; charset=utf-8', expires: '-1', vary: 'Accept-Encoding', - 'x-rp-requesturi': 'https://dtl-dev-rp.azurewebsites.net/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2016-05-15', + 'x-rp-requesturi': 'https://dtl-dev-rp.azurewebsites.net/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2018-09-15', 'x-dtl-processedby': 'dtl-dev-rp.azurewebsites.net', 'set-cookie': [ 'ARRAffinity=aa7a076a03f0cc68ff10821062cd9951acb337c68ed7becf8367b21e1910d41c;Path=/;Domain=dev.rp1.vsdth.visualstudio.com', @@ -33,14 +33,14 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2016-05-15') + .get('/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2018-09-15') .reply(200, "{\"properties\":{\"defaultStorageAccount\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.Storage/storageAccounts/msdtlvm1114508600\",\"artifactsStorageAccount\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.Storage/storageAccounts/msdtlvm1287512904\",\"vaultName\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/keepintegrationtestresources/providers/Microsoft.KeyVault/vaults/msdtl2063424927\",\"labStorageType\":\"Standard\",\"createdDate\":\"2016-05-04T23:05:53.560711+00:00\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourcegroups/keepintegrationtestresources/providers/microsoft.devtestlab/labs/labforintegration\",\"name\":\"LabForIntegration\",\"type\":\"Microsoft.DevTestLab/labs\",\"location\":\"Southeast Asia\",\"tags\":{\"CreatedOn\":\"5/4/2016 11:05:50 PM +00:00\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '955', 'content-type': 'application/json; charset=utf-8', expires: '-1', vary: 'Accept-Encoding', - 'x-rp-requesturi': 'https://dtl-dev-rp.azurewebsites.net/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2016-05-15', + 'x-rp-requesturi': 'https://dtl-dev-rp.azurewebsites.net/subscriptions/33855c90-c8cf-44a0-a266-9b548fb8e7b0/resourceGroups/KeepIntegrationTestResources/providers/Microsoft.DevTestLab/labs/LabForIntegration?api-version=2018-09-15', 'x-dtl-processedby': 'dtl-dev-rp.azurewebsites.net', 'set-cookie': [ 'ARRAffinity=aa7a076a03f0cc68ff10821062cd9951acb337c68ed7becf8367b21e1910d41c;Path=/;Domain=dev.rp1.vsdth.visualstudio.com',