diff --git a/sdk/labservices/arm-labservices/LICENSE.txt b/sdk/labservices/arm-labservices/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/labservices/arm-labservices/LICENSE.txt +++ b/sdk/labservices/arm-labservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 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 diff --git a/sdk/labservices/arm-labservices/README.md b/sdk/labservices/arm-labservices/README.md index f6d820422be6..7161cbd2e079 100644 --- a/sdk/labservices/arm-labservices/README.md +++ b/sdk/labservices/arm-labservices/README.md @@ -1,11 +1,11 @@ -## Azure ManagedLabsClient SDK for JavaScript +## Azure LabServicesClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedLabsClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for LabServicesClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-labservices @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,22 +36,20 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and list providerOperations as an example written in JavaScript. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { ManagedLabsClient } = require("@azure/arm-labservices"); +const { LabServicesClient } = require("@azure/arm-labservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new ManagedLabsClient(creds, subscriptionId); - -client.providerOperations.list().then((result) => { +const client = new LabServicesClient(creds, subscriptionId); +client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +58,7 @@ client.providerOperations.list().then((result) => { }); ``` -#### browser - Authentication, client creation, and list providerOperations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,10 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); - const client = new Azure.ArmLabservices.ManagedLabsClient(creds, subscriptionId); - client.providerOperations.list().then((result) => { + const client = new Azure.ArmLabservices.LabServicesClient(creds, subscriptionId); + client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/labservices/arm-labservices/package.json b/sdk/labservices/arm-labservices/package.json index 8f32015b19a5..a4d2bcfb52e2 100644 --- a/sdk/labservices/arm-labservices/package.json +++ b/sdk/labservices/arm-labservices/package.json @@ -1,13 +1,13 @@ { "name": "@azure/arm-labservices", "author": "Microsoft Corporation", - "description": "ManagedLabsClient Library with typescript type definitions for node.js and browser.", + "description": "LabServicesClient Library with typescript type definitions for node.js and browser.", "version": "1.1.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -18,22 +18,22 @@ ], "license": "MIT", "main": "./dist/arm-labservices.js", - "module": "./esm/managedLabsClient.js", - "types": "./esm/managedLabsClient.d.ts", + "module": "./esm/labServicesClient.js", + "types": "./esm/labServicesClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/feature/v4/sdk/labservices/arm-labservices", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/labservices/arm-labservices", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/labservices/arm-labservices/rollup.config.js b/sdk/labservices/arm-labservices/rollup.config.js index 33758796e69a..4dd8ba5dd77b 100644 --- a/sdk/labservices/arm-labservices/rollup.config.js +++ b/sdk/labservices/arm-labservices/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/managedLabsClient.js", + input: "./esm/labServicesClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js" @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/labservices/arm-labservices/src/managedLabsClient.ts b/sdk/labservices/arm-labservices/src/labServicesClient.ts similarity index 52% rename from sdk/labservices/arm-labservices/src/managedLabsClient.ts rename to sdk/labservices/arm-labservices/src/labServicesClient.ts index be1b5e2c2ca6..368cb460337d 100644 --- a/sdk/labservices/arm-labservices/src/managedLabsClient.ts +++ b/sdk/labservices/arm-labservices/src/labServicesClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,52 +12,50 @@ import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; -import { ManagedLabsClientContext } from "./managedLabsClientContext"; +import { LabServicesClientContext } from "./labServicesClientContext"; -class ManagedLabsClient extends ManagedLabsClientContext { +class LabServicesClient extends LabServicesClientContext { // Operation groups - providerOperations: operations.ProviderOperations; - globalUsers: operations.GlobalUsers; - labAccounts: operations.LabAccounts; operations: operations.Operations; - galleryImages: operations.GalleryImages; + operationResults: operations.OperationResults; + labPlans: operations.LabPlans; + images: operations.Images; labs: operations.Labs; - environmentSettings: operations.EnvironmentSettings; - environments: operations.Environments; users: operations.Users; + virtualMachines: operations.VirtualMachines; + schedules: operations.Schedules; /** - * Initializes a new instance of the ManagedLabsClient class. + * Initializes a new instance of the LabServicesClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LabServicesClientOptions) { super(credentials, subscriptionId, options); - this.providerOperations = new operations.ProviderOperations(this); - this.globalUsers = new operations.GlobalUsers(this); - this.labAccounts = new operations.LabAccounts(this); this.operations = new operations.Operations(this); - this.galleryImages = new operations.GalleryImages(this); + this.operationResults = new operations.OperationResults(this); + this.labPlans = new operations.LabPlans(this); + this.images = new operations.Images(this); this.labs = new operations.Labs(this); - this.environmentSettings = new operations.EnvironmentSettings(this); - this.environments = new operations.Environments(this); this.users = new operations.Users(this); + this.virtualMachines = new operations.VirtualMachines(this); + this.schedules = new operations.Schedules(this); } } // Operation Specifications export { - ManagedLabsClient, - ManagedLabsClientContext, - Models as ManagedLabsModels, - Mappers as ManagedLabsMappers + LabServicesClient, + LabServicesClientContext, + Models as LabServicesModels, + Mappers as LabServicesMappers }; export * from "./operations"; diff --git a/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts b/sdk/labservices/arm-labservices/src/labServicesClientContext.ts similarity index 83% rename from sdk/labservices/arm-labservices/src/managedLabsClientContext.ts rename to sdk/labservices/arm-labservices/src/labServicesClientContext.ts index afccfb3d607e..f6ef655f24e8 100644 --- a/sdk/labservices/arm-labservices/src/managedLabsClientContext.ts +++ b/sdk/labservices/arm-labservices/src/labServicesClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,29 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-labservices"; const packageVersion = "1.1.1"; -export class ManagedLabsClientContext extends msRestAzure.AzureServiceClient { +export class LabServicesClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** - * Initializes a new instance of the ManagedLabsClient class. + * Initializes a new instance of the LabServicesClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LabServicesClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -50,7 +49,7 @@ export class ManagedLabsClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-10-15'; + this.apiVersion = '2021-10-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/labservices/arm-labservices/src/models/environmentSettingsMappers.ts b/sdk/labservices/arm-labservices/src/models/environmentSettingsMappers.ts deleted file mode 100644 index 31b5158a2a0f..000000000000 --- a/sdk/labservices/arm-labservices/src/models/environmentSettingsMappers.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -export { - BaseResource, - CloudError, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, - Lab, - LabAccount, - LabAccountFragment, - LabFragment, - LatestOperationResult, - NetworkInterface, - PublishPayload, - ReferenceVm, - ReferenceVmFragment, - Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationEnvironmentSetting, - SizeConfigurationProperties, - SizeInfo, - User, - UserFragment, - VmStateDetails -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/environmentsMappers.ts b/sdk/labservices/arm-labservices/src/models/environmentsMappers.ts deleted file mode 100644 index e0c43ba75e80..000000000000 --- a/sdk/labservices/arm-labservices/src/models/environmentsMappers.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -export { - BaseResource, - CloudError, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, - Lab, - LabAccount, - LabAccountFragment, - LabFragment, - LatestOperationResult, - NetworkInterface, - ReferenceVm, - ReferenceVmFragment, - ResetPasswordPayload, - Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationEnvironment, - SizeConfigurationProperties, - SizeInfo, - User, - UserFragment, - VmStateDetails -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/galleryImagesMappers.ts b/sdk/labservices/arm-labservices/src/models/galleryImagesMappers.ts deleted file mode 100644 index 111fe6ae3134..000000000000 --- a/sdk/labservices/arm-labservices/src/models/galleryImagesMappers.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -export { - BaseResource, - CloudError, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, - Lab, - LabAccount, - LabAccountFragment, - LabFragment, - LatestOperationResult, - NetworkInterface, - ReferenceVm, - ReferenceVmFragment, - Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationGalleryImage, - SizeConfigurationProperties, - SizeInfo, - User, - UserFragment, - VmStateDetails -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/globalUsersMappers.ts b/sdk/labservices/arm-labservices/src/models/globalUsersMappers.ts deleted file mode 100644 index b7cfc29c9540..000000000000 --- a/sdk/labservices/arm-labservices/src/models/globalUsersMappers.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -export { - CloudError, - EnvironmentDetails, - EnvironmentOperationsPayload, - GetEnvironmentResponse, - GetPersonalPreferencesResponse, - LabDetails, - LatestOperationResult, - ListEnvironmentsPayload, - ListEnvironmentsResponse, - ListLabsResponse, - OperationBatchStatusPayload, - OperationBatchStatusResponse, - OperationBatchStatusResponseItem, - OperationStatusPayload, - OperationStatusResponse, - PersonalPreferencesOperationsPayload, - RegisterPayload, - ResetPasswordPayload, - VirtualMachineDetails -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/imagesMappers.ts b/sdk/labservices/arm-labservices/src/models/imagesMappers.ts new file mode 100644 index 000000000000..4c78edfa727e --- /dev/null +++ b/sdk/labservices/arm-labservices/src/models/imagesMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AutoShutdownProfile, + AzureEntityResource, + BaseResource, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, + ImageUpdate, + Lab, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + PagedImages, + Plan, + ProxyResource, + RecurrencePattern, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + Schedule, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, + User, + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile +} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/index.ts b/sdk/labservices/arm-labservices/src/models/index.ts index 14e20a4d1bbf..908d2b76f484 100644 --- a/sdk/labservices/arm-labservices/src/models/index.ts +++ b/sdk/labservices/arm-labservices/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,1573 +12,1386 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Payload for Add Users operation on a Lab. + * Base tracked resource type for all PATCH updates. */ -export interface AddUsersPayload { +export interface TrackedResourceUpdate { /** - * List of user emails addresses to add to the lab. + * Resource tags. */ - emailAddresses: string[]; + tags?: string[]; } /** - * Creation parameters for Reference Vm + * Profile for how to handle shutting down virtual machines. */ -export interface ReferenceVmCreationParameters { +export interface AutoShutdownProfile { /** - * The username of the virtual machine + * Whether shutdown on disconnect is enabled. Possible values include: 'Enabled', 'Disabled' */ - userName: string; + shutdownOnDisconnect?: EnableState; /** - * The password of the virtual machine. + * Whether a VM will get shutdown when it hasn't been connected to after a period of time. + * Possible values include: 'Enabled', 'Disabled' */ - password: string; -} - -/** - * Represents resource specific settings - */ -export interface ResourceSettingCreationParameters { - /** - * The location where the virtual machine will live - */ - location?: string; + shutdownWhenNotConnected?: EnableState; /** - * The name of the resource setting + * Whether a VM will get shutdown when it has idled for a period of time. Possible values + * include: 'None', 'UserAbsence', 'LowUsage' */ - name?: string; + shutdownOnIdle?: ShutdownOnIdleMode; /** - * The resource id of the gallery image used for creating the virtual machine + * The amount of time a VM will stay running after a user disconnects if this behavior is + * enabled. */ - galleryImageResourceId: string; + disconnectDelay?: string; /** - * The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance' + * The amount of time a VM will stay running before it is shutdown if no connection is made and + * this behavior is enabled. */ - size?: ManagedLabVmSize; + noConnectDelay?: string; /** - * Creation parameters for Reference Vm + * The amount of time a VM will idle before it is shutdown if this behavior is enabled. */ - referenceVmCreationParameters: ReferenceVmCreationParameters; + idleDelay?: string; } /** - * Settings related to creating an environment setting + * Connection profile for how users connect to lab virtual machines. */ -export interface EnvironmentSettingCreationParameters { +export interface ConnectionProfile { + /** + * The enabled access level for Web Access over SSH. Possible values include: 'Public', + * 'Private', 'None' + */ + webSshAccess?: ConnectionType; + /** + * The enabled access level for Web Access over RDP. Possible values include: 'Public', + * 'Private', 'None' + */ + webRdpAccess?: ConnectionType; + /** + * The enabled access level for Client Access over SSH. Possible values include: 'Public', + * 'Private', 'None' + */ + clientSshAccess?: ConnectionType; /** - * The resource specific settings + * The enabled access level for Client Access over RDP. Possible values include: 'Public', + * 'Private', 'None' */ - resourceSettingCreationParameters: ResourceSettingCreationParameters; + clientRdpAccess?: ConnectionType; } /** - * Settings related to creating a lab + * The resource management error additional info. */ -export interface LabCreationParameters { +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; /** - * Maximum number of users allowed in the lab. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - maxUsersInLab?: number; + readonly info?: any; } /** - * Properties for creating a managed lab and a default environment setting + * The error detail. */ -export interface CreateLabProperties { +export interface ErrorDetail { /** - * Settings related to creating an environment setting + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - environmentSettingCreationParameters?: EnvironmentSettingCreationParameters; + readonly code?: string; /** - * Settings related to creating a lab + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - labCreationParameters: LabCreationParameters; + readonly message?: string; /** - * The name of the resource + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name: string; + readonly target?: string; /** - * The location of the resource + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - location?: string; + readonly details?: ErrorDetail[]; /** - * The tags of the resource. + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: { [propertyName: string]: string }; + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * Represents a VM and the setting Id it was created for. + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response */ -export interface ResourceSet { +export interface ErrorResponse { /** - * VM resource Id for the environment + * The error object. */ - vmResourceId?: string; - /** - * resourceSettingId for the environment - */ - resourceSettingId?: string; + error?: ErrorDetail; } /** - * Network details of the environment + * Localized display information for this particular operation. */ -export interface NetworkInterface { +export interface OperationDisplay { /** - * PrivateIp address of the Compute VM + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly privateIpAddress?: string; + readonly provider?: string; /** - * Connection information for Linux + * The localized friendly name of the resource type related to this operation. E.g. "Virtual + * Machines" or "Job Schedule Collections". * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sshAuthority?: string; + readonly resource?: string; /** - * Connection information for Windows + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create + * or Update Virtual Machine", "Restart Virtual Machine". * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly rdpAuthority?: string; + readonly operation?: string; /** - * Username of the VM + * The short, localized friendly description of the operation; suitable for tool tips and + * detailed views. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly username?: string; + readonly description?: string; } /** - * Details of the status of an operation. + * Details of a REST API operation, returned from the Resource Provider Operations API + * @summary REST API Operation */ -export interface LatestOperationResult { +export interface Operation { /** - * The current status of the operation. + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: string; - /** - * Error code on failure. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorCode?: string; + readonly name?: string; /** - * The error message. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and + * "false" for ARM/control-plane operations. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly errorMessage?: string; + readonly isDataAction?: boolean; /** - * Request URI of the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Localized display information for this particular operation. */ - readonly requestUri?: string; + display?: OperationDisplay; /** - * The HttpMethod - PUT/POST/DELETE for the operation. + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + * logs UX. Default value is "user,system". Possible values include: 'user', 'system', + * 'user,system' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly httpMethod?: string; + readonly origin?: Origin; /** - * The URL to use to check long-running operation status + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Possible values include: 'Internal' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operationUrl?: string; + readonly actionType?: ActionType; } /** - * An Azure resource. + * A long running operation result */ -export interface Resource extends BaseResource { +export interface OperationResult { /** - * The identifier of the resource. + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The name of the resource. + * The name of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The operation status. Possible values include: 'NotStarted', 'InProgress', 'Succeeded', + * 'Failed', 'Canceled' */ - readonly type?: string; + status: OperationStatus; /** - * The location of the resource. + * Start time */ - location?: string; + startTime?: Date; /** - * The tags of the resource. + * End time */ - tags?: { [propertyName: string]: string }; -} - -/** - * Represents an environment instance - */ -export interface Environment extends Resource { - /** - * The set of a VM and the setting id it was created for - */ - resourceSets?: ResourceSet; - /** - * The AAD object Id of the user who has claimed the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly claimedByUserObjectId?: string; - /** - * The user principal Id of the user who has claimed the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly claimedByUserPrincipalId?: string; + endTime?: Date; /** - * The name or email address of the user who has claimed the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Percent completion */ - readonly claimedByUserName?: string; + percentComplete?: number; /** - * Is the environment claimed or not - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error for a failure if the operation failed. */ - readonly isClaimed?: boolean; + error?: ErrorDetail; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { /** - * Last known power state of the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The identity that created the resource. */ - readonly lastKnownPowerState?: string; + createdBy?: string; /** - * Network details of the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - readonly networkInterface?: NetworkInterface; + createdByType?: CreatedByType; /** - * How long the environment has been used by a lab user - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The timestamp of resource creation (UTC). */ - readonly totalUsage?: string; + createdAt?: Date; /** - * When the password was last reset on the environment. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The identity that last modified the resource. */ - readonly passwordLastReset?: Date; + lastModifiedBy?: string; /** - * The provisioning status of the resource. + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - provisioningState?: string; + lastModifiedByType?: CreatedByType; /** - * The unique immutable identifier of a resource (Guid). + * The timestamp of resource last modification (UTC) */ - uniqueIdentifier?: string; - /** - * The details of the latest operation. ex: status, error - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly latestOperationResult?: LatestOperationResult; + lastModifiedAt?: Date; } /** - * Details of the backing virtual machine. + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ -export interface VirtualMachineDetails { - /** - * Provisioning state of the Dtl VM - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; +export interface Resource extends BaseResource { /** - * Connection information for Windows + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly rdpAuthority?: string; + readonly id?: string; /** - * Connection information for Linux + * The name of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sshAuthority?: string; + readonly name?: string; /** - * PrivateIp address of the compute VM + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly privateIpAddress?: string; + readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { /** - * Compute VM login user name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource tags. */ - readonly userName?: string; + tags?: { [propertyName: string]: string }; /** - * Last known compute power state captured in DTL - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The geo-location where the resource lives */ - readonly lastKnownPowerState?: string; + location: string; } /** - * This represents the details about a User's environment and its state. + * Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they + * can provide a set of default configurations that will apply at the time of creating a lab, but + * these defaults can still be overwritten. */ -export interface EnvironmentDetails { +export interface LabPlan extends TrackedResource { /** - * Name of the Environment + * Metadata pertaining to creation and last modification of the lab plan. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly systemData?: SystemData; /** - * Description of the Environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default lab connection profile. This can be changed on a lab resource and only provides a + * default profile. */ - readonly description?: string; + defaultConnectionProfile?: ConnectionProfile; /** - * Resource Id of the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default lab shutdown profile. This can be changed on a lab resource and only provides a + * default profile. */ - readonly id?: string; + defaultAutoShutdownProfile?: AutoShutdownProfile; /** - * The provisioning state of the environment. This also includes LabIsFull and NotYetProvisioned - * status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The lab plan network profile. To enforce lab network policies they must be defined here and + * cannot be changed when there are existing labs associated with this lab plan. */ - readonly provisioningState?: string; + defaultNetworkProfile?: LabPlanNetworkProfile; /** - * Details of backing DTL virtual machine with compute and network details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The allowed regions for the lab creator to use when creating labs using this lab plan. */ - readonly virtualMachineDetails?: VirtualMachineDetails; + allowedRegions?: string[]; /** - * The details of the latest operation. ex: status, error - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template + * virtual machine image it will be persisted in this gallery. Shared images from the gallery can + * be made available to use when creating new labs. */ - readonly latestOperationResult?: LatestOperationResult; + sharedGalleryId?: string; /** - * Publishing state of the environment setting Possible values are Creating, Created, Failed - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Support contact information and instructions for users of the lab plan. This information is + * displayed to lab owners and virtual machine users for all labs in the lab plan. */ - readonly environmentState?: string; + supportInfo?: SupportInfo; /** - * How long the environment has been used by a lab user - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Base Url of the lms instance this lab plan can link lab rosters against. */ - readonly totalUsage?: string; + linkedLmsInstance?: string; /** - * When the password was last reset on the environment. + * Current provisioning state of the lab plan. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Locked' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly passwordLastReset?: Date; + readonly provisioningState?: ProvisioningState; } /** - * Represents a VM and the setting Id it was created for. + * Profile for how to handle networking for Lab Plans. */ -export interface ResourceSetFragment { +export interface LabPlanNetworkProfile { /** - * VM resource Id for the environment + * The external subnet resource id */ - vmResourceId?: string; - /** - * resourceSettingId for the environment - */ - resourceSettingId?: string; + subnetId?: string; } /** - * Represents an environment instance + * Support contact information and instructions. */ -export interface EnvironmentFragment extends Resource { +export interface SupportInfo { /** - * The set of a VM and the setting id it was created for + * Support web address. */ - resourceSets?: ResourceSetFragment; + url?: string; /** - * The provisioning status of the resource. + * Support contact email address. */ - provisioningState?: string; + email?: string; /** - * The unique immutable identifier of a resource (Guid). + * Support contact phone number. */ - uniqueIdentifier?: string; -} - -/** - * Represents payload for any Environment operations like get, start, stop, connect - */ -export interface EnvironmentOperationsPayload { + phone?: string; /** - * The resourceId of the environment + * Support instructions. */ - environmentId: string; + instructions?: string; } /** - * Details about the state of the reference virtual machine. + * Contains lab configuration and default settings. This variant is used for PATCH. */ -export interface VmStateDetails { +export interface LabPlanUpdate extends TrackedResourceUpdate { /** - * The RdpAuthority property is a server DNS host name or IP address followed by the service port - * number for RDP (Remote Desktop Protocol). - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default lab connection profile. This can be changed on a lab resource and only provides a + * default profile. */ - readonly rdpAuthority?: string; + defaultConnectionProfile?: ConnectionProfile; /** - * The SshAuthority property is a server DNS host name or IP address followed by the service port - * number for SSH. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default lab shutdown profile. This can be changed on a lab resource and only provides a + * default profile. */ - readonly sshAuthority?: string; + defaultAutoShutdownProfile?: AutoShutdownProfile; /** - * The power state of the reference virtual machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The lab plan network profile. To enforce lab network policies they must be defined here and + * cannot be changed when there are existing labs associated with this lab plan. */ - readonly powerState?: string; + defaultNetworkProfile?: LabPlanNetworkProfile; /** - * Last known compute power state captured in DTL - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The allowed regions for the lab creator to use when creating labs using this lab plan. */ - readonly lastKnownPowerState?: string; + allowedRegions?: string[]; + /** + * Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template + * virtual machine image it will be persisted in this gallery. Shared images from the gallery can + * be made available to use when creating new labs. + */ + sharedGalleryId?: string; + /** + * Support contact information and instructions for users of the lab plan. This information is + * displayed to lab owners and virtual machine users for all labs in the lab plan. + */ + supportInfo?: SupportInfo; + /** + * Base Url of the lms instance this lab plan can link lab rosters against. + */ + linkedLmsInstance?: string; } /** - * Details of a Reference Vm + * Body for the save image POST */ -export interface ReferenceVm { +export interface SaveImageBody { /** - * The username of the virtual machine + * The name for the image we create. */ - userName: string; - /** - * The password of the virtual machine. This will be set to null in GET resource API - */ - password?: string; + name?: string; /** - * The state details for the reference virtual machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The ID of the lab virtual machine you want to save an image from. */ - readonly vmStateDetails?: VmStateDetails; + labVirtualMachineId?: string; +} + +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { /** - * VM resource Id for the environment + * Resource Etag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly vmResourceId?: string; + readonly etag?: string; } /** - * Represents resource specific settings + * Lab services virtual machine image */ -export interface ResourceSettings { +export interface Image extends ProxyResource { /** - * The unique id of the resource setting + * Metadata pertaining to creation and last modification of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly systemData?: SystemData; /** - * The resource id of the gallery image used for creating the virtual machine + * Is the image enabled. Possible values include: 'Enabled', 'Disabled' */ - galleryImageResourceId?: string; + enabledState?: EnableState; /** - * The name of the image used to created the environment setting + * Current provisioning state of the image. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Locked' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly imageName?: string; + readonly provisioningState?: ProvisioningState; /** - * The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance' + * The image display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - size?: ManagedLabVmSize; + readonly displayName?: string; /** - * The translated compute cores of the virtual machine + * A description of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly cores?: number; + readonly description?: string; /** - * Details specific to Reference Vm + * URL of the image icon. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - referenceVm: ReferenceVm; -} - -/** - * Represents settings of an environment, from which environment instances would be created - */ -export interface EnvironmentSetting extends Resource { + readonly iconUrl?: string; /** - * Describes the readiness of this environment setting. Possible values include: 'Draft', - * 'Publishing', 'Published', 'PublishFailed', 'Scaling' + * The image author. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly publishingState?: PublishingState; + readonly author?: string; /** - * Describes the user's progress in configuring their environment setting. Possible values - * include: 'NotApplicable', 'Completed' + * The OS Type of the image. Possible values include: 'Windows', 'Linux' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - configurationState?: ConfigurationState; + readonly osType?: OsType; /** - * Describes the environment and its resource settings + * The ID of marketplace plan associated with the image (optional). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - description?: string; + readonly plan?: string; + /** + * The status of image terms of use (enabled = accepted, disabled = not accepted). Possible + * values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly termsStatus?: EnableState; /** - * Brief title describing the environment and its resource settings + * The ID of an offer associated with the image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - title?: string; + readonly offer?: string; /** - * The resource specific settings + * The ID of the publisher of the image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resourceSettings: ResourceSettings; + readonly publisher?: string; /** - * Time when the template VM was last changed. + * The image SKU. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastChanged?: Date; + readonly sku?: string; /** - * Time when the template VM was last sent for publishing. + * The image version. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastPublished?: Date; + readonly version?: string; /** - * The provisioning status of the resource. + * The ID for the image in the shared gallery. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provisioningState?: string; + readonly sharedGalleryId?: string; /** - * The unique immutable identifier of a resource (Guid). + * The available regions of the image in the shared gallery. */ - uniqueIdentifier?: string; + availableRegions?: string[]; /** - * The details of the latest operation. ex: status, error + * The OS State of the image. Possible values include: 'Generalized', 'Specialized' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly latestOperationResult?: LatestOperationResult; + readonly osState?: OsState; } /** - * Details of a Reference Vm + * Lab services virtual machine image for updates. */ -export interface ReferenceVmFragment { +export interface ImageUpdate { /** - * The username of the virtual machine + * Is the image enabled. Possible values include: 'Enabled', 'Disabled' */ - userName?: string; - /** - * The password of the virtual machine. This will be set to null in GET resource API - */ - password?: string; + enabledState?: EnableState; } /** - * Represents resource specific settings + * Profile for how to handle networking for Labs. */ -export interface ResourceSettingsFragment { +export interface LabNetworkProfile { /** - * The resource id of the gallery image used for creating the virtual machine + * The external subnet resource id */ - galleryImageResourceId?: string; + subnetId?: string; /** - * The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance' + * The external load balancer resource id */ - size?: ManagedLabVmSize; + loadBalancerId?: string; /** - * Details specific to Reference Vm + * The external public IP resource id */ - referenceVm?: ReferenceVmFragment; + publicIpId?: string; } /** - * Represents settings of an environment, from which environment instances would be created + * The lab resource. */ -export interface EnvironmentSettingFragment extends Resource { +export interface Lab extends TrackedResource { /** - * Describes the user's progress in configuring their environment setting. Possible values - * include: 'NotApplicable', 'Completed' + * Metadata pertaining to creation and last modification of the lab. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - configurationState?: ConfigurationState; + readonly systemData?: SystemData; /** - * Describes the environment and its resource settings + * The resource auto shutdown configuration for the lab. This controls whether actions are taken + * on resources that are sitting idle. */ - description?: string; + autoShutdownProfile?: AutoShutdownProfile; /** - * Brief title describing the environment and its resource settings + * The connection profile for the lab. This controls settings such as web access to lab resources + * or whether RDP or SSH ports are open. */ - title?: string; + connectionProfile?: ConnectionProfile; /** - * The resource specific settings + * The profile used for creating lab virtual machines. */ - resourceSettings?: ResourceSettingsFragment; + virtualMachineProfile?: VirtualMachineProfile; /** - * The provisioning status of the resource. + * The lab security profile. */ - provisioningState?: string; + securityProfile?: SecurityProfile; /** - * The unique immutable identifier of a resource (Guid). + * The lab user list management profile. */ - uniqueIdentifier?: string; -} - -/** - * Contains detailed information about a size - */ -export interface SizeInfo { + rosterProfile?: RosterProfile; /** - * Represents the actual compute size, e.g. Standard_A2_v2. + * The ID of the lab plan. Used during resource creation to provide defaults and acts as a + * permission container when creating a lab via labs.azure.com. Setting a labPlanId on an + * existing lab provides organization.. */ - computeSize?: string; + labPlanId?: string; /** - * The pay-as-you-go price per hour this size will cost. It does not include discounts and may - * not reflect the actual price the size will cost. + * The title of the lab. */ - price?: number; + title?: string; /** - * The number of cores a VM of this size has. + * The description of the lab. */ - numberOfCores?: number; + description?: string; /** - * The amount of memory available (in GB). + * Current provisioning state of the lab. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Locked' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The network profile for the lab, typically applied via a lab plan. This profile cannot be + * modified once a lab has been created. + */ + networkProfile?: LabNetworkProfile; + /** + * The lab state. Possible values include: 'Draft', 'Publishing', 'Scaling', 'Syncing', + * 'Published' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - memory?: number; + readonly state?: LabState; } /** - * Represents a size category supported by this Lab Account (small, medium or large) + * Image reference information. Used in the virtual machine profile. */ -export interface EnvironmentSize { +export interface ImageReference { /** - * The size category. Possible values include: 'Basic', 'Standard', 'Performance' + * Image resource ID */ - name?: ManagedLabVmSize; + id?: string; /** - * Represents a set of compute sizes that can serve this given size type + * The image offer if applicable. */ - vmSizes?: SizeInfo[]; + offer?: string; /** - * The pay-as-you-go dollar price per hour this size will cost. It does not include discounts and - * may not reflect the actual price the size will cost. This is the maximum price of all prices - * within this tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The image publisher */ - readonly maxPrice?: number; + publisher?: string; /** - * The number of cores a VM of this size has. This is the minimum number of cores within this - * tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The image SKU */ - readonly minNumberOfCores?: number; + sku?: string; /** - * The amount of memory available (in GB). This is the minimum amount of memory within this tier. + * The image version specified on creation. + */ + version?: string; + /** + * The actual version of the image after use. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly minMemory?: number; + readonly exactVersion?: string; } /** - * Contains detailed information about a size + * The resource model definition representing SKU */ -export interface SizeInfoFragment { +export interface Sku { + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code + */ + name: string; /** - * Represents the actual compute size, e.g. Standard_A2_v2. + * This field is required to be implemented by the Resource Provider if the service has more than + * one tier, but is not required on a PUT. Possible values include: 'Free', 'Basic', 'Standard', + * 'Premium' */ - computeSize?: string; + tier?: SkuTier; /** - * The pay-as-you-go price per hour this size will cost. It does not include discounts and may - * not reflect the actual price the size will cost. + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. */ - price?: number; + size?: string; /** - * The number of cores a VM of this size has. + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. */ - numberOfCores?: number; + family?: string; /** - * The amount of memory available (in GB). + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. */ - memory?: number; + capacity?: number; } /** - * Represents a size category supported by this Lab Account (small, medium or large) + * The additional capabilities for a lab VM. */ -export interface EnvironmentSizeFragment { +export interface VirtualMachineAdditionalCapabilities { /** - * The size category. Possible values include: 'Basic', 'Standard', 'Performance' + * Flag to pre-install dedicated GPU drivers. Possible values include: 'Enabled', 'Disabled' */ - name?: ManagedLabVmSize; - /** - * Represents a set of compute sizes that can serve this given size type - */ - vmSizes?: SizeInfoFragment[]; + installGpuDrivers?: EnableState; } /** - * The reference information for an Azure Marketplace image. + * Credentials for a user on a lab VM. */ -export interface GalleryImageReference { - /** - * The offer of the gallery image. - */ - offer?: string; +export interface Credentials { /** - * The publisher of the gallery image. + * The username to use when signing in to lab VMs. */ - publisher?: string; - /** - * The SKU of the gallery image. - */ - sku?: string; - /** - * The OS type of the gallery image. - */ - osType?: string; + username: string; /** - * The version of the gallery image. + * The password for the user. This is required for the TemplateVM createOption. */ - version?: string; + password?: string; } /** - * Represents an image from the Azure Marketplace + * The base virtual machine configuration for a lab. */ -export interface GalleryImage extends Resource { - /** - * The author of the gallery image. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly author?: string; +export interface VirtualMachineProfile { /** - * The creation date of the gallery image. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Indicates what lab virtual machines are created from. Possible values include: 'Image', + * 'TemplateVM' */ - readonly createdDate?: Date; + createOption: CreateOption; /** - * The description of the gallery image. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The image configuration for lab virtual machines. */ - readonly description?: string; + imageReference: ImageReference; /** - * The image reference of the gallery image. + * The OS type of the image. Possible values include: 'Windows', 'Linux' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly imageReference?: GalleryImageReference; + readonly osType?: OsType; /** - * The icon of the gallery image. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The SKU for the lab. Defines the type of virtual machines used in the lab. */ - readonly icon?: string; + sku: Sku; /** - * Indicates whether this gallery image is enabled. + * Additional VM capabilities. */ - isEnabled?: boolean; + additionalCapabilities?: VirtualMachineAdditionalCapabilities; /** - * Indicates whether this gallery has been overridden for this lab account + * The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours. */ - isOverride?: boolean; + usageQuota: string; /** - * The third party plan that applies to this image - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Enabling this option will use the same password for all user VMs. Possible values include: + * 'Enabled', 'Disabled' */ - readonly planId?: string; + useSharedPassword?: EnableState; /** - * Indicates if the plan has been authorized for programmatic deployment. + * Credentials for the admin user on the VM. */ - isPlanAuthorized?: boolean; + adminUser: Credentials; /** - * The provisioning status of the resource. + * Credentials for the non-admin user on the VM, if one exists. */ - provisioningState?: string; + nonAdminUser?: Credentials; +} + +/** + * The lab security profile. + */ +export interface SecurityProfile { /** - * The unique immutable identifier of a resource (Guid). + * The registration code for the lab. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - uniqueIdentifier?: string; + readonly registrationCode?: string; /** - * The details of the latest operation. ex: status, error - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Whether any user or only specified users can register to a lab. Possible values include: + * 'Enabled', 'Disabled' */ - readonly latestOperationResult?: LatestOperationResult; + openAccess?: EnableState; } /** - * Represents an image from the Azure Marketplace + * The lab user list management profile. */ -export interface GalleryImageFragment extends Resource { +export interface RosterProfile { /** - * Indicates whether this gallery image is enabled. + * The AAD group ID which this lab roster is populated from. Having this set enables AAD sync + * mode. */ - isEnabled?: boolean; + activeDirectoryGroupId?: string; /** - * Indicates whether this gallery has been overridden for this lab account + * The unique context identifier for the lab in the lms. */ - isOverride?: boolean; + ltiContextId?: string; /** - * Indicates if the plan has been authorized for programmatic deployment. + * The base URI identifying the lms instance. */ - isPlanAuthorized?: boolean; + lmsInstance?: string; /** - * The provisioning status of the resource. + * The unique id of the azure lab services tool in the lms. */ - provisioningState?: string; + ltiClientId?: string; /** - * The unique immutable identifier of a resource (Guid). + * The uri of the names and roles service endpoint on the lms for the class attached to this lab. */ - uniqueIdentifier?: string; + ltiRosterEndpoint?: string; } /** - * The reference information for an Azure Marketplace image. + * The lab resource for updates. */ -export interface GalleryImageReferenceFragment { +export interface LabUpdate extends TrackedResourceUpdate { /** - * The offer of the gallery image. + * The resource auto shutdown configuration for the lab. This controls whether actions are taken + * on resources that are sitting idle. */ - offer?: string; + autoShutdownProfile?: AutoShutdownProfile; /** - * The publisher of the gallery image. + * The connection profile for the lab. This controls settings such as web access to lab resources + * or whether RDP or SSH ports are open. */ - publisher?: string; + connectionProfile?: ConnectionProfile; /** - * The SKU of the gallery image. + * The profile used for creating lab virtual machines. */ - sku?: string; + virtualMachineProfile?: VirtualMachineProfile; /** - * The OS type of the gallery image. + * The lab security profile. */ - osType?: string; + securityProfile?: SecurityProfile; /** - * The version of the gallery image. + * The lab user list management profile. */ - version?: string; -} - -/** - * Represents the environments details - */ -export interface GetEnvironmentResponse { + rosterProfile?: RosterProfile; /** - * Details of the environment - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The ID of the lab plan. Used during resource creation to provide defaults and acts as a + * permission container when creating a lab via labs.azure.com. Setting a labPlanId on an + * existing lab provides organization.. */ - readonly environment?: EnvironmentDetails; -} - -/** - * Represents the PersonalPreferences for the user - */ -export interface GetPersonalPreferencesResponse { + labPlanId?: string; /** - * Id to be used by the cache orchestrator + * The title of the lab. */ - id?: string; + title?: string; /** - * Array of favorite lab resource ids + * The description of the lab. */ - favoriteLabResourceIds?: string[]; + description?: string; } /** - * Represents the size information + * Identity for the resource. */ -export interface SizeAvailability { +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; /** - * The category of the size (Basic, Standard, Performance). Possible values include: 'Basic', - * 'Standard', 'Performance' + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sizeCategory?: ManagedLabVmSize; + readonly tenantId?: string; /** - * Whether or not this size category is available + * The identity type. Possible values include: 'SystemAssigned' */ - isAvailable?: boolean; + type?: ResourceIdentityType; } /** - * The availability information of sizes across regions + * An interface representing ResourceModelWithAllowedPropertySetIdentity. */ -export interface RegionalAvailability { - /** - * Corresponding region - */ - region?: string; - /** - * List of all the size information for the region - */ - sizeAvailabilities?: SizeAvailability[]; +export interface ResourceModelWithAllowedPropertySetIdentity extends Identity { } /** - * The response model from the GetRegionalAvailability action + * An interface representing ResourceModelWithAllowedPropertySetSku. */ -export interface GetRegionalAvailabilityResponse { - /** - * Availability information for different size categories per region - */ - regionalAvailability?: RegionalAvailability[]; +export interface ResourceModelWithAllowedPropertySetSku extends Sku { } /** - * Represents a lab. + * Plan for the resource. */ -export interface Lab extends Resource { - /** - * Maximum number of users allowed in the lab. - */ - maxUsersInLab?: number; - /** - * Maximum value MaxUsersInLab can be set to, as specified by the service - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly userQuota?: number; - /** - * Invitation code that users can use to join a lab. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly invitationCode?: string; - /** - * Object id of the user that created the lab. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly createdByObjectId?: string; - /** - * Maximum duration a user can use an environment for in the lab. - */ - usageQuota?: string; +export interface Plan { /** - * Lab user access mode (open to all vs. restricted to those listed on the lab). Possible values - * include: 'Restricted', 'Open' - */ - userAccessMode?: LabUserAccessMode; - /** - * Lab creator name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A user defined name of the 3rd Party Artifact that is being procured. */ - readonly createdByUserPrincipalName?: string; + name: string; /** - * Creation date for the lab - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ - readonly createdDate?: Date; + publisher: string; /** - * The provisioning status of the resource. + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + * specified for the artifact at the time of Data Market onboarding. */ - provisioningState?: string; + product: string; /** - * The unique immutable identifier of a resource (Guid). + * A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. */ - uniqueIdentifier?: string; + promotionCode?: string; /** - * The details of the latest operation. ex: status, error - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The version of the desired product/artifact. */ - readonly latestOperationResult?: LatestOperationResult; + version?: string; } /** - * Represents the size configuration under the lab account + * An interface representing ResourceModelWithAllowedPropertySetPlan. */ -export interface SizeConfigurationProperties { - /** - * Represents a list of size categories supported by this Lab Account (Small, Medium, Large) - */ - environmentSizes?: EnvironmentSize[]; +export interface ResourceModelWithAllowedPropertySetPlan extends Plan { } /** - * Represents a lab account. + * The resource model definition containing the full set of allowed properties for a resource. + * Except properties bag, there cannot be a top level property outside of this set. */ -export interface LabAccount extends Resource { +export interface ResourceModelWithAllowedPropertySet extends BaseResource { /** - * Represents the size configuration under the lab account + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sizeConfiguration?: SizeConfigurationProperties; + readonly id?: string; /** - * Represents if region selection is enabled + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabledRegionSelection?: boolean; + readonly name?: string; /** - * The provisioning status of the resource. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provisioningState?: string; + readonly type?: string; /** - * The unique immutable identifier of a resource (Guid). + * The geo-location where the resource lives */ - uniqueIdentifier?: string; + location?: string; /** - * The details of the latest operation. ex: status, error - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The fully qualified resource ID of the resource that manages this resource. Indicates if this + * resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another + * resource. */ - readonly latestOperationResult?: LatestOperationResult; -} - -/** - * Represents a lab account. - */ -export interface LabAccountFragment extends Resource { + managedBy?: string; /** - * Represents if region selection is enabled + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource + * provider must validate and persist this value. */ - enabledRegionSelection?: boolean; + kind?: string; /** - * The provisioning status of the resource. + * The etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal etag convention. Entity tags are used for comparing two + * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag + * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + * (section 14.27) header fields. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provisioningState?: string; + readonly etag?: string; /** - * The unique immutable identifier of a resource (Guid). + * Resource tags. */ - uniqueIdentifier?: string; + tags?: { [propertyName: string]: string }; + identity?: ResourceModelWithAllowedPropertySetIdentity; + sku?: ResourceModelWithAllowedPropertySetSku; + plan?: ResourceModelWithAllowedPropertySetPlan; } /** - * This represents the details about a lab that the User is in, and its state. + * User of a lab that can register for and use virtual machines within the lab. */ -export interface LabDetails { +export interface User extends ProxyResource { /** - * Name of the lab + * Metadata pertaining to creation and last modification of the user resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly systemData?: SystemData; /** - * The provisioning state of the lab. + * The amount of usage quota time the user gets in addition to the lab usage quota. */ - provisioningState?: string; + additionalUsageQuota?: string; /** - * The Id of the lab. - */ - id?: string; - /** - * The maximum duration a user can use a VM in this lab. + * Current provisioning state of the user resource. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Locked' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageQuota?: string; -} - -/** - * Represents a lab. - */ -export interface LabFragment extends Resource { + readonly provisioningState?: ProvisioningState; /** - * Maximum number of users allowed in the lab. - */ - maxUsersInLab?: number; - /** - * Maximum duration a user can use an environment for in the lab. + * Display name of the user, for example user's full name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - usageQuota?: string; + readonly displayName?: string; /** - * Lab user access mode (open to all vs. restricted to those listed on the lab). Possible values - * include: 'Restricted', 'Open' + * Email address of the user. */ - userAccessMode?: LabUserAccessMode; + email: string; /** - * The provisioning status of the resource. + * State of the user's registration within the lab. Possible values include: 'Registered', + * 'NotRegistered' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provisioningState?: string; + readonly registrationState?: RegistrationState; /** - * The unique immutable identifier of a resource (Guid). + * State of the invitation message for the user. Possible values include: 'NotSent', 'Sending', + * 'Sent', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - uniqueIdentifier?: string; -} - -/** - * Represents the payload to list environments owned by a user - */ -export interface ListEnvironmentsPayload { + readonly invitationState?: InvitationState; /** - * The resource Id of the lab + * Date and time when the invitation message was sent to the user. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - labId?: string; -} - -/** - * Represents the list of environments owned by a user - */ -export interface ListEnvironmentsResponse { + readonly invitationSent?: Date; /** - * List of all the environments + * How long the user has used their virtual machines in this lab. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - environments?: EnvironmentDetails[]; + readonly totalUsage?: string; } /** - * Lists the labs owned by a user + * User of a lab that can register for and use virtual machines within the lab. Used for updates. */ -export interface ListLabsResponse { +export interface UserUpdate { /** - * List of all the labs + * The amount of usage quota time the user gets in addition to the lab usage quota. */ - labs?: LabDetails[]; + additionalUsageQuota?: string; } /** - * Payload to get the status of an operation + * Body for a user invite request */ -export interface OperationBatchStatusPayload { +export interface InviteBody { /** - * The operation url of long running operation + * Custom text for the invite email. */ - urls: string[]; + text?: string; } /** - * Represents the status of an operation that used the batch API. + * The connection information for the virtual machine */ -export interface OperationBatchStatusResponseItem { +export interface VirtualMachineConnectionProfile { /** - * status of the long running operation for an environment + * The private IP address of the virtual machine. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operationUrl?: string; + readonly privateIpAddress?: string; /** - * status of the long running operation for an environment + * Port and host name separated by semicolon for connecting via SSH protocol to the virtual + * machine. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: string; -} - -/** - * Status Details of the long running operation for an environment - */ -export interface OperationBatchStatusResponse { + readonly sshAuthority?: string; /** - * Gets a collection of items that contain the operation url and status. + * URL for connecting via SSH protocol to the virtual machine in browser. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly items?: OperationBatchStatusResponseItem[]; -} - -/** - * Error details for the operation in case of a failure. - */ -export interface OperationError { - /** - * The error code of the operation error. - */ - code?: string; - /** - * The error message of the operation error. - */ - message?: string; -} - -/** - * The object that describes the operations - */ -export interface OperationMetadataDisplay { - /** - * Friendly name of the resource provider - */ - provider?: string; - /** - * Resource type on which the operation is performed. - */ - resource?: string; - /** - * Operation type: read, write, delete, listKeys/action, etc. - */ - operation?: string; - /** - * Friendly name of the operation - */ - description?: string; -} - -/** - * The REST API operation supported by ManagedLab ResourceProvider. - */ -export interface OperationMetadata { - /** - * Operation name: {provider}/{resource}/{operation} - */ - name?: string; + readonly sshInBrowserUrl?: string; /** - * The object that describes the operations + * Port and host name separated by semicolon for connecting via RDP protocol to the virtual + * machine. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationMetadataDisplay; -} - -/** - * An Operation Result - */ -export interface OperationResult { + readonly rdpAuthority?: string; /** - * The operation status. + * URL for connecting via RDP protocol to the virtual machine in browser. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - status?: string; + readonly rdpInBrowserUrl?: string; /** - * Error details for the operation in case of a failure. + * The username used to log on to the virtual machine as admin. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: OperationError; -} - -/** - * Payload to get the status of an operation - */ -export interface OperationStatusPayload { + readonly adminUsername?: string; /** - * The operation url of long running operation + * The username used to log on to the virtual machine as non-admin, if one exists. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operationUrl: string; + readonly nonAdminUsername?: string; } /** - * Status Details of the long running operation for an environment + * A lab virtual machine resource. */ -export interface OperationStatusResponse { +export interface VirtualMachine extends ProxyResource { /** - * status of the long running operation for an environment + * System data of the Lab virtual machine. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: string; -} - -/** - * Represents payload for any Environment operations like get, start, stop, connect - */ -export interface PersonalPreferencesOperationsPayload { + readonly systemData?: SystemData; /** - * Resource Id of the lab account + * Current provisioning state of the virtual machine. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Locked' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - labAccountResourceId?: string; + readonly provisioningState?: ProvisioningState; /** - * Enum indicating if user is adding or removing a favorite lab. Possible values include: 'Add', - * 'Remove' + * The current state of the virtual machine. Possible values include: 'Stopped', 'Starting', + * 'Running', 'Stopping', 'ResettingPassword', 'Reimaging', 'Redeploying' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - addRemove?: AddRemove; + readonly state?: VirtualMachineState; /** - * Resource Id of the lab to add/remove from the favorites list + * Profile for information about connecting to the virtual machine. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - labResourceId?: string; -} - -/** - * Payload for Publish operation on EnvironmentSetting. - */ -export interface PublishPayload { + readonly connectionProfile?: VirtualMachineConnectionProfile; /** - * Whether to use existing VM custom image when publishing. + * The lab user ID (not the PUID!) of who claimed the virtual machine. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - useExistingImage?: boolean; -} - -/** - * Represents payload for Register action. - */ -export interface RegisterPayload { + readonly claimedByUserId?: string; /** - * The registration code of the lab. + * The type of this VM resource. Possible values include: 'User', 'Template' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - registrationCode?: string; + readonly vmType?: VirtualMachineType; } /** - * Represents the payload for resetting passwords. + * Body of a reset password request. */ -export interface ResetPasswordPayload { - /** - * The resourceId of the environment - */ - environmentId: string; +export interface ResetPasswordBody { /** - * The username for which the password will be reset. + * The user whose password is being reset */ - username?: string; + username: string; /** - * The password to assign to the user specified in + * The password */ - password?: string; -} - -/** - * Represents the size configuration under the lab account - */ -export interface SizeConfigurationPropertiesFragment { - /** - * Represents a list of size categories supported by this Lab Account (Small, Medium, Large) - */ - environmentSizes?: EnvironmentSizeFragment[]; + password: string; } /** - * The User registered to a lab + * Schedule for automatically turning virtual machines in a lab on and off at specified times. */ -export interface User extends Resource { - /** - * The user email address, as it was specified during registration. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly email?: string; +export interface Schedule extends ProxyResource { /** - * The user family name, as it was specified during registration. + * Metadata pertaining to creation and last modification of the schedule. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly familyName?: string; + readonly systemData?: SystemData; /** - * The user given name, as it was specified during registration. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * When lab user virtual machines will be started. Timestamp offsets will be ignored and + * timeZoneId is used instead. */ - readonly givenName?: string; + startAt?: Date; /** - * The user tenant ID, as it was specified during registration. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * When lab user virtual machines will be stopped. Timestamp offsets will be ignored and + * timeZoneId is used instead. */ - readonly tenantId?: string; + stopAt?: Date; /** - * How long the user has used his VMs in this lab - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The recurrence pattern of the scheduled actions. */ - readonly totalUsage?: string; + recurrencePattern?: RecurrencePattern; /** - * The provisioning status of the resource. + * The IANA timezone id for the schedule. */ - provisioningState?: string; + timeZoneId?: string; /** - * The unique immutable identifier of a resource (Guid). + * Notes for this schedule. */ - uniqueIdentifier?: string; + notes?: string; /** - * The details of the latest operation. ex: status, error + * Current provisioning state of the schedule. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Locked' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly latestOperationResult?: LatestOperationResult; + readonly provisioningState?: ProvisioningState; } /** - * The User registered to a lab + * Recurrence pattern of a lab schedule. */ -export interface UserFragment extends Resource { +export interface RecurrencePattern { /** - * The provisioning status of the resource. + * The frequency of the recurrence. Possible values include: 'Daily', 'Weekly' */ - provisioningState?: string; + frequency: RecurrenceFrequency; /** - * The unique immutable identifier of a resource (Guid). + * The week days the schedule runs. Used for when the Frequency is set to Weekly. */ - uniqueIdentifier?: string; -} - -/** - * Optional Parameters. - */ -export interface GlobalUsersGetEnvironmentOptionalParams extends msRest.RequestOptionsBase { + weekDays?: WeekDay[]; + /** + * The interval to invoke the schedule on. For example, interval = 2 and + * RecurrenceFrequency.Daily will run every 2 days. When no interval is supplied, an interval of + * 1 is used. + */ + interval?: number; /** - * Specify the $expand query. Example: 'properties($expand=environment)' + * When the recurrence will expire. This date is inclusive. */ - expand?: string; + expirationDate: Date; } /** - * Optional Parameters. + * Schedule for automatically turning virtual machines in a lab on and off at specified times. Used + * for updates. */ -export interface LabAccountsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface ScheduleUpdate { /** - * Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' + * When lab user virtual machines will be started. Timestamp offsets will be ignored and + * timeZoneId is used instead. */ - expand?: string; + startAt?: Date; /** - * The filter to apply to the operation. + * When lab user virtual machines will be stopped. Timestamp offsets will be ignored and + * timeZoneId is used instead. */ - filter?: string; + stopAt?: Date; + /** + * The recurrence pattern of the scheduled actions. + */ + recurrencePattern?: RecurrencePattern; /** - * The maximum number of resources to return from the operation. + * The IANA timezone id for the schedule. */ - top?: number; + timeZoneId?: string; /** - * The ordering expression for the results, using OData notation. + * Notes for this schedule. */ - orderby?: string; + notes?: string; } /** * Optional Parameters. */ -export interface LabAccountsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' - */ - expand?: string; +export interface LabPlansListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface LabAccountsGetOptionalParams extends msRest.RequestOptionsBase { +export interface LabPlansListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** * Optional Parameters. */ -export interface GalleryImagesListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($select=author)' - */ - expand?: string; +export interface ImagesListByLabPlanOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface GalleryImagesGetOptionalParams extends msRest.RequestOptionsBase { +export interface ImagesListByLabPlanNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($select=author)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** * Optional Parameters. */ -export interface LabsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($select=maxUsersInLab)' - */ - expand?: string; +export interface LabsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface LabsGetOptionalParams extends msRest.RequestOptionsBase { +export interface LabsListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($select=maxUsersInLab)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** * Optional Parameters. */ -export interface EnvironmentSettingsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($select=publishingState)' - */ - expand?: string; +export interface UsersListByLabOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface EnvironmentSettingsGetOptionalParams extends msRest.RequestOptionsBase { +export interface UsersListByLabNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($select=publishingState)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** * Optional Parameters. */ -export interface EnvironmentsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($expand=networkInterface)' - */ - expand?: string; +export interface VirtualMachinesListByLabOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface EnvironmentsGetOptionalParams extends msRest.RequestOptionsBase { +export interface VirtualMachinesListByLabNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($expand=networkInterface)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** * Optional Parameters. */ -export interface UsersListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify the $expand query. Example: 'properties($select=email)' - */ - expand?: string; +export interface SchedulesListByLabOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply to the operation. */ filter?: string; - /** - * The maximum number of resources to return from the operation. - */ - top?: number; - /** - * The ordering expression for the results, using OData notation. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface UsersGetOptionalParams extends msRest.RequestOptionsBase { +export interface SchedulesListByLabNextOptionalParams extends msRest.RequestOptionsBase { /** - * Specify the $expand query. Example: 'properties($select=email)' + * The filter to apply to the operation. */ - expand?: string; + filter?: string; } /** - * An interface representing ManagedLabsClientOptions. + * An interface representing LabServicesClientOptions. */ -export interface ManagedLabsClientOptions extends AzureServiceClientOptions { +export interface LabServicesClientOptions extends AzureServiceClientOptions { baseUri?: string; } /** * @interface - * Result of the request to list REST API operations - * @extends Array + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link + * to get the next set of results. + * @extends Array */ -export interface ProviderOperationResult extends Array { +export interface OperationListResult extends Array { /** - * URL to get the next set of operation list results if there are any. + * URL to get the next set of operation list results (if there are any). * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; @@ -1586,160 +1399,248 @@ export interface ProviderOperationResult extends Array { /** * @interface - * The response of a list operation. - * @extends Array + * Paged list of lab plans. + * @extends Array */ -export interface ResponseWithContinuationLabAccount extends Array { +export interface PagedLabPlans extends Array { /** - * Link for next set of results. + * The link to get the next page of lab plan results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * The response of a list operation. - * @extends Array + * Paged list of Lab services virtual machine images. + * @extends Array */ -export interface ResponseWithContinuationGalleryImage extends Array { +export interface PagedImages extends Array { /** - * Link for next set of results. + * The link to get the next page of image results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * The response of a list operation. + * Paged list of labs. * @extends Array */ -export interface ResponseWithContinuationLab extends Array { +export interface PagedLabs extends Array { /** - * Link for next set of results. + * The link to get the next page of image results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * The response of a list operation. - * @extends Array + * Paged list of users. + * @extends Array */ -export interface ResponseWithContinuationEnvironmentSetting extends Array { +export interface PagedUsers extends Array { /** - * Link for next set of results. + * The link to get the next page of image results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * The response of a list operation. - * @extends Array + * Paged list of lab services virtual machines. + * @extends Array */ -export interface ResponseWithContinuationEnvironment extends Array { +export interface PagedVirtualMachines extends Array { /** - * Link for next set of results. + * The link to get the next page of virtual machine results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * The response of a list operation. - * @extends Array + * Paged list of schedules. + * @extends Array */ -export interface ResponseWithContinuationUser extends Array { +export interface PagedSchedules extends Array { /** - * Link for next set of results. + * The link to get the next page of schedule results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** - * Defines values for ManagedLabVmSize. - * Possible values include: 'Basic', 'Standard', 'Performance' + * Defines values for ProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Locked' * @readonly * @enum {string} */ -export type ManagedLabVmSize = 'Basic' | 'Standard' | 'Performance'; +export type ProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Locked'; /** - * Defines values for PublishingState. - * Possible values include: 'Draft', 'Publishing', 'Published', 'PublishFailed', 'Scaling' + * Defines values for EnableState. + * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type PublishingState = 'Draft' | 'Publishing' | 'Published' | 'PublishFailed' | 'Scaling'; +export type EnableState = 'Enabled' | 'Disabled'; /** - * Defines values for ConfigurationState. - * Possible values include: 'NotApplicable', 'Completed' + * Defines values for ConnectionType. + * Possible values include: 'Public', 'Private', 'None' * @readonly * @enum {string} */ -export type ConfigurationState = 'NotApplicable' | 'Completed'; +export type ConnectionType = 'Public' | 'Private' | 'None'; /** - * Defines values for LabUserAccessMode. - * Possible values include: 'Restricted', 'Open' + * Defines values for OsType. + * Possible values include: 'Windows', 'Linux' * @readonly * @enum {string} */ -export type LabUserAccessMode = 'Restricted' | 'Open'; +export type OsType = 'Windows' | 'Linux'; /** - * Defines values for AddRemove. - * Possible values include: 'Add', 'Remove' + * Defines values for OsState. + * Possible values include: 'Generalized', 'Specialized' * @readonly * @enum {string} */ -export type AddRemove = 'Add' | 'Remove'; +export type OsState = 'Generalized' | 'Specialized'; /** - * Contains response data for the list operation. + * Defines values for ShutdownOnIdleMode. + * Possible values include: 'None', 'UserAbsence', 'LowUsage' + * @readonly + * @enum {string} */ -export type ProviderOperationsListResponse = ProviderOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ShutdownOnIdleMode = 'None' | 'UserAbsence' | 'LowUsage'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProviderOperationResult; - }; -}; +/** + * Defines values for Origin. + * Possible values include: 'user', 'system', 'user,system' + * @readonly + * @enum {string} + */ +export type Origin = 'user' | 'system' | 'user,system'; /** - * Contains response data for the listNext operation. + * Defines values for ActionType. + * Possible values include: 'Internal' + * @readonly + * @enum {string} */ -export type ProviderOperationsListNextResponse = ProviderOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ActionType = 'Internal'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProviderOperationResult; - }; -}; +/** + * Defines values for OperationStatus. + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed', 'Canceled' + * @readonly + * @enum {string} + */ +export type OperationStatus = 'NotStarted' | 'InProgress' | 'Succeeded' | 'Failed' | 'Canceled'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for LabState. + * Possible values include: 'Draft', 'Publishing', 'Scaling', 'Syncing', 'Published' + * @readonly + * @enum {string} + */ +export type LabState = 'Draft' | 'Publishing' | 'Scaling' | 'Syncing' | 'Published'; + +/** + * Defines values for CreateOption. + * Possible values include: 'Image', 'TemplateVM' + * @readonly + * @enum {string} + */ +export type CreateOption = 'Image' | 'TemplateVM'; + +/** + * Defines values for SkuTier. + * Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Free' | 'Basic' | 'Standard' | 'Premium'; + +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned'; + +/** + * Defines values for RegistrationState. + * Possible values include: 'Registered', 'NotRegistered' + * @readonly + * @enum {string} + */ +export type RegistrationState = 'Registered' | 'NotRegistered'; + +/** + * Defines values for InvitationState. + * Possible values include: 'NotSent', 'Sending', 'Sent', 'Failed' + * @readonly + * @enum {string} + */ +export type InvitationState = 'NotSent' | 'Sending' | 'Sent' | 'Failed'; + +/** + * Defines values for VirtualMachineState. + * Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping', 'ResettingPassword', + * 'Reimaging', 'Redeploying' + * @readonly + * @enum {string} + */ +export type VirtualMachineState = 'Stopped' | 'Starting' | 'Running' | 'Stopping' | 'ResettingPassword' | 'Reimaging' | 'Redeploying'; + +/** + * Defines values for VirtualMachineType. + * Possible values include: 'User', 'Template' + * @readonly + * @enum {string} + */ +export type VirtualMachineType = 'User' | 'Template'; + +/** + * Defines values for RecurrenceFrequency. + * Possible values include: 'Daily', 'Weekly' + * @readonly + * @enum {string} + */ +export type RecurrenceFrequency = 'Daily' | 'Weekly'; + +/** + * Defines values for WeekDay. + * Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + * 'Saturday' + * @readonly + * @enum {string} + */ +export type WeekDay = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'; /** - * Contains response data for the getEnvironment operation. + * Contains response data for the list operation. */ -export type GlobalUsersGetEnvironmentResponse = GetEnvironmentResponse & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1752,14 +1653,14 @@ export type GlobalUsersGetEnvironmentResponse = GetEnvironmentResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: GetEnvironmentResponse; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the getOperationBatchStatus operation. + * Contains response data for the listNext operation. */ -export type GlobalUsersGetOperationBatchStatusResponse = OperationBatchStatusResponse & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1772,14 +1673,14 @@ export type GlobalUsersGetOperationBatchStatusResponse = OperationBatchStatusRes /** * The response body as parsed JSON or XML */ - parsedBody: OperationBatchStatusResponse; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the getOperationStatus operation. + * Contains response data for the get operation. */ -export type GlobalUsersGetOperationStatusResponse = OperationStatusResponse & { +export type OperationResultsGetResponse = OperationResult & { /** * The underlying HTTP response. */ @@ -1792,14 +1693,14 @@ export type GlobalUsersGetOperationStatusResponse = OperationStatusResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationStatusResponse; + parsedBody: OperationResult; }; }; /** - * Contains response data for the getPersonalPreferences operation. + * Contains response data for the listBySubscription operation. */ -export type GlobalUsersGetPersonalPreferencesResponse = GetPersonalPreferencesResponse & { +export type LabPlansListBySubscriptionResponse = PagedLabPlans & { /** * The underlying HTTP response. */ @@ -1812,14 +1713,14 @@ export type GlobalUsersGetPersonalPreferencesResponse = GetPersonalPreferencesRe /** * The response body as parsed JSON or XML */ - parsedBody: GetPersonalPreferencesResponse; + parsedBody: PagedLabPlans; }; }; /** - * Contains response data for the listEnvironments operation. + * Contains response data for the listByResourceGroup operation. */ -export type GlobalUsersListEnvironmentsResponse = ListEnvironmentsResponse & { +export type LabPlansListByResourceGroupResponse = PagedLabPlans & { /** * The underlying HTTP response. */ @@ -1832,14 +1733,14 @@ export type GlobalUsersListEnvironmentsResponse = ListEnvironmentsResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: ListEnvironmentsResponse; + parsedBody: PagedLabPlans; }; }; /** - * Contains response data for the listLabs operation. + * Contains response data for the get operation. */ -export type GlobalUsersListLabsResponse = ListLabsResponse & { +export type LabPlansGetResponse = LabPlan & { /** * The underlying HTTP response. */ @@ -1852,14 +1753,14 @@ export type GlobalUsersListLabsResponse = ListLabsResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: ListLabsResponse; + parsedBody: LabPlan; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the createOrUpdate operation. */ -export type LabAccountsListBySubscriptionResponse = ResponseWithContinuationLabAccount & { +export type LabPlansCreateOrUpdateResponse = LabPlan & { /** * The underlying HTTP response. */ @@ -1872,14 +1773,14 @@ export type LabAccountsListBySubscriptionResponse = ResponseWithContinuationLabA /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLabAccount; + parsedBody: LabPlan; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the update operation. */ -export type LabAccountsListByResourceGroupResponse = ResponseWithContinuationLabAccount & { +export type LabPlansUpdateResponse = LabPlan & { /** * The underlying HTTP response. */ @@ -1892,14 +1793,14 @@ export type LabAccountsListByResourceGroupResponse = ResponseWithContinuationLab /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLabAccount; + parsedBody: LabPlan; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type LabAccountsGetResponse = LabAccount & { +export type LabPlansBeginCreateOrUpdateResponse = LabPlan & { /** * The underlying HTTP response. */ @@ -1912,14 +1813,14 @@ export type LabAccountsGetResponse = LabAccount & { /** * The response body as parsed JSON or XML */ - parsedBody: LabAccount; + parsedBody: LabPlan; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginUpdate operation. */ -export type LabAccountsCreateOrUpdateResponse = LabAccount & { +export type LabPlansBeginUpdateResponse = LabPlan & { /** * The underlying HTTP response. */ @@ -1932,14 +1833,14 @@ export type LabAccountsCreateOrUpdateResponse = LabAccount & { /** * The response body as parsed JSON or XML */ - parsedBody: LabAccount; + parsedBody: LabPlan; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type LabAccountsUpdateResponse = LabAccount & { +export type LabPlansListBySubscriptionNextResponse = PagedLabPlans & { /** * The underlying HTTP response. */ @@ -1952,14 +1853,14 @@ export type LabAccountsUpdateResponse = LabAccount & { /** * The response body as parsed JSON or XML */ - parsedBody: LabAccount; + parsedBody: PagedLabPlans; }; }; /** - * Contains response data for the getRegionalAvailability operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type LabAccountsGetRegionalAvailabilityResponse = GetRegionalAvailabilityResponse & { +export type LabPlansListByResourceGroupNextResponse = PagedLabPlans & { /** * The underlying HTTP response. */ @@ -1972,14 +1873,14 @@ export type LabAccountsGetRegionalAvailabilityResponse = GetRegionalAvailability /** * The response body as parsed JSON or XML */ - parsedBody: GetRegionalAvailabilityResponse; + parsedBody: PagedLabPlans; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listByLabPlan operation. */ -export type LabAccountsListBySubscriptionNextResponse = ResponseWithContinuationLabAccount & { +export type ImagesListByLabPlanResponse = PagedImages & { /** * The underlying HTTP response. */ @@ -1992,14 +1893,14 @@ export type LabAccountsListBySubscriptionNextResponse = ResponseWithContinuation /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLabAccount; + parsedBody: PagedImages; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type LabAccountsListByResourceGroupNextResponse = ResponseWithContinuationLabAccount & { +export type ImagesGetResponse = Image & { /** * The underlying HTTP response. */ @@ -2012,14 +1913,14 @@ export type LabAccountsListByResourceGroupNextResponse = ResponseWithContinuatio /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLabAccount; + parsedBody: Image; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdate operation. */ -export type OperationsGetResponse = OperationResult & { +export type ImagesCreateOrUpdateResponse = Image & { /** * The underlying HTTP response. */ @@ -2032,14 +1933,14 @@ export type OperationsGetResponse = OperationResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationResult; + parsedBody: Image; }; }; /** - * Contains response data for the list operation. + * Contains response data for the update operation. */ -export type GalleryImagesListResponse = ResponseWithContinuationGalleryImage & { +export type ImagesUpdateResponse = Image & { /** * The underlying HTTP response. */ @@ -2052,14 +1953,14 @@ export type GalleryImagesListResponse = ResponseWithContinuationGalleryImage & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationGalleryImage; + parsedBody: Image; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByLabPlanNext operation. */ -export type GalleryImagesGetResponse = GalleryImage & { +export type ImagesListByLabPlanNextResponse = PagedImages & { /** * The underlying HTTP response. */ @@ -2072,14 +1973,14 @@ export type GalleryImagesGetResponse = GalleryImage & { /** * The response body as parsed JSON or XML */ - parsedBody: GalleryImage; + parsedBody: PagedImages; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listBySubscription operation. */ -export type GalleryImagesCreateOrUpdateResponse = GalleryImage & { +export type LabsListBySubscriptionResponse = PagedLabs & { /** * The underlying HTTP response. */ @@ -2092,14 +1993,14 @@ export type GalleryImagesCreateOrUpdateResponse = GalleryImage & { /** * The response body as parsed JSON or XML */ - parsedBody: GalleryImage; + parsedBody: PagedLabs; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByResourceGroup operation. */ -export type GalleryImagesUpdateResponse = GalleryImage & { +export type LabsListByResourceGroupResponse = PagedLabs & { /** * The underlying HTTP response. */ @@ -2112,14 +2013,14 @@ export type GalleryImagesUpdateResponse = GalleryImage & { /** * The response body as parsed JSON or XML */ - parsedBody: GalleryImage; + parsedBody: PagedLabs; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type GalleryImagesListNextResponse = ResponseWithContinuationGalleryImage & { +export type LabsGetResponse = Lab & { /** * The underlying HTTP response. */ @@ -2132,14 +2033,14 @@ export type GalleryImagesListNextResponse = ResponseWithContinuationGalleryImage /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationGalleryImage; + parsedBody: Lab; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type LabsListResponse = ResponseWithContinuationLab & { +export type LabsCreateOrUpdateResponse = Lab & { /** * The underlying HTTP response. */ @@ -2152,14 +2053,14 @@ export type LabsListResponse = ResponseWithContinuationLab & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLab; + parsedBody: Lab; }; }; /** - * Contains response data for the get operation. + * Contains response data for the update operation. */ -export type LabsGetResponse = Lab & { +export type LabsUpdateResponse = Lab & { /** * The underlying HTTP response. */ @@ -2177,9 +2078,9 @@ export type LabsGetResponse = Lab & { }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type LabsCreateOrUpdateResponse = Lab & { +export type LabsBeginCreateOrUpdateResponse = Lab & { /** * The underlying HTTP response. */ @@ -2197,9 +2098,9 @@ export type LabsCreateOrUpdateResponse = Lab & { }; /** - * Contains response data for the update operation. + * Contains response data for the beginUpdate operation. */ -export type LabsUpdateResponse = Lab & { +export type LabsBeginUpdateResponse = Lab & { /** * The underlying HTTP response. */ @@ -2217,9 +2118,9 @@ export type LabsUpdateResponse = Lab & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type LabsListNextResponse = ResponseWithContinuationLab & { +export type LabsListBySubscriptionNextResponse = PagedLabs & { /** * The underlying HTTP response. */ @@ -2232,14 +2133,14 @@ export type LabsListNextResponse = ResponseWithContinuationLab & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationLab; + parsedBody: PagedLabs; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type EnvironmentSettingsListResponse = ResponseWithContinuationEnvironmentSetting & { +export type LabsListByResourceGroupNextResponse = PagedLabs & { /** * The underlying HTTP response. */ @@ -2252,14 +2153,14 @@ export type EnvironmentSettingsListResponse = ResponseWithContinuationEnvironmen /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationEnvironmentSetting; + parsedBody: PagedLabs; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByLab operation. */ -export type EnvironmentSettingsGetResponse = EnvironmentSetting & { +export type UsersListByLabResponse = PagedUsers & { /** * The underlying HTTP response. */ @@ -2272,14 +2173,14 @@ export type EnvironmentSettingsGetResponse = EnvironmentSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentSetting; + parsedBody: PagedUsers; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type EnvironmentSettingsCreateOrUpdateResponse = EnvironmentSetting & { +export type UsersGetResponse = User & { /** * The underlying HTTP response. */ @@ -2292,14 +2193,14 @@ export type EnvironmentSettingsCreateOrUpdateResponse = EnvironmentSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentSetting; + parsedBody: User; }; }; /** - * Contains response data for the update operation. + * Contains response data for the createOrUpdate operation. */ -export type EnvironmentSettingsUpdateResponse = EnvironmentSetting & { +export type UsersCreateOrUpdateResponse = User & { /** * The underlying HTTP response. */ @@ -2312,14 +2213,14 @@ export type EnvironmentSettingsUpdateResponse = EnvironmentSetting & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentSetting; + parsedBody: User; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the update operation. */ -export type EnvironmentSettingsBeginCreateOrUpdateResponse = EnvironmentSetting & { +export type UsersUpdateResponse = User & { /** * The underlying HTTP response. */ @@ -2332,14 +2233,14 @@ export type EnvironmentSettingsBeginCreateOrUpdateResponse = EnvironmentSetting /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentSetting; + parsedBody: User; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type EnvironmentSettingsListNextResponse = ResponseWithContinuationEnvironmentSetting & { +export type UsersBeginCreateOrUpdateResponse = User & { /** * The underlying HTTP response. */ @@ -2352,14 +2253,14 @@ export type EnvironmentSettingsListNextResponse = ResponseWithContinuationEnviro /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationEnvironmentSetting; + parsedBody: User; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginUpdate operation. */ -export type EnvironmentsListResponse = ResponseWithContinuationEnvironment & { +export type UsersBeginUpdateResponse = User & { /** * The underlying HTTP response. */ @@ -2372,14 +2273,14 @@ export type EnvironmentsListResponse = ResponseWithContinuationEnvironment & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationEnvironment; + parsedBody: User; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByLabNext operation. */ -export type EnvironmentsGetResponse = Environment & { +export type UsersListByLabNextResponse = PagedUsers & { /** * The underlying HTTP response. */ @@ -2392,14 +2293,14 @@ export type EnvironmentsGetResponse = Environment & { /** * The response body as parsed JSON or XML */ - parsedBody: Environment; + parsedBody: PagedUsers; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByLab operation. */ -export type EnvironmentsCreateOrUpdateResponse = Environment & { +export type VirtualMachinesListByLabResponse = PagedVirtualMachines & { /** * The underlying HTTP response. */ @@ -2412,14 +2313,14 @@ export type EnvironmentsCreateOrUpdateResponse = Environment & { /** * The response body as parsed JSON or XML */ - parsedBody: Environment; + parsedBody: PagedVirtualMachines; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type EnvironmentsUpdateResponse = Environment & { +export type VirtualMachinesGetResponse = VirtualMachine & { /** * The underlying HTTP response. */ @@ -2432,14 +2333,14 @@ export type EnvironmentsUpdateResponse = Environment & { /** * The response body as parsed JSON or XML */ - parsedBody: Environment; + parsedBody: VirtualMachine; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByLabNext operation. */ -export type EnvironmentsListNextResponse = ResponseWithContinuationEnvironment & { +export type VirtualMachinesListByLabNextResponse = PagedVirtualMachines & { /** * The underlying HTTP response. */ @@ -2452,14 +2353,14 @@ export type EnvironmentsListNextResponse = ResponseWithContinuationEnvironment & /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationEnvironment; + parsedBody: PagedVirtualMachines; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByLab operation. */ -export type UsersListResponse = ResponseWithContinuationUser & { +export type SchedulesListByLabResponse = PagedSchedules & { /** * The underlying HTTP response. */ @@ -2472,14 +2373,14 @@ export type UsersListResponse = ResponseWithContinuationUser & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationUser; + parsedBody: PagedSchedules; }; }; /** * Contains response data for the get operation. */ -export type UsersGetResponse = User & { +export type SchedulesGetResponse = Schedule & { /** * The underlying HTTP response. */ @@ -2492,14 +2393,14 @@ export type UsersGetResponse = User & { /** * The response body as parsed JSON or XML */ - parsedBody: User; + parsedBody: Schedule; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type UsersCreateOrUpdateResponse = User & { +export type SchedulesCreateOrUpdateResponse = Schedule & { /** * The underlying HTTP response. */ @@ -2512,14 +2413,14 @@ export type UsersCreateOrUpdateResponse = User & { /** * The response body as parsed JSON or XML */ - parsedBody: User; + parsedBody: Schedule; }; }; /** * Contains response data for the update operation. */ -export type UsersUpdateResponse = User & { +export type SchedulesUpdateResponse = Schedule & { /** * The underlying HTTP response. */ @@ -2532,14 +2433,14 @@ export type UsersUpdateResponse = User & { /** * The response body as parsed JSON or XML */ - parsedBody: User; + parsedBody: Schedule; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByLabNext operation. */ -export type UsersListNextResponse = ResponseWithContinuationUser & { +export type SchedulesListByLabNextResponse = PagedSchedules & { /** * The underlying HTTP response. */ @@ -2552,6 +2453,6 @@ export type UsersListNextResponse = ResponseWithContinuationUser & { /** * The response body as parsed JSON or XML */ - parsedBody: ResponseWithContinuationUser; + parsedBody: PagedSchedules; }; }; diff --git a/sdk/labservices/arm-labservices/src/models/labAccountsMappers.ts b/sdk/labservices/arm-labservices/src/models/labAccountsMappers.ts deleted file mode 100644 index 52e28b9dc8cb..000000000000 --- a/sdk/labservices/arm-labservices/src/models/labAccountsMappers.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -export { - BaseResource, - CloudError, - CreateLabProperties, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingCreationParameters, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, - GetRegionalAvailabilityResponse, - Lab, - LabAccount, - LabAccountFragment, - LabCreationParameters, - LabFragment, - LatestOperationResult, - NetworkInterface, - ReferenceVm, - ReferenceVmCreationParameters, - ReferenceVmFragment, - RegionalAvailability, - Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettingCreationParameters, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationLabAccount, - SizeAvailability, - SizeConfigurationProperties, - SizeInfo, - User, - UserFragment, - VmStateDetails -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/labPlansMappers.ts b/sdk/labservices/arm-labservices/src/models/labPlansMappers.ts new file mode 100644 index 000000000000..82171758c96a --- /dev/null +++ b/sdk/labservices/arm-labservices/src/models/labPlansMappers.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AutoShutdownProfile, + AzureEntityResource, + BaseResource, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, + Lab, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + LabPlanUpdate, + LabUpdate, + PagedLabPlans, + Plan, + ProxyResource, + RecurrencePattern, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + SaveImageBody, + Schedule, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, + TrackedResourceUpdate, + User, + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile +} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/labsMappers.ts b/sdk/labservices/arm-labservices/src/models/labsMappers.ts index 002177ba4a9b..e8bf63b541b5 100644 --- a/sdk/labservices/arm-labservices/src/models/labsMappers.ts +++ b/sdk/labservices/arm-labservices/src/models/labsMappers.ts @@ -1,40 +1,49 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - AddUsersPayload, + AutoShutdownProfile, + AzureEntityResource, BaseResource, - CloudError, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, Lab, - LabAccount, - LabAccountFragment, - LabFragment, - LatestOperationResult, - NetworkInterface, - ReferenceVm, - ReferenceVmFragment, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + LabPlanUpdate, + LabUpdate, + PagedLabs, + Plan, + ProxyResource, + RecurrencePattern, Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationLab, - SizeConfigurationProperties, - SizeInfo, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + Schedule, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, + TrackedResourceUpdate, User, - UserFragment, - VmStateDetails + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile } from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/mappers.ts b/sdk/labservices/arm-labservices/src/models/mappers.ts index 69719c5f97b8..f25e72e2892e 100644 --- a/sdk/labservices/arm-labservices/src/models/mappers.ts +++ b/sdk/labservices/arm-labservices/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,15 +12,14 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const AddUsersPayload: msRest.CompositeMapper = { - serializedName: "AddUsersPayload", +export const TrackedResourceUpdate: msRest.CompositeMapper = { + serializedName: "TrackedResourceUpdate", type: { name: "Composite", - className: "AddUsersPayload", + className: "TrackedResourceUpdate", modelProperties: { - emailAddresses: { - required: true, - serializedName: "emailAddresses", + tags: { + serializedName: "tags", type: { name: "Sequence", element: { @@ -34,148 +33,192 @@ export const AddUsersPayload: msRest.CompositeMapper = { } }; -export const ReferenceVmCreationParameters: msRest.CompositeMapper = { - serializedName: "ReferenceVmCreationParameters", +export const AutoShutdownProfile: msRest.CompositeMapper = { + serializedName: "AutoShutdownProfile", type: { name: "Composite", - className: "ReferenceVmCreationParameters", + className: "AutoShutdownProfile", modelProperties: { - userName: { - required: true, - serializedName: "userName", + shutdownOnDisconnect: { + serializedName: "shutdownOnDisconnect", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } }, - password: { - required: true, - serializedName: "password", - type: { - name: "String" - } - } - } - } -}; - -export const ResourceSettingCreationParameters: msRest.CompositeMapper = { - serializedName: "ResourceSettingCreationParameters", - type: { - name: "Composite", - className: "ResourceSettingCreationParameters", - modelProperties: { - location: { - serializedName: "location", + shutdownWhenNotConnected: { + serializedName: "shutdownWhenNotConnected", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } }, - name: { - serializedName: "name", + shutdownOnIdle: { + serializedName: "shutdownOnIdle", type: { - name: "String" + name: "Enum", + allowedValues: [ + "None", + "UserAbsence", + "LowUsage" + ] } }, - galleryImageResourceId: { - required: true, - serializedName: "galleryImageResourceId", + disconnectDelay: { + serializedName: "disconnectDelay", type: { - name: "String" + name: "TimeSpan" } }, - size: { - serializedName: "size", + noConnectDelay: { + serializedName: "noConnectDelay", type: { - name: "String" + name: "TimeSpan" } }, - referenceVmCreationParameters: { - required: true, - serializedName: "referenceVmCreationParameters", + idleDelay: { + serializedName: "idleDelay", type: { - name: "Composite", - className: "ReferenceVmCreationParameters" + name: "TimeSpan" } } } } }; -export const EnvironmentSettingCreationParameters: msRest.CompositeMapper = { - serializedName: "EnvironmentSettingCreationParameters", +export const ConnectionProfile: msRest.CompositeMapper = { + serializedName: "ConnectionProfile", type: { name: "Composite", - className: "EnvironmentSettingCreationParameters", + className: "ConnectionProfile", modelProperties: { - resourceSettingCreationParameters: { - required: true, - serializedName: "resourceSettingCreationParameters", + webSshAccess: { + serializedName: "webSshAccess", type: { - name: "Composite", - className: "ResourceSettingCreationParameters" + name: "Enum", + allowedValues: [ + "Public", + "Private", + "None" + ] + } + }, + webRdpAccess: { + serializedName: "webRdpAccess", + type: { + name: "Enum", + allowedValues: [ + "Public", + "Private", + "None" + ] + } + }, + clientSshAccess: { + serializedName: "clientSshAccess", + type: { + name: "Enum", + allowedValues: [ + "Public", + "Private", + "None" + ] + } + }, + clientRdpAccess: { + serializedName: "clientRdpAccess", + type: { + name: "Enum", + allowedValues: [ + "Public", + "Private", + "None" + ] } } } } }; -export const LabCreationParameters: msRest.CompositeMapper = { - serializedName: "LabCreationParameters", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "LabCreationParameters", + className: "ErrorAdditionalInfo", modelProperties: { - maxUsersInLab: { - serializedName: "maxUsersInLab", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" } } } } }; -export const CreateLabProperties: msRest.CompositeMapper = { - serializedName: "CreateLabProperties", +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", type: { name: "Composite", - className: "CreateLabProperties", + className: "ErrorDetail", modelProperties: { - environmentSettingCreationParameters: { - serializedName: "environmentSettingCreationParameters", + code: { + readOnly: true, + serializedName: "code", type: { - name: "Composite", - className: "EnvironmentSettingCreationParameters" + name: "String" } }, - labCreationParameters: { - required: true, - serializedName: "labCreationParameters", + message: { + readOnly: true, + serializedName: "message", type: { - name: "Composite", - className: "LabCreationParameters" + name: "String" } }, - name: { - required: true, - serializedName: "name", + target: { + readOnly: true, + serializedName: "target", type: { name: "String" } }, - location: { - serializedName: "location", + details: { + readOnly: true, + serializedName: "details", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } } }, - tags: { - serializedName: "tags", + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -184,58 +227,53 @@ export const CreateLabProperties: msRest.CompositeMapper = { } }; -export const ResourceSet: msRest.CompositeMapper = { - serializedName: "ResourceSet", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "ResourceSet", + className: "ErrorResponse", modelProperties: { - vmResourceId: { - serializedName: "vmResourceId", - type: { - name: "String" - } - }, - resourceSettingId: { - serializedName: "resourceSettingId", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } } }; -export const NetworkInterface: msRest.CompositeMapper = { - serializedName: "NetworkInterface", +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", type: { name: "Composite", - className: "NetworkInterface", + className: "OperationDisplay", modelProperties: { - privateIpAddress: { + provider: { readOnly: true, - serializedName: "privateIpAddress", + serializedName: "provider", type: { name: "String" } }, - sshAuthority: { + resource: { readOnly: true, - serializedName: "sshAuthority", + serializedName: "resource", type: { name: "String" } }, - rdpAuthority: { + operation: { readOnly: true, - serializedName: "rdpAuthority", + serializedName: "operation", type: { name: "String" } }, - username: { + description: { readOnly: true, - serializedName: "username", + serializedName: "description", type: { name: "String" } @@ -244,50 +282,43 @@ export const NetworkInterface: msRest.CompositeMapper = { } }; -export const LatestOperationResult: msRest.CompositeMapper = { - serializedName: "LatestOperationResult", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "LatestOperationResult", + className: "Operation", modelProperties: { - status: { - readOnly: true, - serializedName: "status", - type: { - name: "String" - } - }, - errorCode: { + name: { readOnly: true, - serializedName: "errorCode", + serializedName: "name", type: { name: "String" } }, - errorMessage: { + isDataAction: { readOnly: true, - serializedName: "errorMessage", + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } }, - requestUri: { - readOnly: true, - serializedName: "requestUri", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } }, - httpMethod: { + origin: { readOnly: true, - serializedName: "httpMethod", + serializedName: "origin", type: { name: "String" } }, - operationUrl: { + actionType: { readOnly: true, - serializedName: "operationUrl", + serializedName: "actionType", type: { name: "String" } @@ -296,11 +327,11 @@ export const LatestOperationResult: msRest.CompositeMapper = { } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const OperationResult: msRest.CompositeMapper = { + serializedName: "OperationResult", type: { name: "Composite", - className: "Resource", + className: "OperationResult", modelProperties: { id: { readOnly: true, @@ -316,173 +347,147 @@ export const Resource: msRest.CompositeMapper = { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + status: { + required: true, + serializedName: "status", type: { - name: "String" + name: "Enum", + allowedValues: [ + "NotStarted", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ] } }, - location: { - serializedName: "location", + startTime: { + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - tags: { - serializedName: "tags", + endTime: { + serializedName: "endTime", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "DateTime" + } + }, + percentComplete: { + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" } } } } }; -export const Environment: msRest.CompositeMapper = { - serializedName: "Environment", +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", type: { name: "Composite", - className: "Environment", + className: "SystemData", modelProperties: { - ...Resource.type.modelProperties, - resourceSets: { - serializedName: "properties.resourceSets", - type: { - name: "Composite", - className: "ResourceSet" - } - }, - claimedByUserObjectId: { - readOnly: true, - serializedName: "properties.claimedByUserObjectId", - type: { - name: "String" - } - }, - claimedByUserPrincipalId: { - readOnly: true, - serializedName: "properties.claimedByUserPrincipalId", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - claimedByUserName: { - readOnly: true, - serializedName: "properties.claimedByUserName", - type: { - name: "String" - } - }, - isClaimed: { - readOnly: true, - serializedName: "properties.isClaimed", - type: { - name: "Boolean" - } - }, - lastKnownPowerState: { - readOnly: true, - serializedName: "properties.lastKnownPowerState", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - networkInterface: { - readOnly: true, - serializedName: "properties.networkInterface", - type: { - name: "Composite", - className: "NetworkInterface" - } - }, - totalUsage: { - readOnly: true, - serializedName: "properties.totalUsage", - type: { - name: "TimeSpan" - } - }, - passwordLastReset: { - readOnly: true, - serializedName: "properties.passwordLastReset", + createdAt: { + serializedName: "createdAt", type: { name: "DateTime" } }, - provisioningState: { - serializedName: "properties.provisioningState", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - latestOperationResult: { - readOnly: true, - serializedName: "properties.latestOperationResult", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "Composite", - className: "LatestOperationResult" + name: "DateTime" } } } } }; -export const VirtualMachineDetails: msRest.CompositeMapper = { - serializedName: "VirtualMachineDetails", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - className: "VirtualMachineDetails", + className: "Resource", modelProperties: { - provisioningState: { - readOnly: true, - serializedName: "provisioningState", - type: { - name: "String" - } - }, - rdpAuthority: { + id: { readOnly: true, - serializedName: "rdpAuthority", + serializedName: "id", type: { name: "String" } }, - sshAuthority: { + name: { readOnly: true, - serializedName: "sshAuthority", + serializedName: "name", type: { name: "String" } }, - privateIpAddress: { + type: { readOnly: true, - serializedName: "privateIpAddress", + serializedName: "type", type: { name: "String" } - }, - userName: { - readOnly: true, - serializedName: "userName", + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - lastKnownPowerState: { - readOnly: true, - serializedName: "lastKnownPowerState", + location: { + required: true, + serializedName: "location", type: { name: "String" } @@ -491,95 +496,99 @@ export const VirtualMachineDetails: msRest.CompositeMapper = { } }; -export const EnvironmentDetails: msRest.CompositeMapper = { - serializedName: "EnvironmentDetails", +export const LabPlan: msRest.CompositeMapper = { + serializedName: "LabPlan", type: { name: "Composite", - className: "EnvironmentDetails", + className: "LabPlan", modelProperties: { - name: { + ...TrackedResource.type.modelProperties, + systemData: { readOnly: true, - serializedName: "name", + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - description: { - readOnly: true, - serializedName: "description", + defaultConnectionProfile: { + serializedName: "properties.defaultConnectionProfile", type: { - name: "String" + name: "Composite", + className: "ConnectionProfile" } }, - id: { - readOnly: true, - serializedName: "id", + defaultAutoShutdownProfile: { + serializedName: "properties.defaultAutoShutdownProfile", type: { - name: "String" + name: "Composite", + className: "AutoShutdownProfile" } }, - provisioningState: { - readOnly: true, - serializedName: "provisioningState", + defaultNetworkProfile: { + serializedName: "properties.defaultNetworkProfile", type: { - name: "String" + name: "Composite", + className: "LabPlanNetworkProfile" } }, - virtualMachineDetails: { - readOnly: true, - serializedName: "virtualMachineDetails", + allowedRegions: { + serializedName: "properties.allowedRegions", type: { - name: "Composite", - className: "VirtualMachineDetails" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - latestOperationResult: { - readOnly: true, - serializedName: "latestOperationResult", + sharedGalleryId: { + serializedName: "properties.sharedGalleryId", type: { - name: "Composite", - className: "LatestOperationResult" + name: "String" } }, - environmentState: { - readOnly: true, - serializedName: "environmentState", + supportInfo: { + serializedName: "properties.supportInfo", type: { - name: "String" + name: "Composite", + className: "SupportInfo" } }, - totalUsage: { - readOnly: true, - serializedName: "totalUsage", + linkedLmsInstance: { + serializedName: "properties.linkedLmsInstance", type: { - name: "TimeSpan" + name: "String" } }, - passwordLastReset: { + provisioningState: { readOnly: true, - serializedName: "passwordLastReset", + serializedName: "properties.provisioningState", type: { - name: "DateTime" + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] } } } } }; -export const ResourceSetFragment: msRest.CompositeMapper = { - serializedName: "ResourceSetFragment", +export const LabPlanNetworkProfile: msRest.CompositeMapper = { + serializedName: "LabPlanNetworkProfile", type: { name: "Composite", - className: "ResourceSetFragment", + className: "LabPlanNetworkProfile", modelProperties: { - vmResourceId: { - serializedName: "vmResourceId", - type: { - name: "String" - } - }, - resourceSettingId: { - serializedName: "resourceSettingId", + subnetId: { + serializedName: "subnetId", type: { name: "String" } @@ -588,45 +597,32 @@ export const ResourceSetFragment: msRest.CompositeMapper = { } }; -export const EnvironmentFragment: msRest.CompositeMapper = { - serializedName: "EnvironmentFragment", +export const SupportInfo: msRest.CompositeMapper = { + serializedName: "SupportInfo", type: { name: "Composite", - className: "EnvironmentFragment", + className: "SupportInfo", modelProperties: { - ...Resource.type.modelProperties, - resourceSets: { - serializedName: "properties.resourceSets", + url: { + serializedName: "url", type: { - name: "Composite", - className: "ResourceSetFragment" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + email: { + serializedName: "email", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + phone: { + serializedName: "phone", type: { name: "String" } - } - } - } -}; - -export const EnvironmentOperationsPayload: msRest.CompositeMapper = { - serializedName: "EnvironmentOperationsPayload", - type: { - name: "Composite", - className: "EnvironmentOperationsPayload", - modelProperties: { - environmentId: { - required: true, - serializedName: "environmentId", + }, + instructions: { + serializedName: "instructions", type: { name: "String" } @@ -635,36 +631,60 @@ export const EnvironmentOperationsPayload: msRest.CompositeMapper = { } }; -export const VmStateDetails: msRest.CompositeMapper = { - serializedName: "VmStateDetails", +export const LabPlanUpdate: msRest.CompositeMapper = { + serializedName: "LabPlanUpdate", type: { name: "Composite", - className: "VmStateDetails", + className: "LabPlanUpdate", modelProperties: { - rdpAuthority: { - readOnly: true, - serializedName: "rdpAuthority", + ...TrackedResourceUpdate.type.modelProperties, + defaultConnectionProfile: { + serializedName: "properties.defaultConnectionProfile", type: { - name: "String" + name: "Composite", + className: "ConnectionProfile" } }, - sshAuthority: { - readOnly: true, - serializedName: "sshAuthority", + defaultAutoShutdownProfile: { + serializedName: "properties.defaultAutoShutdownProfile", type: { - name: "String" + name: "Composite", + className: "AutoShutdownProfile" } }, - powerState: { - readOnly: true, - serializedName: "powerState", + defaultNetworkProfile: { + serializedName: "properties.defaultNetworkProfile", + type: { + name: "Composite", + className: "LabPlanNetworkProfile" + } + }, + allowedRegions: { + serializedName: "properties.allowedRegions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + sharedGalleryId: { + serializedName: "properties.sharedGalleryId", type: { name: "String" } }, - lastKnownPowerState: { - readOnly: true, - serializedName: "lastKnownPowerState", + supportInfo: { + serializedName: "properties.supportInfo", + type: { + name: "Composite", + className: "SupportInfo" + } + }, + linkedLmsInstance: { + serializedName: "properties.linkedLmsInstance", type: { name: "String" } @@ -673,36 +693,49 @@ export const VmStateDetails: msRest.CompositeMapper = { } }; -export const ReferenceVm: msRest.CompositeMapper = { - serializedName: "ReferenceVm", +export const SaveImageBody: msRest.CompositeMapper = { + serializedName: "SaveImageBody", type: { name: "Composite", - className: "ReferenceVm", + className: "SaveImageBody", modelProperties: { - userName: { - required: true, - serializedName: "userName", + name: { + serializedName: "name", type: { name: "String" } }, - password: { - serializedName: "password", + labVirtualMachineId: { + serializedName: "labVirtualMachineId", type: { name: "String" } - }, - vmStateDetails: { - readOnly: true, - serializedName: "vmStateDetails", - type: { - name: "Composite", - className: "VmStateDetails" - } - }, - vmResourceId: { + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { readOnly: true, - serializedName: "vmResourceId", + serializedName: "etag", type: { name: "String" } @@ -711,343 +744,410 @@ export const ReferenceVm: msRest.CompositeMapper = { } }; -export const ResourceSettings: msRest.CompositeMapper = { - serializedName: "ResourceSettings", +export const Image: msRest.CompositeMapper = { + serializedName: "Image", type: { name: "Composite", - className: "ResourceSettings", + className: "Image", modelProperties: { - id: { + ...ProxyResource.type.modelProperties, + systemData: { readOnly: true, - serializedName: "id", + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - galleryImageResourceId: { - serializedName: "galleryImageResourceId", + enabledState: { + serializedName: "properties.enabledState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } }, - imageName: { + provisioningState: { readOnly: true, - serializedName: "imageName", + serializedName: "properties.provisioningState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] } }, - size: { - serializedName: "size", + displayName: { + readOnly: true, + serializedName: "properties.displayName", type: { name: "String" } }, - cores: { + description: { readOnly: true, - serializedName: "cores", + serializedName: "properties.description", type: { - name: "Number" + name: "String" } }, - referenceVm: { - required: true, - serializedName: "referenceVm", + iconUrl: { + readOnly: true, + serializedName: "properties.iconUrl", type: { - name: "Composite", - className: "ReferenceVm" + name: "String" } - } - } - } -}; - -export const EnvironmentSetting: msRest.CompositeMapper = { - serializedName: "EnvironmentSetting", - type: { - name: "Composite", - className: "EnvironmentSetting", - modelProperties: { - ...Resource.type.modelProperties, - publishingState: { + }, + author: { readOnly: true, - serializedName: "properties.publishingState", + serializedName: "properties.author", type: { name: "String" } }, - configurationState: { - serializedName: "properties.configurationState", + osType: { + readOnly: true, + serializedName: "properties.osType", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Windows", + "Linux" + ] } }, - description: { - serializedName: "properties.description", + plan: { + readOnly: true, + serializedName: "properties.plan", type: { name: "String" } }, - title: { - serializedName: "properties.title", + termsStatus: { + readOnly: true, + serializedName: "properties.termsStatus", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } }, - resourceSettings: { - required: true, - serializedName: "properties.resourceSettings", + offer: { + readOnly: true, + serializedName: "properties.offer", type: { - name: "Composite", - className: "ResourceSettings" + name: "String" } }, - lastChanged: { + publisher: { readOnly: true, - serializedName: "properties.lastChanged", + serializedName: "properties.publisher", type: { - name: "DateTime" + name: "String" } }, - lastPublished: { + sku: { readOnly: true, - serializedName: "properties.lastPublished", + serializedName: "properties.sku", type: { - name: "DateTime" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + version: { + readOnly: true, + serializedName: "properties.version", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + sharedGalleryId: { + readOnly: true, + serializedName: "properties.sharedGalleryId", type: { name: "String" } }, - latestOperationResult: { + availableRegions: { + serializedName: "properties.availableRegions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + osState: { readOnly: true, - serializedName: "properties.latestOperationResult", + serializedName: "properties.osState", type: { - name: "Composite", - className: "LatestOperationResult" + name: "Enum", + allowedValues: [ + "Generalized", + "Specialized" + ] } } } } }; -export const ReferenceVmFragment: msRest.CompositeMapper = { - serializedName: "ReferenceVmFragment", +export const ImageUpdate: msRest.CompositeMapper = { + serializedName: "ImageUpdate", type: { name: "Composite", - className: "ReferenceVmFragment", + className: "ImageUpdate", modelProperties: { - userName: { - serializedName: "userName", + enabledState: { + serializedName: "properties.enabledState", type: { - name: "String" - } - }, - password: { - serializedName: "password", - type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } } } } }; -export const ResourceSettingsFragment: msRest.CompositeMapper = { - serializedName: "ResourceSettingsFragment", +export const LabNetworkProfile: msRest.CompositeMapper = { + serializedName: "LabNetworkProfile", type: { name: "Composite", - className: "ResourceSettingsFragment", + className: "LabNetworkProfile", modelProperties: { - galleryImageResourceId: { - serializedName: "galleryImageResourceId", + subnetId: { + serializedName: "subnetId", type: { name: "String" } }, - size: { - serializedName: "size", + loadBalancerId: { + serializedName: "loadBalancerId", type: { name: "String" } }, - referenceVm: { - serializedName: "referenceVm", + publicIpId: { + serializedName: "publicIpId", type: { - name: "Composite", - className: "ReferenceVmFragment" + name: "String" } } } } }; -export const EnvironmentSettingFragment: msRest.CompositeMapper = { - serializedName: "EnvironmentSettingFragment", +export const Lab: msRest.CompositeMapper = { + serializedName: "Lab", type: { name: "Composite", - className: "EnvironmentSettingFragment", + className: "Lab", modelProperties: { - ...Resource.type.modelProperties, - configurationState: { - serializedName: "properties.configurationState", + ...TrackedResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - description: { - serializedName: "properties.description", + autoShutdownProfile: { + serializedName: "properties.autoShutdownProfile", + type: { + name: "Composite", + className: "AutoShutdownProfile" + } + }, + connectionProfile: { + serializedName: "properties.connectionProfile", + type: { + name: "Composite", + className: "ConnectionProfile" + } + }, + virtualMachineProfile: { + serializedName: "properties.virtualMachineProfile", + type: { + name: "Composite", + className: "VirtualMachineProfile" + } + }, + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "SecurityProfile" + } + }, + rosterProfile: { + serializedName: "properties.rosterProfile", + type: { + name: "Composite", + className: "RosterProfile" + } + }, + labPlanId: { + serializedName: "properties.labPlanId", type: { name: "String" } }, title: { serializedName: "properties.title", + constraints: { + MaxLength: 120, + MinLength: 1 + }, type: { name: "String" } }, - resourceSettings: { - serializedName: "properties.resourceSettings", + description: { + serializedName: "properties.description", type: { - name: "Composite", - className: "ResourceSettingsFragment" + name: "String" } }, provisioningState: { + readOnly: true, serializedName: "properties.provisioningState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "LabNetworkProfile" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Draft", + "Publishing", + "Scaling", + "Syncing", + "Published" + ] } } } } }; -export const SizeInfo: msRest.CompositeMapper = { - serializedName: "SizeInfo", +export const ImageReference: msRest.CompositeMapper = { + serializedName: "ImageReference", type: { name: "Composite", - className: "SizeInfo", + className: "ImageReference", modelProperties: { - computeSize: { - serializedName: "computeSize", + id: { + serializedName: "id", type: { name: "String" } }, - price: { - serializedName: "price", + offer: { + serializedName: "offer", type: { - name: "Number" + name: "String" } }, - numberOfCores: { - serializedName: "numberOfCores", + publisher: { + serializedName: "publisher", type: { - name: "Number" + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" } }, - memory: { - serializedName: "memory", + version: { + serializedName: "version", type: { - name: "Number" + name: "String" + } + }, + exactVersion: { + readOnly: true, + serializedName: "exactVersion", + type: { + name: "String" } } } } }; -export const EnvironmentSize: msRest.CompositeMapper = { - serializedName: "EnvironmentSize", +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", type: { name: "Composite", - className: "EnvironmentSize", + className: "Sku", modelProperties: { name: { + required: true, serializedName: "name", type: { name: "String" } }, - vmSizes: { - serializedName: "vmSizes", + tier: { + serializedName: "tier", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SizeInfo" - } - } - } - }, - maxPrice: { - readOnly: true, - serializedName: "maxPrice", - type: { - name: "Number" - } - }, - minNumberOfCores: { - readOnly: true, - serializedName: "minNumberOfCores", - type: { - name: "Number" + name: "Enum", + allowedValues: [ + "Free", + "Basic", + "Standard", + "Premium" + ] } }, - minMemory: { - readOnly: true, - serializedName: "minMemory", - type: { - name: "Number" - } - } - } - } -}; - -export const SizeInfoFragment: msRest.CompositeMapper = { - serializedName: "SizeInfoFragment", - type: { - name: "Composite", - className: "SizeInfoFragment", - modelProperties: { - computeSize: { - serializedName: "computeSize", + size: { + serializedName: "size", type: { name: "String" } }, - price: { - serializedName: "price", + family: { + serializedName: "family", type: { - name: "Number" - } - }, - numberOfCores: { - serializedName: "numberOfCores", - type: { - name: "Number" + name: "String" } }, - memory: { - serializedName: "memory", + capacity: { + serializedName: "capacity", type: { name: "Number" } @@ -1056,66 +1156,41 @@ export const SizeInfoFragment: msRest.CompositeMapper = { } }; -export const EnvironmentSizeFragment: msRest.CompositeMapper = { - serializedName: "EnvironmentSizeFragment", +export const VirtualMachineAdditionalCapabilities: msRest.CompositeMapper = { + serializedName: "VirtualMachineAdditionalCapabilities", type: { name: "Composite", - className: "EnvironmentSizeFragment", + className: "VirtualMachineAdditionalCapabilities", modelProperties: { - name: { - serializedName: "name", + installGpuDrivers: { + serializedName: "installGpuDrivers", type: { - name: "String" - } - }, - vmSizes: { - serializedName: "vmSizes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SizeInfoFragment" - } - } + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } } } } }; -export const GalleryImageReference: msRest.CompositeMapper = { - serializedName: "GalleryImageReference", +export const Credentials: msRest.CompositeMapper = { + serializedName: "Credentials", type: { name: "Composite", - className: "GalleryImageReference", + className: "Credentials", modelProperties: { - offer: { - serializedName: "offer", - type: { - name: "String" - } - }, - publisher: { - serializedName: "publisher", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "String" - } - }, - osType: { - serializedName: "osType", + username: { + required: true, + serializedName: "username", type: { name: "String" } }, - version: { - serializedName: "version", + password: { + serializedName: "password", type: { name: "String" } @@ -1124,171 +1199,152 @@ export const GalleryImageReference: msRest.CompositeMapper = { } }; -export const GalleryImage: msRest.CompositeMapper = { - serializedName: "GalleryImage", +export const VirtualMachineProfile: msRest.CompositeMapper = { + serializedName: "VirtualMachineProfile", type: { name: "Composite", - className: "GalleryImage", + className: "VirtualMachineProfile", modelProperties: { - ...Resource.type.modelProperties, - author: { - readOnly: true, - serializedName: "properties.author", - type: { - name: "String" - } - }, - createdDate: { - readOnly: true, - serializedName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - description: { - readOnly: true, - serializedName: "properties.description", + createOption: { + required: true, + serializedName: "createOption", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Image", + "TemplateVM" + ] } }, imageReference: { - readOnly: true, - serializedName: "properties.imageReference", + required: true, + serializedName: "imageReference", type: { name: "Composite", - className: "GalleryImageReference" + className: "ImageReference" } }, - icon: { + osType: { readOnly: true, - serializedName: "properties.icon", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "properties.isEnabled", + serializedName: "osType", type: { - name: "Boolean" + name: "Enum", + allowedValues: [ + "Windows", + "Linux" + ] } }, - isOverride: { - serializedName: "properties.isOverride", + sku: { + required: true, + serializedName: "sku", type: { - name: "Boolean" + name: "Composite", + className: "Sku" } }, - planId: { - readOnly: true, - serializedName: "properties.planId", + additionalCapabilities: { + serializedName: "additionalCapabilities", type: { - name: "String" + name: "Composite", + className: "VirtualMachineAdditionalCapabilities" } }, - isPlanAuthorized: { - serializedName: "properties.isPlanAuthorized", + usageQuota: { + required: true, + serializedName: "usageQuota", type: { - name: "Boolean" + name: "TimeSpan" } }, - provisioningState: { - serializedName: "properties.provisioningState", + useSharedPassword: { + serializedName: "useSharedPassword", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + adminUser: { + required: true, + serializedName: "adminUser", type: { - name: "String" + name: "Composite", + className: "Credentials" } }, - latestOperationResult: { - readOnly: true, - serializedName: "properties.latestOperationResult", + nonAdminUser: { + serializedName: "nonAdminUser", type: { name: "Composite", - className: "LatestOperationResult" + className: "Credentials" } } } } }; -export const GalleryImageFragment: msRest.CompositeMapper = { - serializedName: "GalleryImageFragment", +export const SecurityProfile: msRest.CompositeMapper = { + serializedName: "SecurityProfile", type: { name: "Composite", - className: "GalleryImageFragment", + className: "SecurityProfile", modelProperties: { - ...Resource.type.modelProperties, - isEnabled: { - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - isOverride: { - serializedName: "properties.isOverride", - type: { - name: "Boolean" - } - }, - isPlanAuthorized: { - serializedName: "properties.isPlanAuthorized", - type: { - name: "Boolean" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", + registrationCode: { + readOnly: true, + serializedName: "registrationCode", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + openAccess: { + serializedName: "openAccess", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } } } } }; -export const GalleryImageReferenceFragment: msRest.CompositeMapper = { - serializedName: "GalleryImageReferenceFragment", +export const RosterProfile: msRest.CompositeMapper = { + serializedName: "RosterProfile", type: { name: "Composite", - className: "GalleryImageReferenceFragment", + className: "RosterProfile", modelProperties: { - offer: { - serializedName: "offer", + activeDirectoryGroupId: { + serializedName: "activeDirectoryGroupId", type: { name: "String" } }, - publisher: { - serializedName: "publisher", + ltiContextId: { + serializedName: "ltiContextId", type: { name: "String" } }, - sku: { - serializedName: "sku", + lmsInstance: { + serializedName: "lmsInstance", type: { name: "String" } }, - osType: { - serializedName: "osType", + ltiClientId: { + serializedName: "ltiClientId", type: { name: "String" } }, - version: { - serializedName: "version", + ltiRosterEndpoint: { + serializedName: "ltiRosterEndpoint", type: { name: "String" } @@ -1297,619 +1353,390 @@ export const GalleryImageReferenceFragment: msRest.CompositeMapper = { } }; -export const GetEnvironmentResponse: msRest.CompositeMapper = { - serializedName: "GetEnvironmentResponse", +export const LabUpdate: msRest.CompositeMapper = { + serializedName: "LabUpdate", type: { name: "Composite", - className: "GetEnvironmentResponse", + className: "LabUpdate", modelProperties: { - environment: { - readOnly: true, - serializedName: "environment", + ...TrackedResourceUpdate.type.modelProperties, + autoShutdownProfile: { + serializedName: "properties.autoShutdownProfile", type: { name: "Composite", - className: "EnvironmentDetails" + className: "AutoShutdownProfile" } - } - } - } -}; - -export const GetPersonalPreferencesResponse: msRest.CompositeMapper = { - serializedName: "GetPersonalPreferencesResponse", - type: { - name: "Composite", - className: "GetPersonalPreferencesResponse", - modelProperties: { - id: { - serializedName: "id", + }, + connectionProfile: { + serializedName: "properties.connectionProfile", type: { - name: "String" + name: "Composite", + className: "ConnectionProfile" } }, - favoriteLabResourceIds: { - serializedName: "favoriteLabResourceIds", + virtualMachineProfile: { + serializedName: "properties.virtualMachineProfile", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "VirtualMachineProfile" } - } - } - } -}; - -export const SizeAvailability: msRest.CompositeMapper = { - serializedName: "SizeAvailability", - type: { - name: "Composite", - className: "SizeAvailability", - modelProperties: { - sizeCategory: { - serializedName: "sizeCategory", + }, + securityProfile: { + serializedName: "properties.securityProfile", type: { - name: "String" + name: "Composite", + className: "SecurityProfile" } }, - isAvailable: { - serializedName: "isAvailable", + rosterProfile: { + serializedName: "properties.rosterProfile", type: { - name: "Boolean" + name: "Composite", + className: "RosterProfile" } - } - } - } -}; - -export const RegionalAvailability: msRest.CompositeMapper = { - serializedName: "RegionalAvailability", - type: { - name: "Composite", - className: "RegionalAvailability", - modelProperties: { - region: { - serializedName: "region", + }, + labPlanId: { + serializedName: "properties.labPlanId", type: { name: "String" } }, - sizeAvailabilities: { - serializedName: "sizeAvailabilities", + title: { + serializedName: "properties.title", + constraints: { + MaxLength: 120, + MinLength: 1 + }, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SizeAvailability" - } - } + name: "String" } - } - } - } -}; - -export const GetRegionalAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "GetRegionalAvailabilityResponse", - type: { - name: "Composite", - className: "GetRegionalAvailabilityResponse", - modelProperties: { - regionalAvailability: { - serializedName: "regionalAvailability", + }, + description: { + serializedName: "properties.description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegionalAvailability" - } - } + name: "String" } } } } }; -export const Lab: msRest.CompositeMapper = { - serializedName: "Lab", +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", type: { name: "Composite", - className: "Lab", + className: "Identity", modelProperties: { - ...Resource.type.modelProperties, - maxUsersInLab: { - serializedName: "properties.maxUsersInLab", - type: { - name: "Number" - } - }, - userQuota: { - readOnly: true, - serializedName: "properties.userQuota", - type: { - name: "Number" - } - }, - invitationCode: { - readOnly: true, - serializedName: "properties.invitationCode", - type: { - name: "String" - } - }, - createdByObjectId: { - readOnly: true, - serializedName: "properties.createdByObjectId", - type: { - name: "String" - } - }, - usageQuota: { - serializedName: "properties.usageQuota", - type: { - name: "TimeSpan" - } - }, - userAccessMode: { - serializedName: "properties.userAccessMode", - type: { - name: "String" - } - }, - createdByUserPrincipalName: { + principalId: { readOnly: true, - serializedName: "properties.createdByUserPrincipalName", + serializedName: "principalId", type: { name: "String" } }, - createdDate: { + tenantId: { readOnly: true, - serializedName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", + serializedName: "tenantId", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", - type: { - name: "String" - } - }, - latestOperationResult: { - readOnly: true, - serializedName: "properties.latestOperationResult", + type: { + serializedName: "type", type: { - name: "Composite", - className: "LatestOperationResult" + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] } } } } }; -export const SizeConfigurationProperties: msRest.CompositeMapper = { - serializedName: "SizeConfigurationProperties", +export const ResourceModelWithAllowedPropertySetIdentity: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_identity", type: { name: "Composite", - className: "SizeConfigurationProperties", + className: "ResourceModelWithAllowedPropertySetIdentity", modelProperties: { - environmentSizes: { - serializedName: "environmentSizes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentSize" - } - } - } - } + ...Identity.type.modelProperties } } }; -export const LabAccount: msRest.CompositeMapper = { - serializedName: "LabAccount", +export const ResourceModelWithAllowedPropertySetSku: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_sku", type: { name: "Composite", - className: "LabAccount", + className: "ResourceModelWithAllowedPropertySetSku", modelProperties: { - ...Resource.type.modelProperties, - sizeConfiguration: { - readOnly: true, - serializedName: "properties.sizeConfiguration", + ...Sku.type.modelProperties + } + } +}; + +export const Plan: msRest.CompositeMapper = { + serializedName: "Plan", + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + required: true, + serializedName: "name", type: { - name: "Composite", - className: "SizeConfigurationProperties" + name: "String" } }, - enabledRegionSelection: { - serializedName: "properties.enabledRegionSelection", + publisher: { + required: true, + serializedName: "publisher", type: { - name: "Boolean" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + product: { + required: true, + serializedName: "product", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + promotionCode: { + serializedName: "promotionCode", type: { name: "String" } }, - latestOperationResult: { - readOnly: true, - serializedName: "properties.latestOperationResult", + version: { + serializedName: "version", type: { - name: "Composite", - className: "LatestOperationResult" + name: "String" } } } } }; -export const LabAccountFragment: msRest.CompositeMapper = { - serializedName: "LabAccountFragment", +export const ResourceModelWithAllowedPropertySetPlan: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_plan", type: { name: "Composite", - className: "LabAccountFragment", + className: "ResourceModelWithAllowedPropertySetPlan", modelProperties: { - ...Resource.type.modelProperties, - enabledRegionSelection: { - serializedName: "properties.enabledRegionSelection", - type: { - name: "Boolean" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", - type: { - name: "String" - } - } + ...Plan.type.modelProperties } } }; -export const LabDetails: msRest.CompositeMapper = { - serializedName: "LabDetails", +export const ResourceModelWithAllowedPropertySet: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet", type: { name: "Composite", - className: "LabDetails", + className: "ResourceModelWithAllowedPropertySet", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, id: { + readOnly: true, serializedName: "id", type: { name: "String" } }, - usageQuota: { + name: { readOnly: true, - serializedName: "usageQuota", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const LabFragment: msRest.CompositeMapper = { - serializedName: "LabFragment", - type: { - name: "Composite", - className: "LabFragment", - modelProperties: { - ...Resource.type.modelProperties, - maxUsersInLab: { - serializedName: "properties.maxUsersInLab", + serializedName: "name", type: { - name: "Number" + name: "String" } }, - usageQuota: { - serializedName: "properties.usageQuota", + type: { + readOnly: true, + serializedName: "type", type: { - name: "TimeSpan" + name: "String" } }, - userAccessMode: { - serializedName: "properties.userAccessMode", + location: { + serializedName: "location", type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + managedBy: { + serializedName: "managedBy", type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + kind: { + serializedName: "kind", + constraints: { + Pattern: /^[-\w\._,\(\)]+$/ + }, type: { name: "String" } - } - } - } -}; - -export const ListEnvironmentsPayload: msRest.CompositeMapper = { - serializedName: "ListEnvironmentsPayload", - type: { - name: "Composite", - className: "ListEnvironmentsPayload", - modelProperties: { - labId: { - serializedName: "labId", + }, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } - } - } - } -}; - -export const ListEnvironmentsResponse: msRest.CompositeMapper = { - serializedName: "ListEnvironmentsResponse", - type: { - name: "Composite", - className: "ListEnvironmentsResponse", - modelProperties: { - environments: { - serializedName: "environments", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentDetails" - } - } - } - } - } - } -}; - -export const ListLabsResponse: msRest.CompositeMapper = { - serializedName: "ListLabsResponse", - type: { - name: "Composite", - className: "ListLabsResponse", - modelProperties: { - labs: { - serializedName: "labs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LabDetails" - } - } - } - } - } - } -}; - -export const OperationBatchStatusPayload: msRest.CompositeMapper = { - serializedName: "OperationBatchStatusPayload", - type: { - name: "Composite", - className: "OperationBatchStatusPayload", - modelProperties: { - urls: { - required: true, - serializedName: "urls", + }, + tags: { + serializedName: "tags", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { name: "String" } } } - } - } - } -}; - -export const OperationBatchStatusResponseItem: msRest.CompositeMapper = { - serializedName: "OperationBatchStatusResponseItem", - type: { - name: "Composite", - className: "OperationBatchStatusResponseItem", - modelProperties: { - operationUrl: { - readOnly: true, - serializedName: "operationUrl", + }, + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity" } }, - status: { - readOnly: true, - serializedName: "status", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku" } - } - } - } -}; - -export const OperationBatchStatusResponse: msRest.CompositeMapper = { - serializedName: "OperationBatchStatusResponse", - type: { - name: "Composite", - className: "OperationBatchStatusResponse", - modelProperties: { - items: { - readOnly: true, - serializedName: "items", + }, + plan: { + serializedName: "plan", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationBatchStatusResponseItem" - } - } + name: "Composite", + className: "ResourceModelWithAllowedPropertySetPlan" } } } } }; -export const OperationError: msRest.CompositeMapper = { - serializedName: "OperationError", +export const User: msRest.CompositeMapper = { + serializedName: "User", type: { name: "Composite", - className: "OperationError", + className: "User", modelProperties: { - code: { - serializedName: "code", + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - message: { - serializedName: "message", + additionalUsageQuota: { + serializedName: "properties.additionalUsageQuota", type: { - name: "String" + name: "TimeSpan" } - } - } - } -}; - -export const OperationMetadataDisplay: msRest.CompositeMapper = { - serializedName: "OperationMetadataDisplay", - type: { - name: "Composite", - className: "OperationMetadataDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] } }, - resource: { - serializedName: "resource", + displayName: { + readOnly: true, + serializedName: "properties.displayName", type: { name: "String" } }, - operation: { - serializedName: "operation", + email: { + required: true, + serializedName: "properties.email", type: { name: "String" } }, - description: { - serializedName: "description", + registrationState: { + readOnly: true, + serializedName: "properties.registrationState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Registered", + "NotRegistered" + ] } - } - } - } -}; - -export const OperationMetadata: msRest.CompositeMapper = { - serializedName: "OperationMetadata", - type: { - name: "Composite", - className: "OperationMetadata", - modelProperties: { - name: { - serializedName: "name", + }, + invitationState: { + readOnly: true, + serializedName: "properties.invitationState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "NotSent", + "Sending", + "Sent", + "Failed" + ] } }, - display: { - serializedName: "display", + invitationSent: { + readOnly: true, + serializedName: "properties.invitationSent", type: { - name: "Composite", - className: "OperationMetadataDisplay" + name: "DateTime" + } + }, + totalUsage: { + readOnly: true, + serializedName: "properties.totalUsage", + type: { + name: "TimeSpan" } } } } }; -export const OperationResult: msRest.CompositeMapper = { - serializedName: "OperationResult", +export const UserUpdate: msRest.CompositeMapper = { + serializedName: "UserUpdate", type: { name: "Composite", - className: "OperationResult", + className: "UserUpdate", modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - }, - error: { - serializedName: "error", + additionalUsageQuota: { + serializedName: "properties.additionalUsageQuota", type: { - name: "Composite", - className: "OperationError" + name: "TimeSpan" } } } } }; -export const OperationStatusPayload: msRest.CompositeMapper = { - serializedName: "OperationStatusPayload", +export const InviteBody: msRest.CompositeMapper = { + serializedName: "InviteBody", type: { name: "Composite", - className: "OperationStatusPayload", + className: "InviteBody", modelProperties: { - operationUrl: { - required: true, - serializedName: "operationUrl", + text: { + serializedName: "text", type: { name: "String" } @@ -1918,103 +1745,156 @@ export const OperationStatusPayload: msRest.CompositeMapper = { } }; -export const OperationStatusResponse: msRest.CompositeMapper = { - serializedName: "OperationStatusResponse", +export const VirtualMachineConnectionProfile: msRest.CompositeMapper = { + serializedName: "VirtualMachineConnectionProfile", type: { name: "Composite", - className: "OperationStatusResponse", + className: "VirtualMachineConnectionProfile", modelProperties: { - status: { + privateIpAddress: { readOnly: true, - serializedName: "status", + serializedName: "privateIpAddress", type: { name: "String" } - } - } - } -}; - -export const PersonalPreferencesOperationsPayload: msRest.CompositeMapper = { - serializedName: "PersonalPreferencesOperationsPayload", - type: { - name: "Composite", - className: "PersonalPreferencesOperationsPayload", - modelProperties: { - labAccountResourceId: { - serializedName: "labAccountResourceId", + }, + sshAuthority: { + readOnly: true, + serializedName: "sshAuthority", type: { name: "String" } }, - addRemove: { - serializedName: "addRemove", + sshInBrowserUrl: { + readOnly: true, + serializedName: "sshInBrowserUrl", type: { name: "String" } }, - labResourceId: { - serializedName: "labResourceId", + rdpAuthority: { + readOnly: true, + serializedName: "rdpAuthority", type: { name: "String" } - } - } - } -}; - -export const PublishPayload: msRest.CompositeMapper = { - serializedName: "PublishPayload", - type: { - name: "Composite", - className: "PublishPayload", - modelProperties: { - useExistingImage: { - serializedName: "useExistingImage", + }, + rdpInBrowserUrl: { + readOnly: true, + serializedName: "rdpInBrowserUrl", type: { - name: "Boolean" + name: "String" + } + }, + adminUsername: { + readOnly: true, + serializedName: "adminUsername", + type: { + name: "String" + } + }, + nonAdminUsername: { + readOnly: true, + serializedName: "nonAdminUsername", + type: { + name: "String" } } } } }; -export const RegisterPayload: msRest.CompositeMapper = { - serializedName: "RegisterPayload", +export const VirtualMachine: msRest.CompositeMapper = { + serializedName: "VirtualMachine", type: { name: "Composite", - className: "RegisterPayload", + className: "VirtualMachine", modelProperties: { - registrationCode: { - serializedName: "registrationCode", + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Stopped", + "Starting", + "Running", + "Stopping", + "ResettingPassword", + "Reimaging", + "Redeploying" + ] + } + }, + connectionProfile: { + readOnly: true, + serializedName: "properties.connectionProfile", + type: { + name: "Composite", + className: "VirtualMachineConnectionProfile" + } + }, + claimedByUserId: { + readOnly: true, + serializedName: "properties.claimedByUserId", type: { name: "String" } + }, + vmType: { + readOnly: true, + serializedName: "properties.vmType", + type: { + name: "Enum", + allowedValues: [ + "User", + "Template" + ] + } } } } }; -export const ResetPasswordPayload: msRest.CompositeMapper = { - serializedName: "ResetPasswordPayload", +export const ResetPasswordBody: msRest.CompositeMapper = { + serializedName: "ResetPasswordBody", type: { name: "Composite", - className: "ResetPasswordPayload", + className: "ResetPasswordBody", modelProperties: { - environmentId: { - required: true, - serializedName: "environmentId", - type: { - name: "String" - } - }, username: { + required: true, serializedName: "username", type: { name: "String" } }, password: { + required: true, serializedName: "password", type: { name: "String" @@ -2024,109 +1904,174 @@ export const ResetPasswordPayload: msRest.CompositeMapper = { } }; -export const SizeConfigurationPropertiesFragment: msRest.CompositeMapper = { - serializedName: "SizeConfigurationPropertiesFragment", +export const Schedule: msRest.CompositeMapper = { + serializedName: "Schedule", type: { name: "Composite", - className: "SizeConfigurationPropertiesFragment", + className: "Schedule", modelProperties: { - environmentSizes: { - serializedName: "environmentSizes", + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentSizeFragment" - } - } + name: "Composite", + className: "SystemData" } - } - } - } -}; - -export const User: msRest.CompositeMapper = { - serializedName: "User", - type: { - name: "Composite", - className: "User", - modelProperties: { - ...Resource.type.modelProperties, - email: { - readOnly: true, - serializedName: "properties.email", + }, + startAt: { + serializedName: "properties.startAt", type: { - name: "String" + name: "DateTime" } }, - familyName: { - readOnly: true, - serializedName: "properties.familyName", + stopAt: { + serializedName: "properties.stopAt", type: { - name: "String" + name: "DateTime" } }, - givenName: { - readOnly: true, - serializedName: "properties.givenName", + recurrencePattern: { + serializedName: "properties.recurrencePattern", type: { - name: "String" + name: "Composite", + className: "RecurrencePattern" } }, - tenantId: { - readOnly: true, - serializedName: "properties.tenantId", + timeZoneId: { + serializedName: "properties.timeZoneId", + constraints: { + MaxLength: 50 + }, type: { name: "String" } }, - totalUsage: { - readOnly: true, - serializedName: "properties.totalUsage", + notes: { + serializedName: "properties.notes", + constraints: { + MaxLength: 1000 + }, type: { - name: "TimeSpan" + name: "String" } }, provisioningState: { + readOnly: true, serializedName: "properties.provisioningState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ] + } + } + } + } +}; + +export const RecurrencePattern: msRest.CompositeMapper = { + serializedName: "RecurrencePattern", + type: { + name: "Composite", + className: "RecurrencePattern", + modelProperties: { + frequency: { + required: true, + serializedName: "frequency", + type: { + name: "Enum", + allowedValues: [ + "Daily", + "Weekly" + ] } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + weekDays: { + serializedName: "weekDays", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + } + } } }, - latestOperationResult: { - readOnly: true, - serializedName: "properties.latestOperationResult", + interval: { + serializedName: "interval", + constraints: { + InclusiveMaximum: 365, + InclusiveMinimum: 1 + }, type: { - name: "Composite", - className: "LatestOperationResult" + name: "Number" + } + }, + expirationDate: { + required: true, + serializedName: "expirationDate", + type: { + name: "Date" } } } } }; -export const UserFragment: msRest.CompositeMapper = { - serializedName: "UserFragment", +export const ScheduleUpdate: msRest.CompositeMapper = { + serializedName: "ScheduleUpdate", type: { name: "Composite", - className: "UserFragment", + className: "ScheduleUpdate", modelProperties: { - ...Resource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", + startAt: { + serializedName: "properties.startAt", + type: { + name: "DateTime" + } + }, + stopAt: { + serializedName: "properties.stopAt", + type: { + name: "DateTime" + } + }, + recurrencePattern: { + serializedName: "properties.recurrencePattern", + type: { + name: "Composite", + className: "RecurrencePattern" + } + }, + timeZoneId: { + serializedName: "properties.timeZoneId", + constraints: { + MaxLength: 50 + }, type: { name: "String" } }, - uniqueIdentifier: { - serializedName: "properties.uniqueIdentifier", + notes: { + serializedName: "properties.notes", + constraints: { + MaxLength: 1000 + }, type: { name: "String" } @@ -2135,20 +2080,21 @@ export const UserFragment: msRest.CompositeMapper = { } }; -export const ProviderOperationResult: msRest.CompositeMapper = { - serializedName: "ProviderOperationResult", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "ProviderOperationResult", + className: "OperationListResult", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationMetadata" + className: "Operation" } } } @@ -2164,25 +2110,27 @@ export const ProviderOperationResult: msRest.CompositeMapper = { } }; -export const ResponseWithContinuationLabAccount: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_LabAccount_", +export const PagedLabPlans: msRest.CompositeMapper = { + serializedName: "PagedLabPlans", type: { name: "Composite", - className: "ResponseWithContinuationLabAccount", + className: "PagedLabPlans", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LabAccount" + className: "LabPlan" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2192,25 +2140,27 @@ export const ResponseWithContinuationLabAccount: msRest.CompositeMapper = { } }; -export const ResponseWithContinuationGalleryImage: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_GalleryImage_", +export const PagedImages: msRest.CompositeMapper = { + serializedName: "PagedImages", type: { name: "Composite", - className: "ResponseWithContinuationGalleryImage", + className: "PagedImages", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "GalleryImage" + className: "Image" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2220,13 +2170,14 @@ export const ResponseWithContinuationGalleryImage: msRest.CompositeMapper = { } }; -export const ResponseWithContinuationLab: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_Lab_", +export const PagedLabs: msRest.CompositeMapper = { + serializedName: "PagedLabs", type: { name: "Composite", - className: "ResponseWithContinuationLab", + className: "PagedLabs", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", @@ -2239,6 +2190,7 @@ export const ResponseWithContinuationLab: msRest.CompositeMapper = { } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2248,25 +2200,27 @@ export const ResponseWithContinuationLab: msRest.CompositeMapper = { } }; -export const ResponseWithContinuationEnvironmentSetting: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_EnvironmentSetting_", +export const PagedUsers: msRest.CompositeMapper = { + serializedName: "PagedUsers", type: { name: "Composite", - className: "ResponseWithContinuationEnvironmentSetting", + className: "PagedUsers", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EnvironmentSetting" + className: "User" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2276,25 +2230,27 @@ export const ResponseWithContinuationEnvironmentSetting: msRest.CompositeMapper } }; -export const ResponseWithContinuationEnvironment: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_Environment_", +export const PagedVirtualMachines: msRest.CompositeMapper = { + serializedName: "PagedVirtualMachines", type: { name: "Composite", - className: "ResponseWithContinuationEnvironment", + className: "PagedVirtualMachines", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Environment" + className: "VirtualMachine" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2304,25 +2260,27 @@ export const ResponseWithContinuationEnvironment: msRest.CompositeMapper = { } }; -export const ResponseWithContinuationUser: msRest.CompositeMapper = { - serializedName: "ResponseWithContinuation_User_", +export const PagedSchedules: msRest.CompositeMapper = { + serializedName: "PagedSchedules", type: { name: "Composite", - className: "ResponseWithContinuationUser", + className: "PagedSchedules", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "User" + className: "Schedule" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" diff --git a/sdk/labservices/arm-labservices/src/models/operationResultsMappers.ts b/sdk/labservices/arm-labservices/src/models/operationResultsMappers.ts new file mode 100644 index 000000000000..6003ce6206c0 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/models/operationResultsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + OperationResult +} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/operationsMappers.ts b/sdk/labservices/arm-labservices/src/models/operationsMappers.ts index 2ea848782dbd..fddc3077d64b 100644 --- a/sdk/labservices/arm-labservices/src/models/operationsMappers.ts +++ b/sdk/labservices/arm-labservices/src/models/operationsMappers.ts @@ -1,13 +1,16 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CloudError, - OperationError, - OperationResult + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Operation, + OperationDisplay, + OperationListResult } from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/parameters.ts b/sdk/labservices/arm-labservices/src/models/parameters.ts index 741ed96caa31..f517c59e5862 100644 --- a/sdk/labservices/arm-labservices/src/models/parameters.ts +++ b/sdk/labservices/arm-labservices/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -25,39 +24,9 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", - defaultValue: '2018-10-15', - type: { - name: "String" - } - } -}; -export const environmentName: msRest.OperationURLParameter = { - parameterPath: "environmentName", - mapper: { - required: true, - serializedName: "environmentName", - type: { - name: "String" - } - } -}; -export const environmentSettingName: msRest.OperationURLParameter = { - parameterPath: "environmentSettingName", - mapper: { - required: true, - serializedName: "environmentSettingName", - type: { - name: "String" - } - } -}; -export const expand: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "expand" - ], - mapper: { - serializedName: "$expand", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -75,21 +44,16 @@ export const filter: msRest.OperationQueryParameter = { } } }; -export const galleryImageName: msRest.OperationURLParameter = { - parameterPath: "galleryImageName", +export const imageName: msRest.OperationURLParameter = { + parameterPath: "imageName", mapper: { required: true, - serializedName: "galleryImageName", - type: { - name: "String" - } - } -}; -export const labAccountName: msRest.OperationURLParameter = { - parameterPath: "labAccountName", - mapper: { - required: true, - serializedName: "labAccountName", + serializedName: "imageName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[-\w\\._\\(\\)]+$/ + }, type: { name: "String" } @@ -100,16 +64,24 @@ export const labName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "labName", + constraints: { + MaxLength: 100, + MinLength: 1 + }, type: { name: "String" } } }; -export const locationName: msRest.OperationURLParameter = { - parameterPath: "locationName", +export const labPlanName: msRest.OperationURLParameter = { + parameterPath: "labPlanName", mapper: { required: true, - serializedName: "locationName", + serializedName: "labPlanName", + constraints: { + MaxLength: 100, + MinLength: 1 + }, type: { name: "String" } @@ -126,33 +98,45 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const operationName: msRest.OperationURLParameter = { - parameterPath: "operationName", +export const operationResultId: msRest.OperationURLParameter = { + parameterPath: "operationResultId", mapper: { required: true, - serializedName: "operationName", + serializedName: "operationResultId", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[-\w\\._\\(\\)]+$/ + }, type: { name: "String" } } }; -export const orderby: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "orderby" - ], +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - serializedName: "$orderby", + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1 + }, type: { name: "String" } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const scheduleName: msRest.OperationURLParameter = { + parameterPath: "scheduleName", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "scheduleName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[-\w\\._\\(\\)]+$/ + }, type: { name: "String" } @@ -163,28 +147,39 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } } }; -export const top: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "top" - ], +export const userName: msRest.OperationURLParameter = { + parameterPath: "userName", mapper: { - serializedName: "$top", + required: true, + serializedName: "userName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[-\w\\._\\(\\)]+$/ + }, type: { - name: "Number" + name: "String" } } }; -export const userName: msRest.OperationURLParameter = { - parameterPath: "userName", +export const virtualMachineName: msRest.OperationURLParameter = { + parameterPath: "virtualMachineName", mapper: { required: true, - serializedName: "userName", + serializedName: "virtualMachineName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[-\w\\._\\(\\)]+$/ + }, type: { name: "String" } diff --git a/sdk/labservices/arm-labservices/src/models/providerOperationsMappers.ts b/sdk/labservices/arm-labservices/src/models/providerOperationsMappers.ts deleted file mode 100644 index 0e3a2c313781..000000000000 --- a/sdk/labservices/arm-labservices/src/models/providerOperationsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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. - */ - -export { - CloudError, - OperationMetadata, - OperationMetadataDisplay, - ProviderOperationResult -} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/schedulesMappers.ts b/sdk/labservices/arm-labservices/src/models/schedulesMappers.ts new file mode 100644 index 000000000000..325a0084c630 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/models/schedulesMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AutoShutdownProfile, + AzureEntityResource, + BaseResource, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, + Lab, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + PagedSchedules, + Plan, + ProxyResource, + RecurrencePattern, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + Schedule, + ScheduleUpdate, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, + User, + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile +} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/usersMappers.ts b/sdk/labservices/arm-labservices/src/models/usersMappers.ts index c0e823467f0f..2af5e20d411e 100644 --- a/sdk/labservices/arm-labservices/src/models/usersMappers.ts +++ b/sdk/labservices/arm-labservices/src/models/usersMappers.ts @@ -1,39 +1,48 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AutoShutdownProfile, + AzureEntityResource, BaseResource, - CloudError, - Environment, - EnvironmentFragment, - EnvironmentSetting, - EnvironmentSettingFragment, - EnvironmentSize, - GalleryImage, - GalleryImageFragment, - GalleryImageReference, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, + InviteBody, Lab, - LabAccount, - LabAccountFragment, - LabFragment, - LatestOperationResult, - NetworkInterface, - ReferenceVm, - ReferenceVmFragment, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + PagedUsers, + Plan, + ProxyResource, + RecurrencePattern, Resource, - ResourceSet, - ResourceSetFragment, - ResourceSettings, - ResourceSettingsFragment, - ResponseWithContinuationUser, - SizeConfigurationProperties, - SizeInfo, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + Schedule, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, User, - UserFragment, - VmStateDetails + UserUpdate, + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile } from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/models/virtualMachinesMappers.ts b/sdk/labservices/arm-labservices/src/models/virtualMachinesMappers.ts new file mode 100644 index 000000000000..1db3d8a064dc --- /dev/null +++ b/sdk/labservices/arm-labservices/src/models/virtualMachinesMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AutoShutdownProfile, + AzureEntityResource, + BaseResource, + ConnectionProfile, + Credentials, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Identity, + Image, + ImageReference, + Lab, + LabNetworkProfile, + LabPlan, + LabPlanNetworkProfile, + PagedVirtualMachines, + Plan, + ProxyResource, + RecurrencePattern, + ResetPasswordBody, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RosterProfile, + Schedule, + SecurityProfile, + Sku, + SupportInfo, + SystemData, + TrackedResource, + User, + VirtualMachine, + VirtualMachineAdditionalCapabilities, + VirtualMachineConnectionProfile, + VirtualMachineProfile +} from "../models/mappers"; diff --git a/sdk/labservices/arm-labservices/src/operations/environmentSettings.ts b/sdk/labservices/arm-labservices/src/operations/environmentSettings.ts deleted file mode 100644 index 9909699599b4..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/environmentSettings.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/environmentSettingsMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a EnvironmentSettings. */ -export class EnvironmentSettings { - private readonly client: ManagedLabsClientContext; - - /** - * Create a EnvironmentSettings. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * List environment setting in a given lab. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.EnvironmentSettingsListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, labName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, labName: string, options: Models.EnvironmentSettingsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.EnvironmentSettingsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Get environment setting - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: Models.EnvironmentSettingsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options: Models.EnvironmentSettingsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: Models.EnvironmentSettingsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or replace an existing Environment Setting. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentSetting Represents settings of an environment, from which environment - * instances would be created - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSetting, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,labAccountName,labName,environmentSettingName,environmentSetting,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete environment setting. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,labAccountName,labName,environmentSettingName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Modify properties of environment setting. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentSetting Represents settings of an environment, from which environment - * instances would be created - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSettingFragment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentSetting Represents settings of an environment, from which environment - * instances would be created - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSettingFragment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentSetting Represents settings of an environment, from which environment - * instances would be created - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSettingFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSettingFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentSetting, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Claims a random environment for a user in an environment settings - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - claimAny(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param callback The callback - */ - claimAny(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param options The optional parameters - * @param callback The callback - */ - claimAny(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - claimAny(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - claimAnyOperationSpec, - callback); - } - - /** - * Provisions/deprovisions required resources for an environment setting based on current state of - * the lab/environment setting. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param publishPayload Payload for Publish operation on EnvironmentSetting. - * @param [options] The optional parameters - * @returns Promise - */ - publish(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, publishPayload: Models.PublishPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param publishPayload Payload for Publish operation on EnvironmentSetting. - * @param callback The callback - */ - publish(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, publishPayload: Models.PublishPayload, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param publishPayload Payload for Publish operation on EnvironmentSetting. - * @param options The optional parameters - * @param callback The callback - */ - publish(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, publishPayload: Models.PublishPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - publish(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, publishPayload: Models.PublishPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - publishPayload, - options - }, - publishOperationSpec, - callback); - } - - /** - * Starts a template by starting all resources inside the template. This operation can take a while - * to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - start(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStart(resourceGroupName,labAccountName,labName,environmentSettingName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Starts a template by starting all resources inside the template. This operation can take a while - * to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - stop(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStop(resourceGroupName,labAccountName,labName,environmentSettingName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Create or replace an existing Environment Setting. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentSetting Represents settings of an environment, from which environment - * instances would be created - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentSetting: Models.EnvironmentSetting, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentSetting, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete environment setting. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Starts a template by starting all resources inside the template. This operation can take a while - * to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - beginStart(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - beginStartOperationSpec, - options); - } - - /** - * Starts a template by starting all resources inside the template. This operation can take a while - * to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - beginStop(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - beginStopOperationSpec, - options); - } - - /** - * List environment setting in a given lab. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationEnvironmentSetting - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnvironmentSetting - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environmentSetting", - mapper: { - ...Mappers.EnvironmentSettingFragment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnvironmentSetting - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const claimAnyOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/claimAny", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const publishOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/publish", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "publishPayload", - mapper: { - ...Mappers.PublishPayload, - required: true - } - }, - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environmentSetting", - mapper: { - ...Mappers.EnvironmentSetting, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnvironmentSetting - }, - 201: { - bodyMapper: Mappers.EnvironmentSetting - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/start", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStopOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/stop", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationEnvironmentSetting - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/environments.ts b/sdk/labservices/arm-labservices/src/operations/environments.ts deleted file mode 100644 index 3bd7120e3321..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/environments.ts +++ /dev/null @@ -1,741 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/environmentsMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a Environments. */ -export class Environments { - private readonly client: ManagedLabsClientContext; - - /** - * Create a Environments. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * List environments in a given environment setting. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: Models.EnvironmentsListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options: Models.EnvironmentsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, options?: Models.EnvironmentsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Get environment - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: Models.EnvironmentsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options: Models.EnvironmentsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: Models.EnvironmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or replace an existing Environment. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.Environment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.Environment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.Environment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.Environment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - environment, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Delete environment. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,labAccountName,labName,environmentSettingName,environmentName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Modify properties of environments. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.EnvironmentFragment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.EnvironmentFragment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param environment Represents an environment instance - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.EnvironmentFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, environment: Models.EnvironmentFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - environment, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Claims the environment and assigns it to the user - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - claim(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param callback The callback - */ - claim(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param options The optional parameters - * @param callback The callback - */ - claim(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - claim(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - options - }, - claimOperationSpec, - callback); - } - - /** - * Resets the user password on an environment This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param resetPasswordPayload Represents the payload for resetting passwords. - * @param [options] The optional parameters - * @returns Promise - */ - resetPassword(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, resetPasswordPayload: Models.ResetPasswordPayload, options?: msRest.RequestOptionsBase): Promise { - return this.beginResetPassword(resourceGroupName,labAccountName,labName,environmentSettingName,environmentName,resetPasswordPayload,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Starts an environment by starting all resources inside the environment. This operation can take - * a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - start(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStart(resourceGroupName,labAccountName,labName,environmentSettingName,environmentName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Stops an environment by stopping all resources inside the environment This operation can take a - * while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - stop(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStop(resourceGroupName,labAccountName,labName,environmentSettingName,environmentName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Delete environment. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Resets the user password on an environment This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param resetPasswordPayload Represents the payload for resetting passwords. - * @param [options] The optional parameters - * @returns Promise - */ - beginResetPassword(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, resetPasswordPayload: Models.ResetPasswordPayload, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - resetPasswordPayload, - options - }, - beginResetPasswordOperationSpec, - options); - } - - /** - * Starts an environment by starting all resources inside the environment. This operation can take - * a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - beginStart(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - options - }, - beginStartOperationSpec, - options); - } - - /** - * Stops an environment by stopping all resources inside the environment This operation can take a - * while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param environmentSettingName The name of the environment Setting. - * @param environmentName The name of the environment. - * @param [options] The optional parameters - * @returns Promise - */ - beginStop(resourceGroupName: string, labAccountName: string, labName: string, environmentSettingName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - labName, - environmentSettingName, - environmentName, - options - }, - beginStopOperationSpec, - options); - } - - /** - * List environments in a given environment setting. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationEnvironment - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Environment - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environment", - mapper: { - ...Mappers.Environment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Environment - }, - 201: { - bodyMapper: Mappers.Environment - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environment", - mapper: { - ...Mappers.EnvironmentFragment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Environment - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const claimOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}/claim", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginResetPasswordOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}/resetPassword", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "resetPasswordPayload", - mapper: { - ...Mappers.ResetPasswordPayload, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}/start", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStopOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}/stop", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.labName, - Parameters.environmentSettingName, - Parameters.environmentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationEnvironment - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/galleryImages.ts b/sdk/labservices/arm-labservices/src/operations/galleryImages.ts deleted file mode 100644 index 159c602d4e15..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/galleryImages.ts +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleryImagesMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a GalleryImages. */ -export class GalleryImages { - private readonly client: ManagedLabsClientContext; - - /** - * Create a GalleryImages. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * List gallery images in a given lab account. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, labAccountName: string, options?: Models.GalleryImagesListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, labAccountName: string, options: Models.GalleryImagesListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, labAccountName: string, options?: Models.GalleryImagesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Get gallery image - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, labAccountName: string, galleryImageName: string, options?: Models.GalleryImagesGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, galleryImageName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, galleryImageName: string, options: Models.GalleryImagesGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, galleryImageName: string, options?: Models.GalleryImagesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - galleryImageName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or replace an existing Gallery Image. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImage, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImage, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImage, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImage, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - galleryImageName, - galleryImage, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Delete gallery image. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, labAccountName: string, galleryImageName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, labAccountName: string, galleryImageName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, labAccountName: string, galleryImageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, labAccountName: string, galleryImageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - galleryImageName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Modify properties of gallery images. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImageFragment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImageFragment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param galleryImageName The name of the gallery Image. - * @param galleryImage Represents an image from the Azure Marketplace - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImageFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, galleryImageName: string, galleryImage: Models.GalleryImageFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - galleryImageName, - galleryImage, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * List gallery images in a given lab account. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/galleryimages", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationGalleryImage - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/galleryimages/{galleryImageName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.galleryImageName - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.GalleryImage - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/galleryimages/{galleryImageName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.galleryImageName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "galleryImage", - mapper: { - ...Mappers.GalleryImage, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.GalleryImage - }, - 201: { - bodyMapper: Mappers.GalleryImage - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/galleryimages/{galleryImageName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.galleryImageName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/galleryimages/{galleryImageName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName, - Parameters.galleryImageName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "galleryImage", - mapper: { - ...Mappers.GalleryImageFragment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.GalleryImage - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationGalleryImage - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/globalUsers.ts b/sdk/labservices/arm-labservices/src/operations/globalUsers.ts deleted file mode 100644 index c0b05b1b6dac..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/globalUsers.ts +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/globalUsersMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a GlobalUsers. */ -export class GlobalUsers { - private readonly client: ManagedLabsClientContext; - - /** - * Create a GlobalUsers. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * Gets the virtual machine details - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - getEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: Models.GlobalUsersGetEnvironmentOptionalParams): Promise; - /** - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param callback The callback - */ - getEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param options The optional parameters - * @param callback The callback - */ - getEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options: Models.GlobalUsersGetEnvironmentOptionalParams, callback: msRest.ServiceCallback): void; - getEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: Models.GlobalUsersGetEnvironmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - environmentOperationsPayload, - options - }, - getEnvironmentOperationSpec, - callback) as Promise; - } - - /** - * Get batch operation status - * @param userName The name of the user. - * @param operationBatchStatusPayload Payload to get the status of an operation - * @param [options] The optional parameters - * @returns Promise - */ - getOperationBatchStatus(userName: string, operationBatchStatusPayload: Models.OperationBatchStatusPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param operationBatchStatusPayload Payload to get the status of an operation - * @param callback The callback - */ - getOperationBatchStatus(userName: string, operationBatchStatusPayload: Models.OperationBatchStatusPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param operationBatchStatusPayload Payload to get the status of an operation - * @param options The optional parameters - * @param callback The callback - */ - getOperationBatchStatus(userName: string, operationBatchStatusPayload: Models.OperationBatchStatusPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getOperationBatchStatus(userName: string, operationBatchStatusPayload: Models.OperationBatchStatusPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - operationBatchStatusPayload, - options - }, - getOperationBatchStatusOperationSpec, - callback) as Promise; - } - - /** - * Gets the status of long running operation - * @param userName The name of the user. - * @param operationStatusPayload Payload to get the status of an operation - * @param [options] The optional parameters - * @returns Promise - */ - getOperationStatus(userName: string, operationStatusPayload: Models.OperationStatusPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param operationStatusPayload Payload to get the status of an operation - * @param callback The callback - */ - getOperationStatus(userName: string, operationStatusPayload: Models.OperationStatusPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param operationStatusPayload Payload to get the status of an operation - * @param options The optional parameters - * @param callback The callback - */ - getOperationStatus(userName: string, operationStatusPayload: Models.OperationStatusPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getOperationStatus(userName: string, operationStatusPayload: Models.OperationStatusPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - operationStatusPayload, - options - }, - getOperationStatusOperationSpec, - callback) as Promise; - } - - /** - * Get personal preferences for a user - * @param userName The name of the user. - * @param personalPreferencesOperationsPayload Represents payload for any Environment operations - * like get, start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - getPersonalPreferences(userName: string, personalPreferencesOperationsPayload: Models.PersonalPreferencesOperationsPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param personalPreferencesOperationsPayload Represents payload for any Environment operations - * like get, start, stop, connect - * @param callback The callback - */ - getPersonalPreferences(userName: string, personalPreferencesOperationsPayload: Models.PersonalPreferencesOperationsPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param personalPreferencesOperationsPayload Represents payload for any Environment operations - * like get, start, stop, connect - * @param options The optional parameters - * @param callback The callback - */ - getPersonalPreferences(userName: string, personalPreferencesOperationsPayload: Models.PersonalPreferencesOperationsPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPersonalPreferences(userName: string, personalPreferencesOperationsPayload: Models.PersonalPreferencesOperationsPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - personalPreferencesOperationsPayload, - options - }, - getPersonalPreferencesOperationSpec, - callback) as Promise; - } - - /** - * List Environments for the user - * @param userName The name of the user. - * @param listEnvironmentsPayload Represents the payload to list environments owned by a user - * @param [options] The optional parameters - * @returns Promise - */ - listEnvironments(userName: string, listEnvironmentsPayload: Models.ListEnvironmentsPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param listEnvironmentsPayload Represents the payload to list environments owned by a user - * @param callback The callback - */ - listEnvironments(userName: string, listEnvironmentsPayload: Models.ListEnvironmentsPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param listEnvironmentsPayload Represents the payload to list environments owned by a user - * @param options The optional parameters - * @param callback The callback - */ - listEnvironments(userName: string, listEnvironmentsPayload: Models.ListEnvironmentsPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listEnvironments(userName: string, listEnvironmentsPayload: Models.ListEnvironmentsPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - listEnvironmentsPayload, - options - }, - listEnvironmentsOperationSpec, - callback) as Promise; - } - - /** - * List labs for the user. - * @param userName The name of the user. - * @param [options] The optional parameters - * @returns Promise - */ - listLabs(userName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param callback The callback - */ - listLabs(userName: string, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param options The optional parameters - * @param callback The callback - */ - listLabs(userName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listLabs(userName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - options - }, - listLabsOperationSpec, - callback) as Promise; - } - - /** - * Register a user to a managed lab - * @param userName The name of the user. - * @param registerPayload Represents payload for Register action. - * @param [options] The optional parameters - * @returns Promise - */ - register(userName: string, registerPayload: Models.RegisterPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param userName The name of the user. - * @param registerPayload Represents payload for Register action. - * @param callback The callback - */ - register(userName: string, registerPayload: Models.RegisterPayload, callback: msRest.ServiceCallback): void; - /** - * @param userName The name of the user. - * @param registerPayload Represents payload for Register action. - * @param options The optional parameters - * @param callback The callback - */ - register(userName: string, registerPayload: Models.RegisterPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - register(userName: string, registerPayload: Models.RegisterPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - userName, - registerPayload, - options - }, - registerOperationSpec, - callback); - } - - /** - * Resets the user password on an environment This operation can take a while to complete - * @param userName The name of the user. - * @param resetPasswordPayload Represents the payload for resetting passwords. - * @param [options] The optional parameters - * @returns Promise - */ - resetPassword(userName: string, resetPasswordPayload: Models.ResetPasswordPayload, options?: msRest.RequestOptionsBase): Promise { - return this.beginResetPassword(userName,resetPasswordPayload,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Starts an environment by starting all resources inside the environment. This operation can take - * a while to complete - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - startEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: msRest.RequestOptionsBase): Promise { - return this.beginStartEnvironment(userName,environmentOperationsPayload,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Stops an environment by stopping all resources inside the environment This operation can take a - * while to complete - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - stopEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: msRest.RequestOptionsBase): Promise { - return this.beginStopEnvironment(userName,environmentOperationsPayload,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Resets the user password on an environment This operation can take a while to complete - * @param userName The name of the user. - * @param resetPasswordPayload Represents the payload for resetting passwords. - * @param [options] The optional parameters - * @returns Promise - */ - beginResetPassword(userName: string, resetPasswordPayload: Models.ResetPasswordPayload, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - userName, - resetPasswordPayload, - options - }, - beginResetPasswordOperationSpec, - options); - } - - /** - * Starts an environment by starting all resources inside the environment. This operation can take - * a while to complete - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - beginStartEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - userName, - environmentOperationsPayload, - options - }, - beginStartEnvironmentOperationSpec, - options); - } - - /** - * Stops an environment by stopping all resources inside the environment This operation can take a - * while to complete - * @param userName The name of the user. - * @param environmentOperationsPayload Represents payload for any Environment operations like get, - * start, stop, connect - * @param [options] The optional parameters - * @returns Promise - */ - beginStopEnvironment(userName: string, environmentOperationsPayload: Models.EnvironmentOperationsPayload, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - userName, - environmentOperationsPayload, - options - }, - beginStopEnvironmentOperationSpec, - options); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getEnvironmentOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/getEnvironment", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environmentOperationsPayload", - mapper: { - ...Mappers.EnvironmentOperationsPayload, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.GetEnvironmentResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationBatchStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/getOperationBatchStatus", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "operationBatchStatusPayload", - mapper: { - ...Mappers.OperationBatchStatusPayload, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationBatchStatusResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/getOperationStatus", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "operationStatusPayload", - mapper: { - ...Mappers.OperationStatusPayload, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getPersonalPreferencesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/getPersonalPreferences", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "personalPreferencesOperationsPayload", - mapper: { - ...Mappers.PersonalPreferencesOperationsPayload, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.GetPersonalPreferencesResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listEnvironmentsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/listEnvironments", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "listEnvironmentsPayload", - mapper: { - ...Mappers.ListEnvironmentsPayload, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ListEnvironmentsResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listLabsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/listLabs", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ListLabsResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const registerOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/register", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "registerPayload", - mapper: { - ...Mappers.RegisterPayload, - required: true - } - }, - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginResetPasswordOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/resetPassword", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "resetPasswordPayload", - mapper: { - ...Mappers.ResetPasswordPayload, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStartEnvironmentOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/startEnvironment", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environmentOperationsPayload", - mapper: { - ...Mappers.EnvironmentOperationsPayload, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginStopEnvironmentOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.LabServices/users/{userName}/stopEnvironment", - urlParameters: [ - Parameters.userName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "environmentOperationsPayload", - mapper: { - ...Mappers.EnvironmentOperationsPayload, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/images.ts b/sdk/labservices/arm-labservices/src/operations/images.ts new file mode 100644 index 000000000000..9b9e39eaf112 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/operations/images.ts @@ -0,0 +1,365 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/imagesMappers"; +import * as Parameters from "../models/parameters"; +import { LabServicesClientContext } from "../labServicesClientContext"; + +/** Class representing a Images. */ +export class Images { + private readonly client: LabServicesClientContext; + + /** + * Create a Images. + * @param {LabServicesClientContext} client Reference to the service client. + */ + constructor(client: LabServicesClientContext) { + this.client = client; + } + + /** + * Gets all images from galleries attached to a lab plan. + * @summary Gets all images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + listByLabPlan(resourceGroupName: string, labPlanName: string, options?: Models.ImagesListByLabPlanOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param callback The callback + */ + listByLabPlan(resourceGroupName: string, labPlanName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param options The optional parameters + * @param callback The callback + */ + listByLabPlan(resourceGroupName: string, labPlanName: string, options: Models.ImagesListByLabPlanOptionalParams, callback: msRest.ServiceCallback): void; + listByLabPlan(resourceGroupName: string, labPlanName: string, options?: Models.ImagesListByLabPlanOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labPlanName, + options + }, + listByLabPlanOperationSpec, + callback) as Promise; + } + + /** + * Gets an image resource. + * @summary Gets an image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param callback The callback + */ + get(resourceGroupName: string, labPlanName: string, imageName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, labPlanName: string, imageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labPlanName, + imageName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates an image resource via PUT. Creating new resources via PUT will not function. + * @summary Updates an image via PUT. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(body: Models.Image, resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param callback The callback + */ + createOrUpdate(body: Models.Image, resourceGroupName: string, labPlanName: string, imageName: string, callback: msRest.ServiceCallback): void; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(body: Models.Image, resourceGroupName: string, labPlanName: string, imageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(body: Models.Image, resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + resourceGroupName, + labPlanName, + imageName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Updates an image resource. + * @summary Updates an image. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param [options] The optional parameters + * @returns Promise + */ + update(body: Models.ImageUpdate, resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param callback The callback + */ + update(body: Models.ImageUpdate, resourceGroupName: string, labPlanName: string, imageName: string, callback: msRest.ServiceCallback): void; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param imageName The image name. + * @param options The optional parameters + * @param callback The callback + */ + update(body: Models.ImageUpdate, resourceGroupName: string, labPlanName: string, imageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(body: Models.ImageUpdate, resourceGroupName: string, labPlanName: string, imageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + resourceGroupName, + labPlanName, + imageName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets all images from galleries attached to a lab plan. + * @summary Gets all images. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLabPlanNext(nextPageLink: string, options?: Models.ImagesListByLabPlanNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLabPlanNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLabPlanNext(nextPageLink: string, options: Models.ImagesListByLabPlanNextOptionalParams, callback: msRest.ServiceCallback): void; + listByLabPlanNext(nextPageLink: string, options?: Models.ImagesListByLabPlanNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLabPlanNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByLabPlanOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName, + Parameters.imageName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Image + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName, + Parameters.imageName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.Image, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Image + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName, + Parameters.imageName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ImageUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Image + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByLabPlanNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/labservices/arm-labservices/src/operations/index.ts b/sdk/labservices/arm-labservices/src/operations/index.ts index 26e4c8332ff5..aa8762028eac 100644 --- a/sdk/labservices/arm-labservices/src/operations/index.ts +++ b/sdk/labservices/arm-labservices/src/operations/index.ts @@ -1,19 +1,17 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./providerOperations"; -export * from "./globalUsers"; -export * from "./labAccounts"; export * from "./operations"; -export * from "./galleryImages"; +export * from "./operationResults"; +export * from "./labPlans"; +export * from "./images"; export * from "./labs"; -export * from "./environmentSettings"; -export * from "./environments"; export * from "./users"; +export * from "./virtualMachines"; +export * from "./schedules"; diff --git a/sdk/labservices/arm-labservices/src/operations/labAccounts.ts b/sdk/labservices/arm-labservices/src/operations/labAccounts.ts deleted file mode 100644 index 100c9feb2eda..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/labAccounts.ts +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/labAccountsMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a LabAccounts. */ -export class LabAccounts { - private readonly client: ManagedLabsClientContext; - - /** - * Create a LabAccounts. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * List lab accounts in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.LabAccountsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.LabAccountsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.LabAccountsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List lab accounts in a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.LabAccountsListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.LabAccountsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.LabAccountsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Get lab account - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, labAccountName: string, options?: Models.LabAccountsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, labAccountName: string, options: Models.LabAccountsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, options?: Models.LabAccountsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or replace an existing Lab Account. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccount, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccount, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labAccount, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Delete lab account. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, labAccountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,labAccountName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Modify properties of lab accounts. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccountFragment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccountFragment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labAccount Represents a lab account. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccountFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, labAccount: Models.LabAccountFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labAccount, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Create a lab in a lab account. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param createLabProperties Properties for creating a managed lab and a default environment - * setting - * @param [options] The optional parameters - * @returns Promise - */ - createLab(resourceGroupName: string, labAccountName: string, createLabProperties: Models.CreateLabProperties, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param createLabProperties Properties for creating a managed lab and a default environment - * setting - * @param callback The callback - */ - createLab(resourceGroupName: string, labAccountName: string, createLabProperties: Models.CreateLabProperties, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param createLabProperties Properties for creating a managed lab and a default environment - * setting - * @param options The optional parameters - * @param callback The callback - */ - createLab(resourceGroupName: string, labAccountName: string, createLabProperties: Models.CreateLabProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createLab(resourceGroupName: string, labAccountName: string, createLabProperties: Models.CreateLabProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - createLabProperties, - options - }, - createLabOperationSpec, - callback); - } - - /** - * Get regional availability information for each size category configured under a lab account - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param [options] The optional parameters - * @returns Promise - */ - getRegionalAvailability(resourceGroupName: string, labAccountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param callback The callback - */ - getRegionalAvailability(resourceGroupName: string, labAccountName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param options The optional parameters - * @param callback The callback - */ - getRegionalAvailability(resourceGroupName: string, labAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getRegionalAvailability(resourceGroupName: string, labAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - options - }, - getRegionalAvailabilityOperationSpec, - callback) as Promise; - } - - /** - * Delete lab account. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, labAccountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - labAccountName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * List lab accounts in a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } - - /** - * List lab accounts in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.LabServices/labaccounts", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationLabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationLabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "labAccount", - mapper: { - ...Mappers.LabAccount, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LabAccount - }, - 201: { - bodyMapper: Mappers.LabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "labAccount", - mapper: { - ...Mappers.LabAccountFragment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createLabOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/createLab", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "createLabProperties", - mapper: { - ...Mappers.CreateLabProperties, - required: true - } - }, - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getRegionalAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/getRegionalAvailability", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.GetRegionalAvailabilityResponse - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationLabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ResponseWithContinuationLabAccount - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/labPlans.ts b/sdk/labservices/arm-labservices/src/operations/labPlans.ts new file mode 100644 index 000000000000..727dbe6d901f --- /dev/null +++ b/sdk/labservices/arm-labservices/src/operations/labPlans.ts @@ -0,0 +1,578 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/labPlansMappers"; +import * as Parameters from "../models/parameters"; +import { LabServicesClientContext } from "../labServicesClientContext"; + +/** Class representing a LabPlans. */ +export class LabPlans { + private readonly client: LabServicesClientContext; + + /** + * Create a LabPlans. + * @param {LabServicesClientContext} client Reference to the service client. + */ + constructor(client: LabServicesClientContext) { + this.client = client; + } + + /** + * Returns a list of all lab plans within a subscription + * @summary Get all lab plans for a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.LabPlansListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.LabPlansListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.LabPlansListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of all lab plans for a subscription and resource group. + * @summary Get all lab plans for a subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Retrieves the properties of a Lab Plan. + * @summary Retrieves a Lab Plan resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param callback The callback + */ + get(resourceGroupName: string, labPlanName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, labPlanName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labPlanName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Operation to create or update a Lab Plan resource. + * @summary Updates or creates a Lab Plan resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(body: Models.LabPlan, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(body,resourceGroupName,labPlanName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to update a Lab Plan resource. + * @summary Updates a Lab Plan resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + update(body: Models.LabPlanUpdate, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,labPlanName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated + * with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission + * container. + * @summary Deletes a Lab Plan resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,labPlanName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Saves an image from a lab VM to the attached shared image gallery. + * @summary Save an image from a lab VM to the attached shared image gallery. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + saveImage(body: Models.SaveImageBody, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginSaveImage(body,resourceGroupName,labPlanName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Operation to create or update a Lab Plan resource. + * @summary Updates or creates a Lab Plan resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(body: Models.LabPlan, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labPlanName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Operation to update a Lab Plan resource. + * @summary Updates a Lab Plan resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(body: Models.LabPlanUpdate, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labPlanName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated + * with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission + * container. + * @summary Deletes a Lab Plan resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labPlanName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Saves an image from a lab VM to the attached shared image gallery. + * @summary Save an image from a lab VM to the attached shared image gallery. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labPlanName The name of the lab plan that uniquely identifies it within containing + * resource group. Used in resource URIs and in UI. + * @param [options] The optional parameters + * @returns Promise + */ + beginSaveImage(body: Models.SaveImageBody, resourceGroupName: string, labPlanName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labPlanName, + options + }, + beginSaveImageOperationSpec, + options); + } + + /** + * Returns a list of all lab plans within a subscription + * @summary Get all lab plans for a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: Models.LabPlansListBySubscriptionNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: Models.LabPlansListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.LabPlansListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of all lab plans for a subscription and resource group. + * @summary Get all lab plans for a subscription and resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.LabServices/labPlans", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabPlans + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabPlans + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LabPlan + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.LabPlan, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LabPlan + }, + 201: { + bodyMapper: Mappers.LabPlan + }, + 202: { + bodyMapper: Mappers.LabPlan + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.LabPlanUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LabPlan + }, + 202: { + bodyMapper: Mappers.LabPlan + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginSaveImageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/saveImage", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labPlanName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.SaveImageBody, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabPlans + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabPlans + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/labservices/arm-labservices/src/operations/labs.ts b/sdk/labservices/arm-labservices/src/operations/labs.ts index dd3bb4748e15..275b8d4f38be 100644 --- a/sdk/labservices/arm-labservices/src/operations/labs.ts +++ b/sdk/labservices/arm-labservices/src/operations/labs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,321 +12,381 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/labsMappers"; import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; +import { LabServicesClientContext } from "../labServicesClientContext"; /** Class representing a Labs. */ export class Labs { - private readonly client: ManagedLabsClientContext; + private readonly client: LabServicesClientContext; /** * Create a Labs. - * @param {ManagedLabsClientContext} client Reference to the service client. + * @param {LabServicesClientContext} client Reference to the service client. */ - constructor(client: ManagedLabsClientContext) { + constructor(client: LabServicesClientContext) { this.client = client; } /** - * List labs in a given lab account. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. + * Returns a list of all labs for a subscription. + * @summary Get all labs for a subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(resourceGroupName: string, labAccountName: string, options?: Models.LabsListOptionalParams): Promise; + listBySubscription(options?: Models.LabsListBySubscriptionOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. * @param callback The callback */ - list(resourceGroupName: string, labAccountName: string, callback: msRest.ServiceCallback): void; + listBySubscription(callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. * @param options The optional parameters * @param callback The callback */ - list(resourceGroupName: string, labAccountName: string, options: Models.LabsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, labAccountName: string, options?: Models.LabsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscription(options: Models.LabsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.LabsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, - labAccountName, options }, - listOperationSpec, - callback) as Promise; + listBySubscriptionOperationSpec, + callback) as Promise; } /** - * Get lab - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * Returns a list of all labs in a resource group. + * @summary Get all labs for a subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.LabsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ - get(resourceGroupName: string, labAccountName: string, labName: string, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, labAccountName: string, labName: string, options: Models.LabsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.LabsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - labAccountName, - labName, options }, - getOperationSpec, - callback) as Promise; + listByResourceGroupOperationSpec, + callback) as Promise; } /** - * Create or replace an existing Lab. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. + * Returns the properties of a lab resource. + * @summary Get a lab resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.Lab, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.Lab, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.Lab, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.Lab, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, labName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - labAccountName, labName, - lab, options }, - createOrUpdateOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; + } + + /** + * Operation to create or update a lab resource. + * @summary Create or update a lab resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(body: Models.Lab, resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(body,resourceGroupName,labName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** - * Delete lab. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * Operation to update a lab resource. + * @summary Update a lab resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + update(body: Models.LabUpdate, resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,labName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to delete a lab resource. + * @summary Deletes a lab resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, labAccountName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,labAccountName,labName,options) + deleteMethod(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,labName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } /** - * Modify properties of labs. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. + * Publish or re-publish a lab. This will create or update all lab resources, such as virtual + * machines. + * @summary Publish or re-publish a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.LabFragment, options?: msRest.RequestOptionsBase): Promise; + publish(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPublish(resourceGroupName,labName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. - * @param callback The callback + * Action used to manually kick off an AAD group sync job. + * @summary Manually sync the lab group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.LabFragment, callback: msRest.ServiceCallback): void; + syncGroup(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginSyncGroup(resourceGroupName,labName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param lab Represents a lab. - * @param options The optional parameters - * @param callback The callback + * Operation to create or update a lab resource. + * @summary Create or update a lab resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.LabFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, labName: string, lab: Models.LabFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreateOrUpdate(body: Models.Lab, resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { + body, resourceGroupName, - labAccountName, labName, - lab, options }, - updateOperationSpec, - callback) as Promise; + beginCreateOrUpdateOperationSpec, + options); } /** - * Add users to a lab - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param addUsersPayload Payload for Add Users operation on a Lab. + * Operation to update a lab resource. + * @summary Update a lab resource. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters - * @returns Promise - */ - addUsers(resourceGroupName: string, labAccountName: string, labName: string, addUsersPayload: Models.AddUsersPayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param addUsersPayload Payload for Add Users operation on a Lab. - * @param callback The callback - */ - addUsers(resourceGroupName: string, labAccountName: string, labName: string, addUsersPayload: Models.AddUsersPayload, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param addUsersPayload Payload for Add Users operation on a Lab. - * @param options The optional parameters - * @param callback The callback + * @returns Promise */ - addUsers(resourceGroupName: string, labAccountName: string, labName: string, addUsersPayload: Models.AddUsersPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addUsers(resourceGroupName: string, labAccountName: string, labName: string, addUsersPayload: Models.AddUsersPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginUpdate(body: Models.LabUpdate, resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { + body, resourceGroupName, - labAccountName, labName, - addUsersPayload, options }, - addUsersOperationSpec, - callback); + beginUpdateOperationSpec, + options); } /** - * Register to managed lab. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * Operation to delete a lab resource. + * @summary Deletes a lab resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters - * @returns Promise - */ - register(resourceGroupName: string, labAccountName: string, labName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param callback The callback + * @returns Promise */ - register(resourceGroupName: string, labAccountName: string, labName: string, callback: msRest.ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param options The optional parameters - * @param callback The callback + * Publish or re-publish a lab. This will create or update all lab resources, such as virtual + * machines. + * @summary Publish or re-publish a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - register(resourceGroupName: string, labAccountName: string, labName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - register(resourceGroupName: string, labAccountName: string, labName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginPublish(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, - labAccountName, labName, options }, - registerOperationSpec, - callback); + beginPublishOperationSpec, + options); } /** - * Delete lab. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * Action used to manually kick off an AAD group sync job. + * @summary Manually sync the lab group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, labAccountName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { + beginSyncGroup(resourceGroupName: string, labName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, - labAccountName, labName, options }, - beginDeleteMethodOperationSpec, + beginSyncGroupOperationSpec, options); } /** - * List labs in a given lab account. + * Returns a list of all labs for a subscription. + * @summary Get all labs for a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBySubscriptionNext(nextPageLink: string, options?: Models.LabsListBySubscriptionNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscriptionNext(nextPageLink: string, options: Models.LabsListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.LabsListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of all labs in a resource group. + * @summary Get all labs for a subscription and resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs", + path: "subscriptions/{subscriptionId}/providers/Microsoft.LabServices/labs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabs + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.labAccountName + Parameters.resourceGroupName ], queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, Parameters.apiVersion ], headerParameters: [ @@ -335,10 +394,10 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ResponseWithContinuationLab + bodyMapper: Mappers.PagedLabs }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -346,15 +405,13 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ - Parameters.expand, Parameters.apiVersion ], headerParameters: [ @@ -365,19 +422,18 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Lab }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ @@ -387,7 +443,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "lab", + parameterPath: "body", mapper: { ...Mappers.Lab, required: true @@ -400,20 +456,22 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Lab }, + 202: { + bodyMapper: Mappers.Lab + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const updateOperationSpec: msRest.OperationSpec = { +const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ @@ -423,9 +481,9 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "lab", + parameterPath: "body", mapper: { - ...Mappers.LabFragment, + ...Mappers.LabUpdate, required: true } }, @@ -433,20 +491,22 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Lab }, + 202: { + bodyMapper: Mappers.Lab + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const addUsersOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/addUsers", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ @@ -455,29 +515,23 @@ const addUsersOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "addUsersPayload", - mapper: { - ...Mappers.AddUsersPayload, - required: true - } - }, responses: { 200: {}, + 202: {}, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const registerOperationSpec: msRest.OperationSpec = { +const beginPublishOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/register", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/publish", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ @@ -488,20 +542,20 @@ const registerOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}", +const beginSyncGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/syncGroup", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ @@ -511,31 +565,59 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, - 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedLabs + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ResponseWithContinuationLab + bodyMapper: Mappers.PagedLabs }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/labservices/arm-labservices/src/operations/operationResults.ts b/sdk/labservices/arm-labservices/src/operations/operationResults.ts new file mode 100644 index 000000000000..88ca85c15842 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/operations/operationResults.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { LabServicesClientContext } from "../labServicesClientContext"; + +/** Class representing a OperationResults. */ +export class OperationResults { + private readonly client: LabServicesClientContext; + + /** + * Create a OperationResults. + * @param {LabServicesClientContext} client Reference to the service client. + */ + constructor(client: LabServicesClientContext) { + this.client = client; + } + + /** + * Returns an azure operation result. + * @summary Get an azure operation result. + * @param operationResultId The operation result ID / name. + * @param [options] The optional parameters + * @returns Promise + */ + get(operationResultId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param operationResultId The operation result ID / name. + * @param callback The callback + */ + get(operationResultId: string, callback: msRest.ServiceCallback): void; + /** + * @param operationResultId The operation result ID / name. + * @param options The optional parameters + * @param callback The callback + */ + get(operationResultId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(operationResultId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + operationResultId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.LabServices/operationResults/{operationResultId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.operationResultId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationResult + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/labservices/arm-labservices/src/operations/operations.ts b/sdk/labservices/arm-labservices/src/operations/operations.ts index 3b36d72f6699..524dd6e0d3b4 100644 --- a/sdk/labservices/arm-labservices/src/operations/operations.ts +++ b/sdk/labservices/arm-labservices/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,62 +11,103 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; +import { LabServicesClientContext } from "../labServicesClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: ManagedLabsClientContext; + private readonly client: LabServicesClientContext; /** * Create a Operations. - * @param {ManagedLabsClientContext} client Reference to the service client. + * @param {LabServicesClientContext} client Reference to the service client. */ - constructor(client: ManagedLabsClientContext) { + constructor(client: LabServicesClientContext) { this.client = client; } /** - * Get operation - * @param locationName The name of the location. - * @param operationName The name of the operation. + * Returns a list of all operations. + * @summary Get all operations * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(locationName: string, operationName: string, options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** - * @param locationName The name of the location. - * @param operationName The name of the operation. * @param callback The callback */ - get(locationName: string, operationName: string, callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** - * @param locationName The name of the location. - * @param operationName The name of the operation. * @param options The optional parameters * @param callback The callback */ - get(locationName: string, operationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(locationName: string, operationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - locationName, - operationName, options }, - getOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of all operations. + * @summary Get all operations + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.LabServices/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.LabServices/locations/{locationName}/operations/{operationName}", + baseUrl: "https://management.azure.com", + path: "{nextLink}", urlParameters: [ - Parameters.subscriptionId, - Parameters.locationName, - Parameters.operationName + Parameters.nextPageLink ], queryParameters: [ Parameters.apiVersion @@ -77,10 +117,10 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.OperationResult + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/labservices/arm-labservices/src/operations/providerOperations.ts b/sdk/labservices/arm-labservices/src/operations/providerOperations.ts deleted file mode 100644 index a05ca2cf6a02..000000000000 --- a/sdk/labservices/arm-labservices/src/operations/providerOperations.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/providerOperationsMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; - -/** Class representing a ProviderOperations. */ -export class ProviderOperations { - private readonly client: ManagedLabsClientContext; - - /** - * Create a ProviderOperations. - * @param {ManagedLabsClientContext} client Reference to the service client. - */ - constructor(client: ManagedLabsClientContext) { - this.client = client; - } - - /** - * Result of the request to list REST API operations - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Result of the request to list REST API operations - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.LabServices/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ProviderOperationResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ProviderOperationResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/labservices/arm-labservices/src/operations/schedules.ts b/sdk/labservices/arm-labservices/src/operations/schedules.ts new file mode 100644 index 000000000000..31cb6d682156 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/operations/schedules.ts @@ -0,0 +1,443 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/schedulesMappers"; +import * as Parameters from "../models/parameters"; +import { LabServicesClientContext } from "../labServicesClientContext"; + +/** Class representing a Schedules. */ +export class Schedules { + private readonly client: LabServicesClientContext; + + /** + * Create a Schedules. + * @param {LabServicesClientContext} client Reference to the service client. + */ + constructor(client: LabServicesClientContext) { + this.client = client; + } + + /** + * Returns a list of all schedules for a lab. + * @summary Get all schedules for a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + listByLab(resourceGroupName: string, labName: string, options?: Models.SchedulesListByLabOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param callback The callback + */ + listByLab(resourceGroupName: string, labName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + listByLab(resourceGroupName: string, labName: string, options: Models.SchedulesListByLabOptionalParams, callback: msRest.ServiceCallback): void; + listByLab(resourceGroupName: string, labName: string, options?: Models.SchedulesListByLabOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labName, + options + }, + listByLabOperationSpec, + callback) as Promise; + } + + /** + * Returns the properties of a lab Schedule. + * @summary Get a lab Schedule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param callback The callback + */ + get(resourceGroupName: string, labName: string, scheduleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, labName: string, scheduleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labName, + scheduleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Operation to create or update a lab schedule. + * @summary Create or update a lab schedule. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(body: Models.Schedule, resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param callback The callback + */ + createOrUpdate(body: Models.Schedule, resourceGroupName: string, labName: string, scheduleName: string, callback: msRest.ServiceCallback): void; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(body: Models.Schedule, resourceGroupName: string, labName: string, scheduleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(body: Models.Schedule, resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + resourceGroupName, + labName, + scheduleName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Operation to update a lab schedule. + * @summary Update a lab schedule. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + update(body: Models.ScheduleUpdate, resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param callback The callback + */ + update(body: Models.ScheduleUpdate, resourceGroupName: string, labName: string, scheduleName: string, callback: msRest.ServiceCallback): void; + /** + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + update(body: Models.ScheduleUpdate, resourceGroupName: string, labName: string, scheduleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(body: Models.ScheduleUpdate, resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + resourceGroupName, + labName, + scheduleName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Operation to delete a schedule resource. + * @summary Deletes a schedule resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,labName,scheduleName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Operation to delete a schedule resource. + * @summary Deletes a schedule resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, labName: string, scheduleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + scheduleName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Returns a list of all schedules for a lab. + * @summary Get all schedules for a lab. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLabNext(nextPageLink: string, options?: Models.SchedulesListByLabNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLabNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLabNext(nextPageLink: string, options: Models.SchedulesListByLabNextOptionalParams, callback: msRest.ServiceCallback): void; + listByLabNext(nextPageLink: string, options?: Models.SchedulesListByLabNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLabNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByLabOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedSchedules + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.scheduleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Schedule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.scheduleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.Schedule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Schedule + }, + 201: { + bodyMapper: Mappers.Schedule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.scheduleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ScheduleUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Schedule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.scheduleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByLabNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedSchedules + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/labservices/arm-labservices/src/operations/users.ts b/sdk/labservices/arm-labservices/src/operations/users.ts index 26a244f6129e..3c818d1047b2 100644 --- a/sdk/labservices/arm-labservices/src/operations/users.ts +++ b/sdk/labservices/arm-labservices/src/operations/users.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,88 +12,91 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/usersMappers"; import * as Parameters from "../models/parameters"; -import { ManagedLabsClientContext } from "../managedLabsClientContext"; +import { LabServicesClientContext } from "../labServicesClientContext"; /** Class representing a Users. */ export class Users { - private readonly client: ManagedLabsClientContext; + private readonly client: LabServicesClientContext; /** * Create a Users. - * @param {ManagedLabsClientContext} client Reference to the service client. + * @param {LabServicesClientContext} client Reference to the service client. */ - constructor(client: ManagedLabsClientContext) { + constructor(client: LabServicesClientContext) { this.client = client; } /** - * List users in a given lab. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * Returns a list of all users for a lab. + * @summary Get all users for a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.UsersListOptionalParams): Promise; + listByLab(resourceGroupName: string, labName: string, options?: Models.UsersListByLabOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param callback The callback */ - list(resourceGroupName: string, labAccountName: string, labName: string, callback: msRest.ServiceCallback): void; + listByLab(resourceGroupName: string, labName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. * @param options The optional parameters * @param callback The callback */ - list(resourceGroupName: string, labAccountName: string, labName: string, options: Models.UsersListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, labAccountName: string, labName: string, options?: Models.UsersListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByLab(resourceGroupName: string, labName: string, options: Models.UsersListByLabOptionalParams, callback: msRest.ServiceCallback): void; + listByLab(resourceGroupName: string, labName: string, options?: Models.UsersListByLabOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - labAccountName, labName, options }, - listOperationSpec, - callback) as Promise; + listByLabOperationSpec, + callback) as Promise; } /** - * Get user - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. + * Returns the properties of a lab user. + * @summary Get a lab user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, labAccountName: string, labName: string, userName: string, options?: Models.UsersGetOptionalParams): Promise; + get(resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param callback The callback */ - get(resourceGroupName: string, labAccountName: string, labName: string, userName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, labAccountName: string, labName: string, userName: string, options: Models.UsersGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, labAccountName: string, labName: string, userName: string, options?: Models.UsersGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, labName: string, userName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - labAccountName, labName, userName, options @@ -104,185 +106,223 @@ export class Users { } /** - * Create or replace an existing User. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab + * Operation to create or update a lab user. + * @summary Create or update a lab user. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.User, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(body: Models.User, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(body,resourceGroupName,labName,userName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab - * @param callback The callback + * Operation to update a lab user. + * @summary Update a lab user. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.User, callback: msRest.ServiceCallback): void; + update(body: Models.UserUpdate, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,labName,userName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab - * @param options The optional parameters - * @param callback The callback + * Operation to delete a user resource. + * @summary Deletes a user resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.User, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.User, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - labAccountName, - labName, - userName, - user, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + deleteMethod(resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,labName,userName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** - * Delete user. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. + * Operation to invite a user to a lab. + * @summary Invite a user to a lab. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, labAccountName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,labAccountName,labName,userName,options) + invite(body: Models.InviteBody, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginInvite(body,resourceGroupName,labName,userName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } /** - * Modify properties of users. - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab + * Operation to create or update a lab user. + * @summary Create or update a lab user. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.UserFragment, options?: msRest.RequestOptionsBase): Promise; + beginCreateOrUpdate(body: Models.User, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labName, + userName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab - * @param callback The callback + * Operation to update a lab user. + * @summary Update a lab user. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.UserFragment, callback: msRest.ServiceCallback): void; + beginUpdate(body: Models.UserUpdate, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labName, + userName, + options + }, + beginUpdateOperationSpec, + options); + } + /** - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. - * @param user The User registered to a lab - * @param options The optional parameters - * @param callback The callback + * Operation to delete a user resource. + * @summary Deletes a user resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.UserFragment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, labAccountName: string, labName: string, userName: string, user: Models.UserFragment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, - labAccountName, labName, userName, - user, options }, - updateOperationSpec, - callback) as Promise; + beginDeleteMethodOperationSpec, + options); } /** - * Delete user. This operation can take a while to complete - * @param resourceGroupName The name of the resource group. - * @param labAccountName The name of the lab Account. - * @param labName The name of the lab. - * @param userName The name of the user. + * Operation to invite a user to a lab. + * @summary Invite a user to a lab. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param userName The name of the user that uniquely identifies it within containing lab. Used in + * resource URIs. * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, labAccountName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { + beginInvite(body: Models.InviteBody, resourceGroupName: string, labName: string, userName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { + body, resourceGroupName, - labAccountName, labName, userName, options }, - beginDeleteMethodOperationSpec, + beginInviteOperationSpec, options); } /** - * List users in a given lab. + * Returns a list of all users for a lab. + * @summary Get all users for a lab. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByLabNext(nextPageLink: string, options?: Models.UsersListByLabNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByLabNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByLabNext(nextPageLink: string, options: Models.UsersListByLabNextOptionalParams, callback: msRest.ServiceCallback): void; + listByLabNext(nextPageLink: string, options?: Models.UsersListByLabNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByLabNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByLabOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/users", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName ], queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion + Parameters.apiVersion, + Parameters.filter ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ResponseWithContinuationUser + bodyMapper: Mappers.PagedUsers }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -290,16 +330,14 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/users/{userName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName, Parameters.userName ], queryParameters: [ - Parameters.expand, Parameters.apiVersion ], headerParameters: [ @@ -310,19 +348,18 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.User }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/users/{userName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName, Parameters.userName ], @@ -333,7 +370,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "user", + parameterPath: "body", mapper: { ...Mappers.User, required: true @@ -346,20 +383,22 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.User }, + 202: { + bodyMapper: Mappers.User + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const updateOperationSpec: msRest.OperationSpec = { +const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/users/{userName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName, Parameters.userName ], @@ -370,9 +409,9 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "user", + parameterPath: "body", mapper: { - ...Mappers.UserFragment, + ...Mappers.UserUpdate, required: true } }, @@ -380,8 +419,11 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.User }, + 202: { + bodyMapper: Mappers.User + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -389,11 +431,10 @@ const updateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/users/{userName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.labAccountName, Parameters.labName, Parameters.userName ], @@ -404,31 +445,68 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginInviteOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}/invite", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.userName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.InviteBody, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByLabNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ResponseWithContinuationUser + bodyMapper: Mappers.PagedUsers }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/labservices/arm-labservices/src/operations/virtualMachines.ts b/sdk/labservices/arm-labservices/src/operations/virtualMachines.ts new file mode 100644 index 000000000000..48b794523110 --- /dev/null +++ b/sdk/labservices/arm-labservices/src/operations/virtualMachines.ts @@ -0,0 +1,551 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualMachinesMappers"; +import * as Parameters from "../models/parameters"; +import { LabServicesClientContext } from "../labServicesClientContext"; + +/** Class representing a VirtualMachines. */ +export class VirtualMachines { + private readonly client: LabServicesClientContext; + + /** + * Create a VirtualMachines. + * @param {LabServicesClientContext} client Reference to the service client. + */ + constructor(client: LabServicesClientContext) { + this.client = client; + } + + /** + * Returns a list of all virtual machines for a lab. + * @summary Get all virtual machines for a lab. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + listByLab(resourceGroupName: string, labName: string, options?: Models.VirtualMachinesListByLabOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param callback The callback + */ + listByLab(resourceGroupName: string, labName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + listByLab(resourceGroupName: string, labName: string, options: Models.VirtualMachinesListByLabOptionalParams, callback: msRest.ServiceCallback): void; + listByLab(resourceGroupName: string, labName: string, options?: Models.VirtualMachinesListByLabOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labName, + options + }, + listByLabOperationSpec, + callback) as Promise; + } + + /** + * Returns the properties for a lab virtual machine. + * @summary Get a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param callback The callback + */ + get(resourceGroupName: string, labName: string, virtualMachineName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, labName: string, virtualMachineName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + labName, + virtualMachineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Action to start a lab virtual machine. + * @summary Start a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,labName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Action to stop a lab virtual machine. + * @summary Stop a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,labName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the + * latest published snapshot of the reference environment of the lab. + * @summary Re-image a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + reimage(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginReimage(resourceGroupName,labName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Action to redeploy a lab virtual machine to a different compute node. For troubleshooting + * connectivity. + * @summary Redeploy a lab virtual machine to a different compute node. For troubleshooting + * connectivity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + redeploy(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRedeploy(resourceGroupName,labName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Resets a lab virtual machine password. + * @summary Reset a lab virtual machine password. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + resetPassword(body: Models.ResetPasswordBody, resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginResetPassword(body,resourceGroupName,labName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Action to start a lab virtual machine. + * @summary Start a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + virtualMachineName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Action to stop a lab virtual machine. + * @summary Stop a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + virtualMachineName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the + * latest published snapshot of the reference environment of the lab. + * @summary Re-image a lab virtual machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginReimage(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + virtualMachineName, + options + }, + beginReimageOperationSpec, + options); + } + + /** + * Action to redeploy a lab virtual machine to a different compute node. For troubleshooting + * connectivity. + * @summary Redeploy a lab virtual machine to a different compute node. For troubleshooting + * connectivity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginRedeploy(resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + labName, + virtualMachineName, + options + }, + beginRedeployOperationSpec, + options); + } + + /** + * Resets a lab virtual machine password. + * @summary Reset a lab virtual machine password. + * @param body The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param labName The name of the lab that uniquely identifies it within containing lab account. + * Used in resource URIs. + * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the + * containing lab. Used in resource URIs. + * @param [options] The optional parameters + * @returns Promise + */ + beginResetPassword(body: Models.ResetPasswordBody, resourceGroupName: string, labName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + labName, + virtualMachineName, + options + }, + beginResetPasswordOperationSpec, + options); + } + + /** + * Returns a list of all virtual machines for a lab. + * @summary Get all virtual machines for a lab. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLabNext(nextPageLink: string, options?: Models.VirtualMachinesListByLabNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLabNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLabNext(nextPageLink: string, options: Models.VirtualMachinesListByLabNextOptionalParams, callback: msRest.ServiceCallback): void; + listByLabNext(nextPageLink: string, options?: Models.VirtualMachinesListByLabNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLabNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByLabOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedVirtualMachines + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachine + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginReimageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/reimage", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRedeployOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/redeploy", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginResetPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/resetPassword", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.labName, + Parameters.virtualMachineName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ResetPasswordBody, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByLabNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PagedVirtualMachines + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/labservices/arm-labservices/tsconfig.json b/sdk/labservices/arm-labservices/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/labservices/arm-labservices/tsconfig.json +++ b/sdk/labservices/arm-labservices/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true