diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 43ed123b3ce6..e82fb5440a55 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -624,6 +624,9 @@ # PRLabel: %Mgmt /sdk/quota/arm-quota @qiaozha @dw511214992 +# PRLabel: %Mgmt +sdk/desktopvirtualization/arm-desktopvirtualization @qiaozha @dw511214992 + # PRLabel: %Monitor /sdk/monitor/ @hectorhdzg @applicationinsights-js-owners /sdk/monitor/monitor-query @KarishmaGhiya @maorleger diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index da26d72a7192..de4cd97d3727 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -17,6 +17,7 @@ specifiers: '@rush-temp/arm-containerregistry': file:./projects/arm-containerregistry.tgz '@rush-temp/arm-containerservice': file:./projects/arm-containerservice.tgz '@rush-temp/arm-databricks': file:./projects/arm-databricks.tgz + '@rush-temp/arm-desktopvirtualization': file:./projects/arm-desktopvirtualization.tgz '@rush-temp/arm-eventgrid': file:./projects/arm-eventgrid.tgz '@rush-temp/arm-eventhub': file:./projects/arm-eventhub.tgz '@rush-temp/arm-extendedlocation': file:./projects/arm-extendedlocation.tgz @@ -167,6 +168,7 @@ dependencies: '@rush-temp/arm-containerregistry': file:projects/arm-containerregistry.tgz '@rush-temp/arm-containerservice': file:projects/arm-containerservice.tgz '@rush-temp/arm-databricks': file:projects/arm-databricks.tgz + '@rush-temp/arm-desktopvirtualization': file:projects/arm-desktopvirtualization.tgz '@rush-temp/arm-eventgrid': file:projects/arm-eventgrid.tgz '@rush-temp/arm-eventhub': file:projects/arm-eventhub.tgz '@rush-temp/arm-extendedlocation': file:projects/arm-extendedlocation.tgz @@ -8848,6 +8850,7 @@ packages: name: '@rush-temp/arm-databricks' version: 0.0.0 dependencies: + '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -8863,6 +8866,30 @@ packages: uglify-js: 3.14.2 dev: false + file:projects/arm-desktopvirtualization.tgz: + resolution: {integrity: sha512-z1ZpQDQ9WTgpWBQfKTGm9Wd3I/8iDHqaSJPBiEnswAYrp8iVwfC4bsI8g0yLstDwFE8wdm4kP+HdpzrSZMzNEg==, tarball: file:projects/arm-desktopvirtualization.tgz} + name: '@rush-temp/arm-desktopvirtualization' + version: 0.0.0 + dependencies: + '@azure/identity': 2.0.0-beta.6 + '@microsoft/api-extractor': 7.18.17 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.2 + transitivePeerDependencies: + - debug + - supports-color + dev: false + file:projects/arm-eventgrid.tgz: resolution: {integrity: sha512-wRR2xwHMk8CUACJYBJgH9MUekJBJ4J2ilCWvL1L+6t1Gwn4JCOQWKogbFnohaZtujwJFLh1pJC48ZS1XiV9dOQ==, tarball: file:projects/arm-eventgrid.tgz} name: '@rush-temp/arm-eventgrid' @@ -9051,6 +9078,7 @@ packages: name: '@rush-temp/arm-mediaservices' version: 0.0.0 dependencies: + '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -9116,6 +9144,7 @@ packages: name: '@rush-temp/arm-notificationhubs' version: 0.0.0 dependencies: + '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -9442,6 +9471,7 @@ packages: name: '@rush-temp/arm-streamanalytics' version: 0.0.0 dependencies: + '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.18.17 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -9481,6 +9511,7 @@ packages: name: '@rush-temp/arm-videoanalyzer' version: 0.0.0 dependencies: + '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -9919,7 +9950,6 @@ packages: tslib: 2.3.1 typedoc: 0.15.2 typescript: 4.2.4 - uuid: 8.3.2 transitivePeerDependencies: - bufferutil - debug @@ -12351,7 +12381,6 @@ packages: name: '@rush-temp/perf-storage-blob' version: 0.0.0 dependencies: - '@azure/storage-blob': 12.8.0 '@types/node': 12.20.36 '@types/node-fetch': 2.5.12 '@types/uuid': 8.3.1 @@ -13099,7 +13128,6 @@ packages: version: 0.0.0 dependencies: '@azure/core-tracing': 1.0.0-preview.13 - '@azure/storage-blob': 12.8.0 '@microsoft/api-extractor': 7.18.17 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 diff --git a/eng/ignore-links.txt b/eng/ignore-links.txt index 5bdc2d90a839..fcfc68f35e4b 100644 --- a/eng/ignore-links.txt +++ b/eng/ignore-links.txt @@ -8,13 +8,5 @@ https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-cha https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/typescript https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/test/ https://github.com/Azure/azure-digital-twins/blob/private-preview/Documentation/how-to-manage-routes.md -https://docs.microsoft.com/javascript/api/@azure/arm-purview -https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/arm-purview -https://docs.microsoft.com/javascript/api/@azure/arm-quota -https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-quota -https://docs.microsoft.com/javascript/api/@azure/arm-extendedlocation -https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-extendedlocation -https://docs.microsoft.com/javascript/api/@azure/arm-videoanalyzer -https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/videoanalyzer/arm-videoanalyzer -https://docs.microsoft.com/javascript/api/@azure/arm-servicefabric -https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabric/arm-servicefabric +https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization +https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization diff --git a/rush.json b/rush.json index 31caa60eff76..a88c36569058 100644 --- a/rush.json +++ b/rush.json @@ -1060,6 +1060,11 @@ "packageName": "@azure/arm-mysql", "projectFolder": "sdk/mysql/arm-mysql", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-desktopvirtualization", + "projectFolder": "sdk/desktopvirtualization/arm-desktopvirtualization", + "versionPolicyName": "management" } ] -} \ No newline at end of file +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md new file mode 100644 index 000000000000..edb67b85cc38 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0-beta.1 (2021-11-03) + + - Initial Release diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/LICENSE b/sdk/desktopvirtualization/arm-desktopvirtualization/LICENSE new file mode 100644 index 000000000000..ccb63b166732 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/README.md b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md new file mode 100644 index 000000000000..aab70b5b2673 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md @@ -0,0 +1,94 @@ +# Azure Desktop Virtualization API client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Desktop Virtualization API client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-desktopvirtualization) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-desktopvirtualization` package + +Install the Azure Desktop Virtualization API client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-desktopvirtualization +``` + +### Create and authenticate a `DesktopVirtualizationAPIClient` + +To create a client object to access the Azure Desktop Virtualization API API, you will need the `endpoint` of your Azure Desktop Virtualization API resource and a `credential`. The Azure Desktop Virtualization API client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Desktop Virtualization API resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Desktop Virtualization API** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { DesktopVirtualizationAPIClient } = require("@azure/arm-desktopvirtualization"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new DesktopVirtualizationAPIClient(new DefaultAzureCredential(), subscriptionId); +``` + +## Key concepts + +### DesktopVirtualizationAPIClient + +`DesktopVirtualizationAPIClient` is the primary interface for developers using the Azure Desktop Virtualization API client library. Explore the methods on this client object to understand the different features of the Azure Desktop Virtualization API service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdesktopvirtualization%2Farm-desktopvirtualization%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json new file mode 100644 index 000000000000..ec89afee1e19 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "0fba9ba4b78d20fc1a7ec251dab889b7a7eb8afd", + "readme": "specification/desktopvirtualization/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/desktopvirtualization/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.14", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-beta.14" +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/api-extractor.json b/sdk/desktopvirtualization/arm-desktopvirtualization/api-extractor.json new file mode 100644 index 000000000000..19402970b50e --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-desktopvirtualization.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json new file mode 100644 index 000000000000..fa127d83acce --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json @@ -0,0 +1,89 @@ +{ + "name": "@azure/arm-desktopvirtualization", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for DesktopVirtualizationAPIClient.", + "version": "1.0.0-beta.1", + "engines": { "node": ">=12.0.0" }, + "dependencies": { + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" + }, + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-desktopvirtualization.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "echo skipped", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/recordings/node/my_test/recording_sample_test.js b/sdk/desktopvirtualization/arm-desktopvirtualization/recordings/node/my_test/recording_sample_test.js new file mode 100644 index 000000000000..0f6ecb857acf --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/recordings/node/my_test/recording_sample_test.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md new file mode 100644 index 000000000000..b4ab290af8a6 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md @@ -0,0 +1,1668 @@ +## API Report File for "@azure/arm-desktopvirtualization" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; + +// @public +export type Application = Resource & { + readonly systemData?: SystemData; + readonly objectId?: string; + description?: string; + friendlyName?: string; + filePath?: string; + msixPackageFamilyName?: string; + msixPackageApplicationId?: string; + applicationType?: RemoteApplicationType; + commandLineSetting: CommandLineSetting; + commandLineArguments?: string; + showInPortal?: boolean; + iconPath?: string; + iconIndex?: number; + readonly iconHash?: string; + readonly iconContent?: Uint8Array; +}; + +// @public +export type ApplicationGroup = ResourceModelWithAllowedPropertySet & { + readonly systemData?: SystemData; + readonly objectId?: string; + description?: string; + friendlyName?: string; + hostPoolArmPath: string; + readonly workspaceArmPath?: string; + applicationGroupType: ApplicationGroupType; + migrationRequest?: MigrationRequestProperties; + readonly cloudPcResource?: boolean; +}; + +// @public +export interface ApplicationGroupList { + readonly nextLink?: string; + value?: ApplicationGroup[]; +} + +// @public +export type ApplicationGroupPatch = Resource & { + tags?: { + [propertyName: string]: string; + }; + description?: string; + friendlyName?: string; +}; + +// @public +export interface ApplicationGroups { + createOrUpdate(resourceGroupName: string, applicationGroupName: string, applicationGroup: ApplicationGroup, options?: ApplicationGroupsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, applicationGroupName: string, options?: ApplicationGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, applicationGroupName: string, options?: ApplicationGroupsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ApplicationGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ApplicationGroupsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, applicationGroupName: string, options?: ApplicationGroupsUpdateOptionalParams): Promise; +} + +// @public +export interface ApplicationGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupsCreateOrUpdateResponse = ApplicationGroup; + +// @public +export interface ApplicationGroupsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ApplicationGroupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupsGetResponse = ApplicationGroup; + +// @public +export interface ApplicationGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ApplicationGroupsListByResourceGroupNextResponse = ApplicationGroupList; + +// @public +export interface ApplicationGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ApplicationGroupsListByResourceGroupResponse = ApplicationGroupList; + +// @public +export interface ApplicationGroupsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ApplicationGroupsListBySubscriptionNextResponse = ApplicationGroupList; + +// @public +export interface ApplicationGroupsListBySubscriptionOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ApplicationGroupsListBySubscriptionResponse = ApplicationGroupList; + +// @public +export interface ApplicationGroupsUpdateOptionalParams extends coreClient.OperationOptions { + applicationGroup?: ApplicationGroupPatch; +} + +// @public +export type ApplicationGroupsUpdateResponse = ApplicationGroup; + +// @public +export type ApplicationGroupType = string; + +// @public +export interface ApplicationList { + readonly nextLink?: string; + value?: Application[]; +} + +// @public +export interface ApplicationPatch { + applicationType?: RemoteApplicationType; + commandLineArguments?: string; + commandLineSetting?: CommandLineSetting; + description?: string; + filePath?: string; + friendlyName?: string; + iconIndex?: number; + iconPath?: string; + msixPackageApplicationId?: string; + msixPackageFamilyName?: string; + showInPortal?: boolean; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Applications { + createOrUpdate(resourceGroupName: string, applicationGroupName: string, applicationName: string, application: Application, options?: ApplicationsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, applicationGroupName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, applicationGroupName: string, applicationName: string, options?: ApplicationsGetOptionalParams): Promise; + list(resourceGroupName: string, applicationGroupName: string, options?: ApplicationsListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, applicationGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams): Promise; +} + +// @public +export interface ApplicationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsCreateOrUpdateResponse = Application; + +// @public +export interface ApplicationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ApplicationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsGetResponse = Application; + +// @public +export interface ApplicationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsListNextResponse = ApplicationList; + +// @public +export interface ApplicationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationsListResponse = ApplicationList; + +// @public +export interface ApplicationsUpdateOptionalParams extends coreClient.OperationOptions { + application?: ApplicationPatch; +} + +// @public +export type ApplicationsUpdateResponse = Application; + +// @public +export type ApplicationType = string; + +// @public +export interface CloudError { + error?: CloudErrorProperties; +} + +// @public +export interface CloudErrorProperties { + code?: string; + message?: string; +} + +// @public +export type CommandLineSetting = string; + +// @public +export type CreatedByType = string; + +// @public +export type Desktop = Resource & { + readonly systemData?: SystemData; + readonly objectId?: string; + description?: string; + friendlyName?: string; + readonly iconHash?: string; + readonly iconContent?: Uint8Array; +}; + +// @public +export interface DesktopList { + readonly nextLink?: string; + value?: Desktop[]; +} + +// @public +export interface DesktopPatch { + description?: string; + friendlyName?: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Desktops { + get(resourceGroupName: string, applicationGroupName: string, desktopName: string, options?: DesktopsGetOptionalParams): Promise; + list(resourceGroupName: string, applicationGroupName: string, options?: DesktopsListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, applicationGroupName: string, desktopName: string, options?: DesktopsUpdateOptionalParams): Promise; +} + +// @public +export interface DesktopsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DesktopsGetResponse = Desktop; + +// @public +export interface DesktopsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DesktopsListNextResponse = DesktopList; + +// @public +export interface DesktopsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DesktopsListResponse = DesktopList; + +// @public +export interface DesktopsUpdateOptionalParams extends coreClient.OperationOptions { + desktop?: DesktopPatch; +} + +// @public +export type DesktopsUpdateResponse = Desktop; + +// @public (undocumented) +export class DesktopVirtualizationAPIClient extends DesktopVirtualizationAPIClientContext { + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DesktopVirtualizationAPIClientOptionalParams); + // (undocumented) + applicationGroups: ApplicationGroups; + // (undocumented) + applications: Applications; + // (undocumented) + desktops: Desktops; + // (undocumented) + hostPools: HostPools; + // (undocumented) + msixImages: MsixImages; + // (undocumented) + msixPackages: MsixPackages; + // (undocumented) + operations: Operations; + // (undocumented) + privateEndpointConnections: PrivateEndpointConnections; + // (undocumented) + privateLinkResources: PrivateLinkResources; + // (undocumented) + scalingPlans: ScalingPlans; + // (undocumented) + sessionHosts: SessionHosts; + // (undocumented) + startMenuItems: StartMenuItems; + // (undocumented) + userSessions: UserSessions; + // (undocumented) + workspaces: Workspaces; +} + +// @public (undocumented) +export class DesktopVirtualizationAPIClientContext extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DesktopVirtualizationAPIClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface DesktopVirtualizationAPIClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type ExpandMsixImage = Resource & { + packageAlias?: string; + imagePath?: string; + packageName?: string; + packageFamilyName?: string; + packageFullName?: string; + displayName?: string; + packageRelativePath?: string; + isRegularRegistration?: boolean; + isActive?: boolean; + packageDependencies?: MsixPackageDependencies[]; + version?: string; + lastUpdated?: Date; + packageApplications?: MsixPackageApplications[]; +}; + +// @public +export interface ExpandMsixImageList { + readonly nextLink?: string; + value?: ExpandMsixImage[]; +} + +// @public +export type HealthCheckName = string; + +// @public +export type HealthCheckResult = string; + +// @public +export type HostPool = ResourceModelWithAllowedPropertySet & { + readonly systemData?: SystemData; + readonly objectId?: string; + friendlyName?: string; + description?: string; + hostPoolType: HostPoolType; + personalDesktopAssignmentType?: PersonalDesktopAssignmentType; + customRdpProperty?: string; + maxSessionLimit?: number; + loadBalancerType: LoadBalancerType; + ring?: number; + validationEnvironment?: boolean; + registrationInfo?: RegistrationInfo; + vmTemplate?: string; + readonly applicationGroupReferences?: string[]; + ssoadfsAuthority?: string; + ssoClientId?: string; + ssoClientSecretKeyVaultPath?: string; + ssoSecretType?: SSOSecretType; + preferredAppGroupType: PreferredAppGroupType; + startVMOnConnect?: boolean; + migrationRequest?: MigrationRequestProperties; + readonly cloudPcResource?: boolean; + publicNetworkAccess?: PublicNetworkAccess; +}; + +// @public +export interface HostPoolList { + readonly nextLink?: string; + value?: HostPool[]; +} + +// @public +export type HostPoolPatch = Resource & { + tags?: { + [propertyName: string]: string; + }; + friendlyName?: string; + description?: string; + customRdpProperty?: string; + maxSessionLimit?: number; + personalDesktopAssignmentType?: PersonalDesktopAssignmentType; + loadBalancerType?: LoadBalancerType; + ring?: number; + validationEnvironment?: boolean; + registrationInfo?: RegistrationInfoPatch; + vmTemplate?: string; + ssoadfsAuthority?: string; + ssoClientId?: string; + ssoClientSecretKeyVaultPath?: string; + ssoSecretType?: SSOSecretType; + preferredAppGroupType?: PreferredAppGroupType; + startVMOnConnect?: boolean; + publicNetworkAccess?: PublicNetworkAccess; +}; + +// @public +export interface HostPools { + createOrUpdate(resourceGroupName: string, hostPoolName: string, hostPool: HostPool, options?: HostPoolsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, hostPoolName: string, options?: HostPoolsDeleteOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, options?: HostPoolsGetOptionalParams): Promise; + list(options?: HostPoolsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: HostPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + retrieveRegistrationToken(resourceGroupName: string, hostPoolName: string, options?: HostPoolsRetrieveRegistrationTokenOptionalParams): Promise; + update(resourceGroupName: string, hostPoolName: string, options?: HostPoolsUpdateOptionalParams): Promise; +} + +// @public +export interface HostPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsCreateOrUpdateResponse = HostPool; + +// @public +export interface HostPoolsDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; +} + +// @public +export interface HostPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsGetResponse = HostPool; + +// @public +export interface HostPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsListByResourceGroupNextResponse = HostPoolList; + +// @public +export interface HostPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsListByResourceGroupResponse = HostPoolList; + +// @public +export interface HostPoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsListNextResponse = HostPoolList; + +// @public +export interface HostPoolsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsListResponse = HostPoolList; + +// @public +export interface HostPoolsRetrieveRegistrationTokenOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HostPoolsRetrieveRegistrationTokenResponse = RegistrationInfo; + +// @public +export interface HostPoolsUpdateOptionalParams extends coreClient.OperationOptions { + hostPool?: HostPoolPatch; +} + +// @public +export type HostPoolsUpdateResponse = HostPool; + +// @public +export type HostPoolType = string; + +// @public +export interface Identity { + readonly principalId?: string; + readonly tenantId?: string; + type?: "SystemAssigned"; +} + +// @public +export enum KnownApplicationGroupType { + // (undocumented) + Desktop = "Desktop", + // (undocumented) + RemoteApp = "RemoteApp" +} + +// @public +export enum KnownApplicationType { + // (undocumented) + Desktop = "Desktop", + // (undocumented) + RemoteApp = "RemoteApp" +} + +// @public +export enum KnownCommandLineSetting { + // (undocumented) + Allow = "Allow", + // (undocumented) + DoNotAllow = "DoNotAllow", + // (undocumented) + Require = "Require" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownHealthCheckName { + AppAttachHealthCheck = "AppAttachHealthCheck", + DomainJoinedCheck = "DomainJoinedCheck", + DomainReachable = "DomainReachable", + DomainTrustCheck = "DomainTrustCheck", + FSLogixHealthCheck = "FSLogixHealthCheck", + MetaDataServiceCheck = "MetaDataServiceCheck", + MonitoringAgentCheck = "MonitoringAgentCheck", + SupportedEncryptionCheck = "SupportedEncryptionCheck", + SxSStackListenerCheck = "SxSStackListenerCheck", + UrlsAccessibleCheck = "UrlsAccessibleCheck", + WebRTCRedirectorCheck = "WebRTCRedirectorCheck" +} + +// @public +export enum KnownHealthCheckResult { + HealthCheckFailed = "HealthCheckFailed", + HealthCheckSucceeded = "HealthCheckSucceeded", + SessionHostShutdown = "SessionHostShutdown", + Unknown = "Unknown" +} + +// @public +export enum KnownHostPoolType { + BYODesktop = "BYODesktop", + Personal = "Personal", + Pooled = "Pooled" +} + +// @public +export enum KnownLoadBalancerType { + // (undocumented) + BreadthFirst = "BreadthFirst", + // (undocumented) + DepthFirst = "DepthFirst", + // (undocumented) + Persistent = "Persistent" +} + +// @public +export enum KnownOperation { + Complete = "Complete", + Hide = "Hide", + Revoke = "Revoke", + Start = "Start", + Unhide = "Unhide" +} + +// @public +export enum KnownPersonalDesktopAssignmentType { + // (undocumented) + Automatic = "Automatic", + // (undocumented) + Direct = "Direct" +} + +// @public +export enum KnownPreferredAppGroupType { + // (undocumented) + Desktop = "Desktop", + // (undocumented) + None = "None", + // (undocumented) + RailApplications = "RailApplications" +} + +// @public +export enum KnownPrivateEndpointConnectionProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + // (undocumented) + Approved = "Approved", + // (undocumented) + Pending = "Pending", + // (undocumented) + Rejected = "Rejected" +} + +// @public +export enum KnownPublicNetworkAccess { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownRegistrationTokenOperation { + // (undocumented) + Delete = "Delete", + // (undocumented) + None = "None", + // (undocumented) + Update = "Update" +} + +// @public +export enum KnownRemoteApplicationType { + // (undocumented) + InBuilt = "InBuilt", + // (undocumented) + MsixApplication = "MsixApplication" +} + +// @public +export enum KnownScalingHostPoolType { + Pooled = "Pooled" +} + +// @public +export enum KnownScalingScheduleDaysOfWeekItem { + // (undocumented) + Friday = "Friday", + // (undocumented) + Monday = "Monday", + // (undocumented) + Saturday = "Saturday", + // (undocumented) + Sunday = "Sunday", + // (undocumented) + Thursday = "Thursday", + // (undocumented) + Tuesday = "Tuesday", + // (undocumented) + Wednesday = "Wednesday" +} + +// @public +export enum KnownSessionHostLoadBalancingAlgorithm { + // (undocumented) + BreadthFirst = "BreadthFirst", + // (undocumented) + DepthFirst = "DepthFirst" +} + +// @public +export enum KnownSessionState { + // (undocumented) + Active = "Active", + // (undocumented) + Disconnected = "Disconnected", + // (undocumented) + LogOff = "LogOff", + // (undocumented) + Pending = "Pending", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + UserProfileDiskMounted = "UserProfileDiskMounted" +} + +// @public +export enum KnownSSOSecretType { + // (undocumented) + Certificate = "Certificate", + // (undocumented) + CertificateInKeyVault = "CertificateInKeyVault", + // (undocumented) + SharedKey = "SharedKey", + // (undocumented) + SharedKeyInKeyVault = "SharedKeyInKeyVault" +} + +// @public +export enum KnownStatus { + Available = "Available", + Disconnected = "Disconnected", + DomainTrustRelationshipLost = "DomainTrustRelationshipLost", + FSLogixNotHealthy = "FSLogixNotHealthy", + NeedsAssistance = "NeedsAssistance", + NoHeartbeat = "NoHeartbeat", + NotJoinedToDomain = "NotJoinedToDomain", + Shutdown = "Shutdown", + SxSStackListenerNotReady = "SxSStackListenerNotReady", + Unavailable = "Unavailable", + UpgradeFailed = "UpgradeFailed", + Upgrading = "Upgrading" +} + +// @public +export enum KnownStopHostsWhen { + // (undocumented) + ZeroActiveSessions = "ZeroActiveSessions", + // (undocumented) + ZeroSessions = "ZeroSessions" +} + +// @public +export enum KnownUpdateState { + // (undocumented) + Failed = "Failed", + // (undocumented) + Initial = "Initial", + // (undocumented) + Pending = "Pending", + // (undocumented) + Started = "Started", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export type LoadBalancerType = string; + +// @public +export interface LogSpecification { + blobDuration?: string; + displayName?: string; + name?: string; +} + +// @public +export interface MigrationRequestProperties { + migrationPath?: string; + operation?: Operation; +} + +// @public +export interface MsixImages { + listExpand(resourceGroupName: string, hostPoolName: string, msixImageURI: MsixImageURI, options?: MsixImagesExpandOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MsixImagesExpandNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixImagesExpandNextResponse = ExpandMsixImageList; + +// @public +export interface MsixImagesExpandOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixImagesExpandResponse = ExpandMsixImageList; + +// @public +export interface MsixImageURI { + uri?: string; +} + +// @public +export type MsixPackage = Resource & { + readonly systemData?: SystemData; + imagePath?: string; + packageName?: string; + packageFamilyName?: string; + displayName?: string; + packageRelativePath?: string; + isRegularRegistration?: boolean; + isActive?: boolean; + packageDependencies?: MsixPackageDependencies[]; + version?: string; + lastUpdated?: Date; + packageApplications?: MsixPackageApplications[]; +}; + +// @public +export interface MsixPackageApplications { + appId?: string; + appUserModelID?: string; + description?: string; + friendlyName?: string; + iconImageName?: string; + rawIcon?: Uint8Array; + rawPng?: Uint8Array; +} + +// @public +export interface MsixPackageDependencies { + dependencyName?: string; + minVersion?: string; + publisher?: string; +} + +// @public +export interface MsixPackageList { + readonly nextLink?: string; + value?: MsixPackage[]; +} + +// @public +export type MsixPackagePatch = Resource & { + isActive?: boolean; + isRegularRegistration?: boolean; + displayName?: string; +}; + +// @public +export interface MsixPackages { + createOrUpdate(resourceGroupName: string, hostPoolName: string, msixPackageFullName: string, msixPackage: MsixPackage, options?: MsixPackagesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, hostPoolName: string, msixPackageFullName: string, options?: MsixPackagesDeleteOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, msixPackageFullName: string, options?: MsixPackagesGetOptionalParams): Promise; + list(resourceGroupName: string, hostPoolName: string, options?: MsixPackagesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, hostPoolName: string, msixPackageFullName: string, options?: MsixPackagesUpdateOptionalParams): Promise; +} + +// @public +export interface MsixPackagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixPackagesCreateOrUpdateResponse = MsixPackage; + +// @public +export interface MsixPackagesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface MsixPackagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixPackagesGetResponse = MsixPackage; + +// @public +export interface MsixPackagesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixPackagesListNextResponse = MsixPackageList; + +// @public +export interface MsixPackagesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MsixPackagesListResponse = MsixPackageList; + +// @public +export interface MsixPackagesUpdateOptionalParams extends coreClient.OperationOptions { + msixPackage?: MsixPackagePatch; +} + +// @public +export type MsixPackagesUpdateResponse = MsixPackage; + +// @public +export type Operation = string; + +// @public +export interface OperationProperties { + serviceSpecification?: ServiceSpecification; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = ResourceProviderOperationList; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = ResourceProviderOperationList; + +// @public +export type PersonalDesktopAssignmentType = string; + +// @public +export interface Plan { + name: string; + product: string; + promotionCode?: string; + publisher: string; + version?: string; +} + +// @public +export type PreferredAppGroupType = string; + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export type PrivateEndpointConnection = Resource & { + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +// @public +export interface PrivateEndpointConnectionListResultWithSystemData { + readonly nextLink?: string; + value?: PrivateEndpointConnectionWithSystemData[]; +} + +// @public +export type PrivateEndpointConnectionProvisioningState = string; + +// @public +export interface PrivateEndpointConnections { + deleteByHostPool(resourceGroupName: string, hostPoolName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteByHostPoolOptionalParams): Promise; + deleteByWorkspace(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams): Promise; + getByHostPool(resourceGroupName: string, hostPoolName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetByHostPoolOptionalParams): Promise; + getByWorkspace(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetByWorkspaceOptionalParams): Promise; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: PrivateEndpointConnectionsListByHostPoolOptionalParams): PagedAsyncIterableIterator; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; + updateByHostPool(resourceGroupName: string, hostPoolName: string, privateEndpointConnectionName: string, connection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateByHostPoolOptionalParams): Promise; + updateByWorkspace(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, connection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams): Promise; +} + +// @public +export interface PrivateEndpointConnectionsDeleteByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface PrivateEndpointConnectionsGetByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsGetByHostPoolResponse = PrivateEndpointConnectionWithSystemData; + +// @public +export interface PrivateEndpointConnectionsGetByWorkspaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsGetByWorkspaceResponse = PrivateEndpointConnectionWithSystemData; + +// @public +export interface PrivateEndpointConnectionsListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByHostPoolNextResponse = PrivateEndpointConnectionListResultWithSystemData; + +// @public +export interface PrivateEndpointConnectionsListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByHostPoolResponse = PrivateEndpointConnectionListResultWithSystemData; + +// @public +export interface PrivateEndpointConnectionsListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByWorkspaceNextResponse = PrivateEndpointConnectionListResultWithSystemData; + +// @public +export interface PrivateEndpointConnectionsListByWorkspaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByWorkspaceResponse = PrivateEndpointConnectionListResultWithSystemData; + +// @public +export interface PrivateEndpointConnectionsUpdateByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsUpdateByHostPoolResponse = PrivateEndpointConnectionWithSystemData; + +// @public +export interface PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsUpdateByWorkspaceResponse = PrivateEndpointConnectionWithSystemData; + +// @public +export type PrivateEndpointConnectionWithSystemData = PrivateEndpointConnection & { + readonly systemData?: SystemData; +}; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export type PrivateLinkResource = Resource & { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +}; + +// @public +export interface PrivateLinkResourceListResult { + readonly nextLink?: string; + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkResources { + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: PrivateLinkResourcesListByHostPoolOptionalParams): PagedAsyncIterableIterator; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: PrivateLinkResourcesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkResourcesListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByHostPoolNextResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByHostPoolResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByWorkspaceNextResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesListByWorkspaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByWorkspaceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} + +// @public +export type PublicNetworkAccess = string; + +// @public +export interface RegistrationInfo { + expirationTime?: Date; + registrationTokenOperation?: RegistrationTokenOperation; + token?: string; +} + +// @public +export interface RegistrationInfoPatch { + expirationTime?: Date; + registrationTokenOperation?: RegistrationTokenOperation; +} + +// @public +export type RegistrationTokenOperation = string; + +// @public +export type RemoteApplicationType = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ResourceModelWithAllowedPropertySet { + readonly etag?: string; + readonly id?: string; + // (undocumented) + identity?: ResourceModelWithAllowedPropertySetIdentity; + kind?: string; + location?: string; + managedBy?: string; + readonly name?: string; + // (undocumented) + plan?: ResourceModelWithAllowedPropertySetPlan; + // (undocumented) + sku?: ResourceModelWithAllowedPropertySetSku; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public (undocumented) +export type ResourceModelWithAllowedPropertySetIdentity = Identity & {}; + +// @public (undocumented) +export type ResourceModelWithAllowedPropertySetPlan = Plan & {}; + +// @public (undocumented) +export type ResourceModelWithAllowedPropertySetSku = Sku & {}; + +// @public +export interface ResourceProviderOperation { + display?: ResourceProviderOperationDisplay; + isDataAction?: boolean; + name?: string; + properties?: OperationProperties; +} + +// @public +export interface ResourceProviderOperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface ResourceProviderOperationList { + readonly nextLink?: string; + value?: ResourceProviderOperation[]; +} + +// @public +export interface ScalingHostPoolReference { + hostPoolArmPath?: string; + scalingPlanEnabled?: boolean; +} + +// @public +export type ScalingHostPoolType = string; + +// @public +export type ScalingPlan = ResourceModelWithAllowedPropertySet & { + readonly systemData?: SystemData; + readonly objectId?: string; + description?: string; + friendlyName?: string; + timeZone?: string; + hostPoolType?: ScalingHostPoolType; + exclusionTag?: string; + schedules?: ScalingSchedule[]; + hostPoolReferences?: ScalingHostPoolReference[]; +}; + +// @public +export interface ScalingPlanList { + readonly nextLink?: string; + value?: ScalingPlan[]; +} + +// @public +export interface ScalingPlanPatch { + description?: string; + exclusionTag?: string; + friendlyName?: string; + hostPoolReferences?: ScalingHostPoolReference[]; + schedules?: ScalingSchedule[]; + tags?: { + [propertyName: string]: string; + }; + timeZone?: string; +} + +// @public +export interface ScalingPlans { + create(resourceGroupName: string, scalingPlanName: string, scalingPlan: ScalingPlan, options?: ScalingPlansCreateOptionalParams): Promise; + delete(resourceGroupName: string, scalingPlanName: string, options?: ScalingPlansDeleteOptionalParams): Promise; + get(resourceGroupName: string, scalingPlanName: string, options?: ScalingPlansGetOptionalParams): Promise; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: ScalingPlansListByHostPoolOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ScalingPlansListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ScalingPlansListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, scalingPlanName: string, options?: ScalingPlansUpdateOptionalParams): Promise; +} + +// @public +export interface ScalingPlansCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansCreateResponse = ScalingPlan; + +// @public +export interface ScalingPlansDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ScalingPlansGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansGetResponse = ScalingPlan; + +// @public +export interface ScalingPlansListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListByHostPoolNextResponse = ScalingPlanList; + +// @public +export interface ScalingPlansListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListByHostPoolResponse = ScalingPlanList; + +// @public +export interface ScalingPlansListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListByResourceGroupNextResponse = ScalingPlanList; + +// @public +export interface ScalingPlansListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListByResourceGroupResponse = ScalingPlanList; + +// @public +export interface ScalingPlansListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListBySubscriptionNextResponse = ScalingPlanList; + +// @public +export interface ScalingPlansListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ScalingPlansListBySubscriptionResponse = ScalingPlanList; + +// @public +export interface ScalingPlansUpdateOptionalParams extends coreClient.OperationOptions { + scalingPlan?: ScalingPlanPatch; +} + +// @public +export type ScalingPlansUpdateResponse = ScalingPlan; + +// @public +export interface ScalingSchedule { + daysOfWeek?: ScalingScheduleDaysOfWeekItem[]; + name?: string; + offPeakLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + offPeakStartTime?: Time; + peakLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + peakStartTime?: Time; + rampDownCapacityThresholdPct?: number; + rampDownForceLogoffUsers?: boolean; + rampDownLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + rampDownMinimumHostsPct?: number; + rampDownNotificationMessage?: string; + rampDownStartTime?: Time; + rampDownStopHostsWhen?: StopHostsWhen; + rampDownWaitTimeMinutes?: number; + rampUpCapacityThresholdPct?: number; + rampUpLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + rampUpMinimumHostsPct?: number; + rampUpStartTime?: Time; +} + +// @public +export type ScalingScheduleDaysOfWeekItem = string; + +// @public +export interface SendMessage { + messageBody?: string; + messageTitle?: string; +} + +// @public +export interface ServiceSpecification { + logSpecifications?: LogSpecification[]; +} + +// @public +export type SessionHost = Resource & { + readonly systemData?: SystemData; + readonly objectId?: string; + lastHeartBeat?: Date; + sessions?: number; + agentVersion?: string; + allowNewSession?: boolean; + readonly virtualMachineId?: string; + readonly resourceId?: string; + assignedUser?: string; + status?: Status; + readonly statusTimestamp?: Date; + osVersion?: string; + sxSStackVersion?: string; + updateState?: UpdateState; + readonly lastUpdateTime?: Date; + updateErrorMessage?: string; + readonly sessionHostHealthCheckResults?: SessionHostHealthCheckReport[]; +}; + +// @public +export interface SessionHostHealthCheckFailureDetails { + readonly errorCode?: number; + readonly lastHealthCheckDateTime?: Date; + readonly message?: string; +} + +// @public +export interface SessionHostHealthCheckReport { + readonly additionalFailureDetails?: SessionHostHealthCheckFailureDetails; + readonly healthCheckName?: HealthCheckName; + readonly healthCheckResult?: HealthCheckResult; +} + +// @public +export interface SessionHostList { + readonly nextLink?: string; + value?: SessionHost[]; +} + +// @public +export type SessionHostLoadBalancingAlgorithm = string; + +// @public +export type SessionHostPatch = Resource & { + allowNewSession?: boolean; + assignedUser?: string; +}; + +// @public +export interface SessionHosts { + delete(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: SessionHostsDeleteOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: SessionHostsGetOptionalParams): Promise; + list(resourceGroupName: string, hostPoolName: string, options?: SessionHostsListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: SessionHostsUpdateOptionalParams): Promise; +} + +// @public +export interface SessionHostsDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; +} + +// @public +export interface SessionHostsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostsGetResponse = SessionHost; + +// @public +export interface SessionHostsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostsListNextResponse = SessionHostList; + +// @public +export interface SessionHostsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostsListResponse = SessionHostList; + +// @public +export interface SessionHostsUpdateOptionalParams extends coreClient.OperationOptions { + force?: boolean; + sessionHost?: SessionHostPatch; +} + +// @public +export type SessionHostsUpdateResponse = SessionHost; + +// @public +export type SessionState = string; + +// @public +export interface Sku { + capacity?: number; + family?: string; + name: string; + size?: string; + tier?: SkuTier; +} + +// @public +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +// @public +export type SSOSecretType = string; + +// @public +export type StartMenuItem = Resource & { + appAlias?: string; + filePath?: string; + commandLineArguments?: string; + iconPath?: string; + iconIndex?: number; +}; + +// @public +export interface StartMenuItemList { + readonly nextLink?: string; + value?: StartMenuItem[]; +} + +// @public +export interface StartMenuItems { + list(resourceGroupName: string, applicationGroupName: string, options?: StartMenuItemsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StartMenuItemsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartMenuItemsListNextResponse = StartMenuItemList; + +// @public +export interface StartMenuItemsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartMenuItemsListResponse = StartMenuItemList; + +// @public +export type Status = string; + +// @public +export type StopHostsWhen = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Time { + hour: number; + minute: number; +} + +// @public +export type UpdateState = string; + +// @public +export type UserSession = Resource & { + readonly systemData?: SystemData; + readonly objectId?: string; + userPrincipalName?: string; + applicationType?: ApplicationType; + sessionState?: SessionState; + activeDirectoryUserName?: string; + createTime?: Date; +}; + +// @public +export interface UserSessionList { + readonly nextLink?: string; + value?: UserSession[]; +} + +// @public +export interface UserSessions { + delete(resourceGroupName: string, hostPoolName: string, sessionHostName: string, userSessionId: string, options?: UserSessionsDeleteOptionalParams): Promise; + disconnect(resourceGroupName: string, hostPoolName: string, sessionHostName: string, userSessionId: string, options?: UserSessionsDisconnectOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, sessionHostName: string, userSessionId: string, options?: UserSessionsGetOptionalParams): Promise; + list(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: UserSessionsListOptionalParams): PagedAsyncIterableIterator; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: UserSessionsListByHostPoolOptionalParams): PagedAsyncIterableIterator; + sendMessage(resourceGroupName: string, hostPoolName: string, sessionHostName: string, userSessionId: string, options?: UserSessionsSendMessageOptionalParams): Promise; +} + +// @public +export interface UserSessionsDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; +} + +// @public +export interface UserSessionsDisconnectOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface UserSessionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UserSessionsGetResponse = UserSession; + +// @public +export interface UserSessionsListByHostPoolNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type UserSessionsListByHostPoolNextResponse = UserSessionList; + +// @public +export interface UserSessionsListByHostPoolOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type UserSessionsListByHostPoolResponse = UserSessionList; + +// @public +export interface UserSessionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UserSessionsListNextResponse = UserSessionList; + +// @public +export interface UserSessionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UserSessionsListResponse = UserSessionList; + +// @public +export interface UserSessionsSendMessageOptionalParams extends coreClient.OperationOptions { + sendMessage?: SendMessage; +} + +// @public +export type Workspace = ResourceModelWithAllowedPropertySet & { + readonly systemData?: SystemData; + readonly objectId?: string; + description?: string; + friendlyName?: string; + applicationGroupReferences?: string[]; + readonly cloudPcResource?: boolean; + publicNetworkAccess?: PublicNetworkAccess; +}; + +// @public +export interface WorkspaceList { + readonly nextLink?: string; + value?: Workspace[]; +} + +// @public +export interface WorkspacePatch { + applicationGroupReferences?: string[]; + description?: string; + friendlyName?: string; + publicNetworkAccess?: PublicNetworkAccess; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Workspaces { + createOrUpdate(resourceGroupName: string, workspaceName: string, workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise; + get(resourceGroupName: string, workspaceName: string, options?: WorkspacesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: WorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: WorkspacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, workspaceName: string, options?: WorkspacesUpdateOptionalParams): Promise; +} + +// @public +export interface WorkspacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesCreateOrUpdateResponse = Workspace; + +// @public +export interface WorkspacesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WorkspacesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesGetResponse = Workspace; + +// @public +export interface WorkspacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesListByResourceGroupNextResponse = WorkspaceList; + +// @public +export interface WorkspacesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesListByResourceGroupResponse = WorkspaceList; + +// @public +export interface WorkspacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesListBySubscriptionNextResponse = WorkspaceList; + +// @public +export interface WorkspacesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspacesListBySubscriptionResponse = WorkspaceList; + +// @public +export interface WorkspacesUpdateOptionalParams extends coreClient.OperationOptions { + workspace?: WorkspacePatch; +} + +// @public +export type WorkspacesUpdateResponse = Workspace; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/rollup.config.js b/sdk/desktopvirtualization/arm-desktopvirtualization/rollup.config.js new file mode 100644 index 000000000000..9be1955eb7f1 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/rollup.config.js @@ -0,0 +1,188 @@ +/* + * 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts new file mode 100644 index 000000000000..6bddad700d13 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts @@ -0,0 +1,88 @@ +/* + * 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 coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + WorkspacesImpl, + ScalingPlansImpl, + ApplicationGroupsImpl, + StartMenuItemsImpl, + ApplicationsImpl, + DesktopsImpl, + HostPoolsImpl, + UserSessionsImpl, + SessionHostsImpl, + MsixPackagesImpl, + MsixImagesImpl, + PrivateEndpointConnectionsImpl, + PrivateLinkResourcesImpl +} from "./operations"; +import { + Operations, + Workspaces, + ScalingPlans, + ApplicationGroups, + StartMenuItems, + Applications, + Desktops, + HostPools, + UserSessions, + SessionHosts, + MsixPackages, + MsixImages, + PrivateEndpointConnections, + PrivateLinkResources +} from "./operationsInterfaces"; +import { DesktopVirtualizationAPIClientContext } from "./desktopVirtualizationAPIClientContext"; +import { DesktopVirtualizationAPIClientOptionalParams } from "./models"; + +export class DesktopVirtualizationAPIClient extends DesktopVirtualizationAPIClientContext { + /** + * Initializes a new instance of the DesktopVirtualizationAPIClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: DesktopVirtualizationAPIClientOptionalParams + ) { + super(credentials, subscriptionId, options); + this.operations = new OperationsImpl(this); + this.workspaces = new WorkspacesImpl(this); + this.scalingPlans = new ScalingPlansImpl(this); + this.applicationGroups = new ApplicationGroupsImpl(this); + this.startMenuItems = new StartMenuItemsImpl(this); + this.applications = new ApplicationsImpl(this); + this.desktops = new DesktopsImpl(this); + this.hostPools = new HostPoolsImpl(this); + this.userSessions = new UserSessionsImpl(this); + this.sessionHosts = new SessionHostsImpl(this); + this.msixPackages = new MsixPackagesImpl(this); + this.msixImages = new MsixImagesImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + } + + operations: Operations; + workspaces: Workspaces; + scalingPlans: ScalingPlans; + applicationGroups: ApplicationGroups; + startMenuItems: StartMenuItems; + applications: Applications; + desktops: Desktops; + hostPools: HostPools; + userSessions: UserSessions; + sessionHosts: SessionHosts; + msixPackages: MsixPackages; + msixImages: MsixImages; + privateEndpointConnections: PrivateEndpointConnections; + privateLinkResources: PrivateLinkResources; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClientContext.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClientContext.ts new file mode 100644 index 000000000000..1dbd792b8427 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClientContext.ts @@ -0,0 +1,70 @@ +/* + * 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 coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { DesktopVirtualizationAPIClientOptionalParams } from "./models"; + +export class DesktopVirtualizationAPIClientContext extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the DesktopVirtualizationAPIClientContext class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: DesktopVirtualizationAPIClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: DesktopVirtualizationAPIClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-desktopvirtualization/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-09-03-preview"; + } +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/index.ts new file mode 100644 index 000000000000..01cd585f23ff --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/index.ts @@ -0,0 +1,13 @@ +/* + * 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 "./models"; +export { DesktopVirtualizationAPIClient } from "./desktopVirtualizationAPIClient"; +export { DesktopVirtualizationAPIClientContext } from "./desktopVirtualizationAPIClientContext"; +export * from "./operationsInterfaces"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts new file mode 100644 index 000000000000..26dec3df672a --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts @@ -0,0 +1,2215 @@ +/* + * 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 coreClient from "@azure/core-client"; + +/** Result of the request to list operations. */ +export interface ResourceProviderOperationList { + /** List of operations supported by this resource provider. */ + value?: ResourceProviderOperation[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Supported operation of this resource provider. */ +export interface ResourceProviderOperation { + /** Operation name, in format of {provider}/{resource}/{operation} */ + name?: string; + /** Display metadata associated with the operation. */ + display?: ResourceProviderOperationDisplay; + /** Is a data action. */ + isDataAction?: boolean; + /** Properties of the operation */ + properties?: OperationProperties; +} + +/** Display metadata associated with the operation. */ +export interface ResourceProviderOperationDisplay { + /** Resource provider: Microsoft Desktop Virtualization. */ + provider?: string; + /** Resource on which the operation is performed. */ + resource?: string; + /** Type of operation: get, read, delete, etc. */ + operation?: string; + /** Description of this operation. */ + description?: string; +} + +/** Properties of the operation */ +export interface OperationProperties { + /** Service specification payload */ + serviceSpecification?: ServiceSpecification; +} + +/** Service specification payload */ +export interface ServiceSpecification { + /** Specifications of the Log for Azure Monitoring */ + logSpecifications?: LogSpecification[]; +} + +/** Specifications of the Log for Azure Monitoring */ +export interface LogSpecification { + /** Name of the log */ + name?: string; + /** Localized friendly display name of the log */ + displayName?: string; + /** Blob duration of the log */ + blobDuration?: string; +} + +/** Cloud error object. */ +export interface CloudError { + /** Cloud error object properties. */ + error?: CloudErrorProperties; +} + +/** Cloud error object properties. */ +export interface CloudErrorProperties { + /** Error code */ + code?: string; + /** Error message indicating why the operation failed. */ + message?: string; +} + +/** 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 ResourceModelWithAllowedPropertySet { + /** + * 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 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * 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 type?: string; + /** The geo-location where the resource lives */ + location?: string; + /** 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. */ + managedBy?: string; + /** 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. */ + kind?: string; + /** + * 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. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + identity?: ResourceModelWithAllowedPropertySetIdentity; + sku?: ResourceModelWithAllowedPropertySetSku; + plan?: ResourceModelWithAllowedPropertySetPlan; +} + +/** Identity for the resource. */ +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 tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; +} + +/** The resource model definition representing SKU */ +export interface Sku { + /** The name of the SKU. Ex - P3. It is typically a letter+number code */ + name: string; + /** 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. */ + tier?: SkuTier; + /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */ + size?: string; + /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ + family?: string; + /** 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. */ + capacity?: number; +} + +/** Plan for the resource. */ +export interface Plan { + /** A user defined name of the 3rd Party Artifact that is being procured. */ + name: string; + /** The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ + publisher: string; + /** 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. */ + product: string; + /** A publisher provided promotion code as provisioned in Data Market for the said product/artifact. */ + promotionCode?: string; + /** The version of the desired product/artifact. */ + version?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Workspace properties that can be patched. */ +export interface WorkspacePatch { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Description of Workspace. */ + description?: string; + /** Friendly name of Workspace. */ + friendlyName?: string; + /** List of applicationGroup links. */ + applicationGroupReferences?: string[]; + /** Enabled to allow this resource to be access from the public network */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** List of Workspace definitions. */ +export interface WorkspaceList { + /** List of Workspace definitions. */ + value?: Workspace[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Scaling plan schedule. */ +export interface ScalingSchedule { + /** Name of the scaling schedule. */ + name?: string; + /** Set of days of the week on which this schedule is active. */ + daysOfWeek?: ScalingScheduleDaysOfWeekItem[]; + /** Starting time for ramp up period. */ + rampUpStartTime?: Time; + /** Load balancing algorithm for ramp up period. */ + rampUpLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + /** Minimum host percentage for ramp up period. */ + rampUpMinimumHostsPct?: number; + /** Capacity threshold for ramp up period. */ + rampUpCapacityThresholdPct?: number; + /** Starting time for peak period. */ + peakStartTime?: Time; + /** Load balancing algorithm for peak period. */ + peakLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + /** Starting time for ramp down period. */ + rampDownStartTime?: Time; + /** Load balancing algorithm for ramp down period. */ + rampDownLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; + /** Minimum host percentage for ramp down period. */ + rampDownMinimumHostsPct?: number; + /** Capacity threshold for ramp down period. */ + rampDownCapacityThresholdPct?: number; + /** Should users be logged off forcefully from hosts. */ + rampDownForceLogoffUsers?: boolean; + /** Specifies when to stop hosts during ramp down period. */ + rampDownStopHostsWhen?: StopHostsWhen; + /** Number of minutes to wait to stop hosts during ramp down period. */ + rampDownWaitTimeMinutes?: number; + /** Notification message for users during ramp down period. */ + rampDownNotificationMessage?: string; + /** Starting time for off-peak period. */ + offPeakStartTime?: Time; + /** Load balancing algorithm for off-peak period. */ + offPeakLoadBalancingAlgorithm?: SessionHostLoadBalancingAlgorithm; +} + +/** The time for a scaling action to occur. */ +export interface Time { + /** The hour. */ + hour: number; + /** The minute. */ + minute: number; +} + +/** Scaling plan reference to hostpool. */ +export interface ScalingHostPoolReference { + /** Arm path of referenced hostpool. */ + hostPoolArmPath?: string; + /** Is the scaling plan enabled for this hostpool. */ + scalingPlanEnabled?: boolean; +} + +/** Scaling plan properties that can be patched. */ +export interface ScalingPlanPatch { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Description of scaling plan. */ + description?: string; + /** User friendly name of scaling plan. */ + friendlyName?: string; + /** Timezone of the scaling plan. */ + timeZone?: string; + /** Exclusion tag for scaling plan. */ + exclusionTag?: string; + /** List of ScalingSchedule definitions. */ + schedules?: ScalingSchedule[]; + /** List of ScalingHostPoolReference definitions. */ + hostPoolReferences?: ScalingHostPoolReference[]; +} + +/** List of scaling plan definitions. */ +export interface ScalingPlanList { + /** List of scaling plan definitions. */ + value?: ScalingPlan[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Properties for arm migration. */ +export interface MigrationRequestProperties { + /** The type of operation for migration. */ + operation?: Operation; + /** The path to the legacy object to migrate. */ + migrationPath?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface 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 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * 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 type?: string; +} + +/** List of ApplicationGroup definitions. */ +export interface ApplicationGroupList { + /** List of ApplicationGroup definitions. */ + value?: ApplicationGroup[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** List of StartMenuItem definitions. */ +export interface StartMenuItemList { + /** List of StartMenuItem definitions. */ + value?: StartMenuItem[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Application properties that can be patched. */ +export interface ApplicationPatch { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Description of Application. */ + description?: string; + /** Friendly name of Application. */ + friendlyName?: string; + /** Specifies a path for the executable file for the application. */ + filePath?: string; + /** Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. */ + commandLineSetting?: CommandLineSetting; + /** Command Line Arguments for Application. */ + commandLineArguments?: string; + /** Specifies whether to show the RemoteApp program in the RD Web Access server. */ + showInPortal?: boolean; + /** Path to icon. */ + iconPath?: string; + /** Index of the icon. */ + iconIndex?: number; + /** Specifies the package family name for MSIX applications */ + msixPackageFamilyName?: string; + /** Specifies the package application Id for MSIX applications */ + msixPackageApplicationId?: string; + /** Resource Type of Application. */ + applicationType?: RemoteApplicationType; +} + +/** List of Application definitions. */ +export interface ApplicationList { + /** List of Application definitions. */ + value?: Application[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Desktop properties that can be patched. */ +export interface DesktopPatch { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Description of Desktop. */ + description?: string; + /** Friendly name of Desktop. */ + friendlyName?: string; +} + +/** List of Desktop definitions. */ +export interface DesktopList { + /** List of Desktop definitions. */ + value?: Desktop[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a RegistrationInfo definition. */ +export interface RegistrationInfo { + /** Expiration time of registration token. */ + expirationTime?: Date; + /** The registration token base64 encoded string. */ + token?: string; + /** The type of resetting the token. */ + registrationTokenOperation?: RegistrationTokenOperation; +} + +/** Represents a RegistrationInfo definition. */ +export interface RegistrationInfoPatch { + /** Expiration time of registration token. */ + expirationTime?: Date; + /** The type of resetting the token. */ + registrationTokenOperation?: RegistrationTokenOperation; +} + +/** List of HostPool definitions. */ +export interface HostPoolList { + /** List of HostPool definitions. */ + value?: HostPool[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** List of UserSession definitions. */ +export interface UserSessionList { + /** List of UserSession definitions. */ + value?: UserSession[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The report for session host information. */ +export interface SessionHostHealthCheckReport { + /** + * Represents the name of the health check operation performed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthCheckName?: HealthCheckName; + /** + * Represents the Health state of the health check we performed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthCheckResult?: HealthCheckResult; + /** + * Additional detailed information on the failure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalFailureDetails?: SessionHostHealthCheckFailureDetails; +} + +/** Contains details on the failure. */ +export interface SessionHostHealthCheckFailureDetails { + /** + * Failure message: hints on what is wrong and how to recover. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Error code corresponding for the failure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorCode?: number; + /** + * The timestamp of the last update. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastHealthCheckDateTime?: Date; +} + +/** List of SessionHost definitions. */ +export interface SessionHostList { + /** List of SessionHost definitions. */ + value?: SessionHost[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Schema for MSIX Package Dependencies properties. */ +export interface MsixPackageDependencies { + /** Name of package dependency. */ + dependencyName?: string; + /** Name of dependency publisher. */ + publisher?: string; + /** Dependency version required. */ + minVersion?: string; +} + +/** Schema for MSIX Package Application properties. */ +export interface MsixPackageApplications { + /** Package Application Id, found in appxmanifest.xml. */ + appId?: string; + /** Description of Package Application. */ + description?: string; + /** Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. */ + appUserModelID?: string; + /** User friendly name. */ + friendlyName?: string; + /** User friendly name. */ + iconImageName?: string; + /** the icon a 64 bit string as a byte array. */ + rawIcon?: Uint8Array; + /** the icon a 64 bit string as a byte array. */ + rawPng?: Uint8Array; +} + +/** List of MSIX Package definitions. */ +export interface MsixPackageList { + /** List of MSIX Package definitions. */ + value?: MsixPackage[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents URI referring to MSIX Image */ +export interface MsixImageURI { + /** URI to Image */ + uri?: string; +} + +/** List of MSIX package properties retrieved from MSIX Image expansion. */ +export interface ExpandMsixImageList { + /** List of MSIX package properties from give MSIX Image. */ + value?: ExpandMsixImage[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents message sent to a UserSession. */ +export interface SendMessage { + /** Title of message. */ + messageTitle?: string; + /** Body of message. */ + messageBody?: string; +} + +/** List of private endpoint connection associated with the specified storage account */ +export interface PrivateEndpointConnectionListResultWithSystemData { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnectionWithSystemData[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The Private Endpoint resource. */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a Workspace definition. */ +export type Workspace = ResourceModelWithAllowedPropertySet & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of Workspace. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Description of Workspace. */ + description?: string; + /** Friendly name of Workspace. */ + friendlyName?: string; + /** List of applicationGroup resource Ids. */ + applicationGroupReferences?: string[]; + /** + * Is cloud pc resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudPcResource?: boolean; + /** Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints */ + publicNetworkAccess?: PublicNetworkAccess; +}; + +/** Represents a scaling plan definition. */ +export type ScalingPlan = ResourceModelWithAllowedPropertySet & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of scaling plan. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Description of scaling plan. */ + description?: string; + /** User friendly name of scaling plan. */ + friendlyName?: string; + /** Timezone of the scaling plan. */ + timeZone?: string; + /** HostPool type for desktop. */ + hostPoolType?: ScalingHostPoolType; + /** Exclusion tag for scaling plan. */ + exclusionTag?: string; + /** List of ScalingSchedule definitions. */ + schedules?: ScalingSchedule[]; + /** List of ScalingHostPoolReference definitions. */ + hostPoolReferences?: ScalingHostPoolReference[]; +}; + +/** Represents a ApplicationGroup definition. */ +export type ApplicationGroup = ResourceModelWithAllowedPropertySet & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of ApplicationGroup. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Description of ApplicationGroup. */ + description?: string; + /** Friendly name of ApplicationGroup. */ + friendlyName?: string; + /** HostPool arm path of ApplicationGroup. */ + hostPoolArmPath: string; + /** + * Workspace arm path of ApplicationGroup. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workspaceArmPath?: string; + /** Resource Type of ApplicationGroup. */ + applicationGroupType: ApplicationGroupType; + /** The registration info of HostPool. */ + migrationRequest?: MigrationRequestProperties; + /** + * Is cloud pc resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudPcResource?: boolean; +}; + +/** Represents a HostPool definition. */ +export type HostPool = ResourceModelWithAllowedPropertySet & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of HostPool. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Friendly name of HostPool. */ + friendlyName?: string; + /** Description of HostPool. */ + description?: string; + /** HostPool type for desktop. */ + hostPoolType: HostPoolType; + /** PersonalDesktopAssignment type for HostPool. */ + personalDesktopAssignmentType?: PersonalDesktopAssignmentType; + /** Custom rdp property of HostPool. */ + customRdpProperty?: string; + /** The max session limit of HostPool. */ + maxSessionLimit?: number; + /** The type of the load balancer. */ + loadBalancerType: LoadBalancerType; + /** The ring number of HostPool. */ + ring?: number; + /** Is validation environment. */ + validationEnvironment?: boolean; + /** The registration info of HostPool. */ + registrationInfo?: RegistrationInfo; + /** VM template for sessionhosts configuration within hostpool. */ + vmTemplate?: string; + /** + * List of applicationGroup links. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly applicationGroupReferences?: string[]; + /** URL to customer ADFS server for signing WVD SSO certificates. */ + ssoadfsAuthority?: string; + /** ClientId for the registered Relying Party used to issue WVD SSO certificates. */ + ssoClientId?: string; + /** Path to Azure KeyVault storing the secret used for communication to ADFS. */ + ssoClientSecretKeyVaultPath?: string; + /** The type of single sign on Secret Type. */ + ssoSecretType?: SSOSecretType; + /** The type of preferred application group type, default to Desktop Application Group */ + preferredAppGroupType: PreferredAppGroupType; + /** The flag to turn on/off StartVMOnConnect feature. */ + startVMOnConnect?: boolean; + /** The registration info of HostPool. */ + migrationRequest?: MigrationRequestProperties; + /** + * Is cloud pc resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudPcResource?: boolean; + /** Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints */ + publicNetworkAccess?: PublicNetworkAccess; +}; + +export type ResourceModelWithAllowedPropertySetIdentity = Identity & {}; + +export type ResourceModelWithAllowedPropertySetSku = Sku & {}; + +export type ResourceModelWithAllowedPropertySetPlan = Plan & {}; + +/** ApplicationGroup properties that can be patched. */ +export type ApplicationGroupPatch = Resource & { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Description of ApplicationGroup. */ + description?: string; + /** Friendly name of ApplicationGroup. */ + friendlyName?: string; +}; + +/** Represents a StartMenuItem definition. */ +export type StartMenuItem = Resource & { + /** Alias of StartMenuItem. */ + appAlias?: string; + /** Path to the file of StartMenuItem. */ + filePath?: string; + /** Command line arguments for StartMenuItem. */ + commandLineArguments?: string; + /** Path to the icon. */ + iconPath?: string; + /** Index of the icon. */ + iconIndex?: number; +}; + +/** Schema for Application properties. */ +export type Application = Resource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of Application. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Description of Application. */ + description?: string; + /** Friendly name of Application. */ + friendlyName?: string; + /** Specifies a path for the executable file for the application. */ + filePath?: string; + /** Specifies the package family name for MSIX applications */ + msixPackageFamilyName?: string; + /** Specifies the package application Id for MSIX applications */ + msixPackageApplicationId?: string; + /** Resource Type of Application. */ + applicationType?: RemoteApplicationType; + /** Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. */ + commandLineSetting: CommandLineSetting; + /** Command Line Arguments for Application. */ + commandLineArguments?: string; + /** Specifies whether to show the RemoteApp program in the RD Web Access server. */ + showInPortal?: boolean; + /** Path to icon. */ + iconPath?: string; + /** Index of the icon. */ + iconIndex?: number; + /** + * Hash of the icon. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly iconHash?: string; + /** + * the icon a 64 bit string as a byte array. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly iconContent?: Uint8Array; +}; + +/** Schema for Desktop properties. */ +export type Desktop = Resource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of Desktop. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Description of Desktop. */ + description?: string; + /** Friendly name of Desktop. */ + friendlyName?: string; + /** + * Hash of the icon. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly iconHash?: string; + /** + * The icon a 64 bit string as a byte array. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly iconContent?: Uint8Array; +}; + +/** HostPool properties that can be patched. */ +export type HostPoolPatch = Resource & { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Friendly name of HostPool. */ + friendlyName?: string; + /** Description of HostPool. */ + description?: string; + /** Custom rdp property of HostPool. */ + customRdpProperty?: string; + /** The max session limit of HostPool. */ + maxSessionLimit?: number; + /** PersonalDesktopAssignment type for HostPool. */ + personalDesktopAssignmentType?: PersonalDesktopAssignmentType; + /** The type of the load balancer. */ + loadBalancerType?: LoadBalancerType; + /** The ring number of HostPool. */ + ring?: number; + /** Is validation environment. */ + validationEnvironment?: boolean; + /** The registration info of HostPool. */ + registrationInfo?: RegistrationInfoPatch; + /** VM template for sessionhosts configuration within hostpool. */ + vmTemplate?: string; + /** URL to customer ADFS server for signing WVD SSO certificates. */ + ssoadfsAuthority?: string; + /** ClientId for the registered Relying Party used to issue WVD SSO certificates. */ + ssoClientId?: string; + /** Path to Azure KeyVault storing the secret used for communication to ADFS. */ + ssoClientSecretKeyVaultPath?: string; + /** The type of single sign on Secret Type. */ + ssoSecretType?: SSOSecretType; + /** The type of preferred application group type, default to Desktop Application Group */ + preferredAppGroupType?: PreferredAppGroupType; + /** The flag to turn on/off StartVMOnConnect feature. */ + startVMOnConnect?: boolean; + /** Enabled to allow this resource to be access from the public network */ + publicNetworkAccess?: PublicNetworkAccess; +}; + +/** Represents a UserSession definition. */ +export type UserSession = Resource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of user session. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** The user principal name. */ + userPrincipalName?: string; + /** Application type of application. */ + applicationType?: ApplicationType; + /** State of user session. */ + sessionState?: SessionState; + /** The active directory user name. */ + activeDirectoryUserName?: string; + /** The timestamp of the user session create. */ + createTime?: Date; +}; + +/** Represents a SessionHost definition. */ +export type SessionHost = Resource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * ObjectId of SessionHost. (internal use) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** Last heart beat from SessionHost. */ + lastHeartBeat?: Date; + /** Number of sessions on SessionHost. */ + sessions?: number; + /** Version of agent on SessionHost. */ + agentVersion?: string; + /** Allow a new session. */ + allowNewSession?: boolean; + /** + * Virtual Machine Id of SessionHost's underlying virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly virtualMachineId?: string; + /** + * Resource Id of SessionHost's underlying virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; + /** User assigned to SessionHost. */ + assignedUser?: string; + /** Status for a SessionHost. */ + status?: Status; + /** + * The timestamp of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusTimestamp?: Date; + /** The version of the OS on the session host. */ + osVersion?: string; + /** The version of the side by side stack on the session host. */ + sxSStackVersion?: string; + /** Update state of a SessionHost. */ + updateState?: UpdateState; + /** + * The timestamp of the last update. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdateTime?: Date; + /** The error message. */ + updateErrorMessage?: string; + /** + * List of SessionHostHealthCheckReports + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sessionHostHealthCheckResults?: SessionHostHealthCheckReport[]; +}; + +/** SessionHost properties that can be patched. */ +export type SessionHostPatch = Resource & { + /** Allow a new session. */ + allowNewSession?: boolean; + /** User assigned to SessionHost. */ + assignedUser?: string; +}; + +/** Schema for MSIX Package properties. */ +export type MsixPackage = Resource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** VHD/CIM image path on Network Share. */ + imagePath?: string; + /** Package Name from appxmanifest.xml. */ + packageName?: string; + /** Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. */ + packageFamilyName?: string; + /** User friendly Name to be displayed in the portal. */ + displayName?: string; + /** Relative Path to the package inside the image. */ + packageRelativePath?: string; + /** Specifies how to register Package in feed. */ + isRegularRegistration?: boolean; + /** Make this version of the package the active one across the hostpool. */ + isActive?: boolean; + /** List of package dependencies. */ + packageDependencies?: MsixPackageDependencies[]; + /** Package Version found in the appxmanifest.xml. */ + version?: string; + /** Date Package was last updated, found in the appxmanifest.xml. */ + lastUpdated?: Date; + /** List of package applications. */ + packageApplications?: MsixPackageApplications[]; +}; + +/** MSIX Package properties that can be patched. */ +export type MsixPackagePatch = Resource & { + /** Set a version of the package to be active across hostpool. */ + isActive?: boolean; + /** Set Registration mode. Regular or Delayed. */ + isRegularRegistration?: boolean; + /** Display name for MSIX Package. */ + displayName?: string; +}; + +/** Represents the definition of contents retrieved after expanding the MSIX Image. */ +export type ExpandMsixImage = Resource & { + /** Alias of MSIX Package. */ + packageAlias?: string; + /** VHD/CIM image path on Network Share. */ + imagePath?: string; + /** Package Name from appxmanifest.xml. */ + packageName?: string; + /** Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. */ + packageFamilyName?: string; + /** Package Full Name from appxmanifest.xml. */ + packageFullName?: string; + /** User friendly Name to be displayed in the portal. */ + displayName?: string; + /** Relative Path to the package inside the image. */ + packageRelativePath?: string; + /** Specifies how to register Package in feed. */ + isRegularRegistration?: boolean; + /** Make this version of the package the active one across the hostpool. */ + isActive?: boolean; + /** List of package dependencies. */ + packageDependencies?: MsixPackageDependencies[]; + /** Package Version found in the appxmanifest.xml. */ + version?: string; + /** Date Package was last updated, found in the appxmanifest.xml. */ + lastUpdated?: Date; + /** List of package applications. */ + packageApplications?: MsixPackageApplications[]; +}; + +/** The Private Endpoint Connection resource. */ +export type PrivateEndpointConnection = Resource & { + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +/** A private link resource */ +export type PrivateLinkResource = Resource & { + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; +}; + +/** The Private Endpoint Connection resource. */ +export type PrivateEndpointConnectionWithSystemData = PrivateEndpointConnection & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +}; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + +/** Known values of {@link ScalingHostPoolType} that the service accepts. */ +export enum KnownScalingHostPoolType { + /** Users get a new (random) SessionHost every time it connects to the HostPool. */ + Pooled = "Pooled" +} + +/** + * Defines values for ScalingHostPoolType. \ + * {@link KnownScalingHostPoolType} can be used interchangeably with ScalingHostPoolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pooled**: Users get a new (random) SessionHost every time it connects to the HostPool. + */ +export type ScalingHostPoolType = string; + +/** Known values of {@link ScalingScheduleDaysOfWeekItem} that the service accepts. */ +export enum KnownScalingScheduleDaysOfWeekItem { + Sunday = "Sunday", + Monday = "Monday", + Tuesday = "Tuesday", + Wednesday = "Wednesday", + Thursday = "Thursday", + Friday = "Friday", + Saturday = "Saturday" +} + +/** + * Defines values for ScalingScheduleDaysOfWeekItem. \ + * {@link KnownScalingScheduleDaysOfWeekItem} can be used interchangeably with ScalingScheduleDaysOfWeekItem, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Sunday** \ + * **Monday** \ + * **Tuesday** \ + * **Wednesday** \ + * **Thursday** \ + * **Friday** \ + * **Saturday** + */ +export type ScalingScheduleDaysOfWeekItem = string; + +/** Known values of {@link SessionHostLoadBalancingAlgorithm} that the service accepts. */ +export enum KnownSessionHostLoadBalancingAlgorithm { + BreadthFirst = "BreadthFirst", + DepthFirst = "DepthFirst" +} + +/** + * Defines values for SessionHostLoadBalancingAlgorithm. \ + * {@link KnownSessionHostLoadBalancingAlgorithm} can be used interchangeably with SessionHostLoadBalancingAlgorithm, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BreadthFirst** \ + * **DepthFirst** + */ +export type SessionHostLoadBalancingAlgorithm = string; + +/** Known values of {@link StopHostsWhen} that the service accepts. */ +export enum KnownStopHostsWhen { + ZeroSessions = "ZeroSessions", + ZeroActiveSessions = "ZeroActiveSessions" +} + +/** + * Defines values for StopHostsWhen. \ + * {@link KnownStopHostsWhen} can be used interchangeably with StopHostsWhen, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ZeroSessions** \ + * **ZeroActiveSessions** + */ +export type StopHostsWhen = string; + +/** Known values of {@link ApplicationGroupType} that the service accepts. */ +export enum KnownApplicationGroupType { + RemoteApp = "RemoteApp", + Desktop = "Desktop" +} + +/** + * Defines values for ApplicationGroupType. \ + * {@link KnownApplicationGroupType} can be used interchangeably with ApplicationGroupType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RemoteApp** \ + * **Desktop** + */ +export type ApplicationGroupType = string; + +/** Known values of {@link Operation} that the service accepts. */ +export enum KnownOperation { + /** Start the migration. */ + Start = "Start", + /** Revoke the migration. */ + Revoke = "Revoke", + /** Complete the migration. */ + Complete = "Complete", + /** Hide the hostpool. */ + Hide = "Hide", + /** Unhide the hostpool. */ + Unhide = "Unhide" +} + +/** + * Defines values for Operation. \ + * {@link KnownOperation} can be used interchangeably with Operation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Start**: Start the migration. \ + * **Revoke**: Revoke the migration. \ + * **Complete**: Complete the migration. \ + * **Hide**: Hide the hostpool. \ + * **Unhide**: Unhide the hostpool. + */ +export type Operation = string; + +/** Known values of {@link RemoteApplicationType} that the service accepts. */ +export enum KnownRemoteApplicationType { + InBuilt = "InBuilt", + MsixApplication = "MsixApplication" +} + +/** + * Defines values for RemoteApplicationType. \ + * {@link KnownRemoteApplicationType} can be used interchangeably with RemoteApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InBuilt** \ + * **MsixApplication** + */ +export type RemoteApplicationType = string; + +/** Known values of {@link CommandLineSetting} that the service accepts. */ +export enum KnownCommandLineSetting { + DoNotAllow = "DoNotAllow", + Allow = "Allow", + Require = "Require" +} + +/** + * Defines values for CommandLineSetting. \ + * {@link KnownCommandLineSetting} can be used interchangeably with CommandLineSetting, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DoNotAllow** \ + * **Allow** \ + * **Require** + */ +export type CommandLineSetting = string; + +/** Known values of {@link HostPoolType} that the service accepts. */ +export enum KnownHostPoolType { + /** Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct) or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned SessionHost. */ + Personal = "Personal", + /** Users get a new (random) SessionHost every time it connects to the HostPool. */ + Pooled = "Pooled", + /** Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType must be Direct. */ + BYODesktop = "BYODesktop" +} + +/** + * Defines values for HostPoolType. \ + * {@link KnownHostPoolType} can be used interchangeably with HostPoolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Personal**: Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct) or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned SessionHost. \ + * **Pooled**: Users get a new (random) SessionHost every time it connects to the HostPool. \ + * **BYODesktop**: Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType must be Direct. + */ +export type HostPoolType = string; + +/** Known values of {@link PersonalDesktopAssignmentType} that the service accepts. */ +export enum KnownPersonalDesktopAssignmentType { + Automatic = "Automatic", + Direct = "Direct" +} + +/** + * Defines values for PersonalDesktopAssignmentType. \ + * {@link KnownPersonalDesktopAssignmentType} can be used interchangeably with PersonalDesktopAssignmentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automatic** \ + * **Direct** + */ +export type PersonalDesktopAssignmentType = string; + +/** Known values of {@link LoadBalancerType} that the service accepts. */ +export enum KnownLoadBalancerType { + BreadthFirst = "BreadthFirst", + DepthFirst = "DepthFirst", + Persistent = "Persistent" +} + +/** + * Defines values for LoadBalancerType. \ + * {@link KnownLoadBalancerType} can be used interchangeably with LoadBalancerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BreadthFirst** \ + * **DepthFirst** \ + * **Persistent** + */ +export type LoadBalancerType = string; + +/** Known values of {@link RegistrationTokenOperation} that the service accepts. */ +export enum KnownRegistrationTokenOperation { + Delete = "Delete", + None = "None", + Update = "Update" +} + +/** + * Defines values for RegistrationTokenOperation. \ + * {@link KnownRegistrationTokenOperation} can be used interchangeably with RegistrationTokenOperation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete** \ + * **None** \ + * **Update** + */ +export type RegistrationTokenOperation = string; + +/** Known values of {@link SSOSecretType} that the service accepts. */ +export enum KnownSSOSecretType { + SharedKey = "SharedKey", + Certificate = "Certificate", + SharedKeyInKeyVault = "SharedKeyInKeyVault", + CertificateInKeyVault = "CertificateInKeyVault" +} + +/** + * Defines values for SSOSecretType. \ + * {@link KnownSSOSecretType} can be used interchangeably with SSOSecretType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SharedKey** \ + * **Certificate** \ + * **SharedKeyInKeyVault** \ + * **CertificateInKeyVault** + */ +export type SSOSecretType = string; + +/** Known values of {@link PreferredAppGroupType} that the service accepts. */ +export enum KnownPreferredAppGroupType { + None = "None", + Desktop = "Desktop", + RailApplications = "RailApplications" +} + +/** + * Defines values for PreferredAppGroupType. \ + * {@link KnownPreferredAppGroupType} can be used interchangeably with PreferredAppGroupType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Desktop** \ + * **RailApplications** + */ +export type PreferredAppGroupType = string; + +/** Known values of {@link ApplicationType} that the service accepts. */ +export enum KnownApplicationType { + RemoteApp = "RemoteApp", + Desktop = "Desktop" +} + +/** + * Defines values for ApplicationType. \ + * {@link KnownApplicationType} can be used interchangeably with ApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RemoteApp** \ + * **Desktop** + */ +export type ApplicationType = string; + +/** Known values of {@link SessionState} that the service accepts. */ +export enum KnownSessionState { + Unknown = "Unknown", + Active = "Active", + Disconnected = "Disconnected", + Pending = "Pending", + LogOff = "LogOff", + UserProfileDiskMounted = "UserProfileDiskMounted" +} + +/** + * Defines values for SessionState. \ + * {@link KnownSessionState} can be used interchangeably with SessionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Active** \ + * **Disconnected** \ + * **Pending** \ + * **LogOff** \ + * **UserProfileDiskMounted** + */ +export type SessionState = string; + +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { + /** Session Host has passed all the health checks and is available to handle connections. */ + Available = "Available", + /** Session Host is either turned off or has failed critical health checks which is causing service not to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status. */ + Unavailable = "Unavailable", + /** Session Host is shutdown - RD Agent reported session host to be stopped or deallocated. */ + Shutdown = "Shutdown", + /** The Session Host is unavailable because it is currently disconnected. */ + Disconnected = "Disconnected", + /** Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress. Note: this state will be removed once the upgrade completes and the host is able to accept connections. */ + Upgrading = "Upgrading", + /** Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) failed. */ + UpgradeFailed = "UpgradeFailed", + /** The Session Host is not heart beating. */ + NoHeartbeat = "NoHeartbeat", + /** SessionHost is not joined to domain. */ + NotJoinedToDomain = "NotJoinedToDomain", + /** SessionHost's domain trust relationship lost */ + DomainTrustRelationshipLost = "DomainTrustRelationshipLost", + /** SxS stack installed on the SessionHost is not ready to receive connections. */ + SxSStackListenerNotReady = "SxSStackListenerNotReady", + /** FSLogix is in an unhealthy state on the session host. */ + FSLogixNotHealthy = "FSLogixNotHealthy", + /** New status to inform admins that the health on their endpoint needs to be fixed. The connections might not fail, as these issues are not fatal. */ + NeedsAssistance = "NeedsAssistance" +} + +/** + * Defines values for Status. \ + * {@link KnownStatus} can be used interchangeably with Status, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: Session Host has passed all the health checks and is available to handle connections. \ + * **Unavailable**: Session Host is either turned off or has failed critical health checks which is causing service not to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status. \ + * **Shutdown**: Session Host is shutdown - RD Agent reported session host to be stopped or deallocated. \ + * **Disconnected**: The Session Host is unavailable because it is currently disconnected. \ + * **Upgrading**: Session Host is unavailable because currently an upgrade of RDAgent\/side-by-side stack is in progress. Note: this state will be removed once the upgrade completes and the host is able to accept connections. \ + * **UpgradeFailed**: Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) failed. \ + * **NoHeartbeat**: The Session Host is not heart beating. \ + * **NotJoinedToDomain**: SessionHost is not joined to domain. \ + * **DomainTrustRelationshipLost**: SessionHost's domain trust relationship lost \ + * **SxSStackListenerNotReady**: SxS stack installed on the SessionHost is not ready to receive connections. \ + * **FSLogixNotHealthy**: FSLogix is in an unhealthy state on the session host. \ + * **NeedsAssistance**: New status to inform admins that the health on their endpoint needs to be fixed. The connections might not fail, as these issues are not fatal. + */ +export type Status = string; + +/** Known values of {@link UpdateState} that the service accepts. */ +export enum KnownUpdateState { + Initial = "Initial", + Pending = "Pending", + Started = "Started", + Succeeded = "Succeeded", + Failed = "Failed" +} + +/** + * Defines values for UpdateState. \ + * {@link KnownUpdateState} can be used interchangeably with UpdateState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Initial** \ + * **Pending** \ + * **Started** \ + * **Succeeded** \ + * **Failed** + */ +export type UpdateState = string; + +/** Known values of {@link HealthCheckName} that the service accepts. */ +export enum KnownHealthCheckName { + /** Verifies the SessionHost is joined to a domain. If this check fails is classified as fatal as no connection can succeed if the SessionHost is not joined to the domain. */ + DomainJoinedCheck = "DomainJoinedCheck", + /** Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection can succeed if we cannot reach the domain for authentication on the SessionHost. */ + DomainTrustCheck = "DomainTrustCheck", + /** Verifies the FSLogix service is up and running to make sure users' profiles are loaded in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad as the user profile cannot be loaded and user will get a temporary profile in the session. */ + FSLogixHealthCheck = "FSLogixHealthCheck", + /** Verifies that the SxS stack is up and running so connections can succeed. If this check fails is classified as fatal as no connection can succeed if the SxS stack is not ready. */ + SxSStackListenerCheck = "SxSStackListenerCheck", + /** Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is unable to store warm path data (logs, operations ...). */ + UrlsAccessibleCheck = "UrlsAccessibleCheck", + /** Verifies that the required Geneva agent is running. If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly) older version. */ + MonitoringAgentCheck = "MonitoringAgentCheck", + /** Verifies the domain the SessionHost is joined to is still reachable. If this check fails is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time of connection. */ + DomainReachable = "DomainReachable", + /** Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can service connections, main issue may be the WebRTCRedirector component has to be restarted or updated. */ + WebRTCRedirectorCheck = "WebRTCRedirectorCheck", + /** Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate) this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. */ + SupportedEncryptionCheck = "SupportedEncryptionCheck", + /** Verifies the metadata service is accessible and return compute properties. */ + MetaDataServiceCheck = "MetaDataServiceCheck", + /** Verifies that the AppAttachService is healthy (there were no issues during package staging). The AppAttachService is used to enable the staging/registration (and eventual deregistration/destaging) of MSIX apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging. Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non fatal and the machine still can service connections, main issue may be certain apps will not work for end-users. */ + AppAttachHealthCheck = "AppAttachHealthCheck" +} + +/** + * Defines values for HealthCheckName. \ + * {@link KnownHealthCheckName} can be used interchangeably with HealthCheckName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DomainJoinedCheck**: Verifies the SessionHost is joined to a domain. If this check fails is classified as fatal as no connection can succeed if the SessionHost is not joined to the domain. \ + * **DomainTrustCheck**: Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection can succeed if we cannot reach the domain for authentication on the SessionHost. \ + * **FSLogixHealthCheck**: Verifies the FSLogix service is up and running to make sure users' profiles are loaded in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad as the user profile cannot be loaded and user will get a temporary profile in the session. \ + * **SxSStackListenerCheck**: Verifies that the SxS stack is up and running so connections can succeed. If this check fails is classified as fatal as no connection can succeed if the SxS stack is not ready. \ + * **UrlsAccessibleCheck**: Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is unable to store warm path data (logs, operations ...). \ + * **MonitoringAgentCheck**: Verifies that the required Geneva agent is running. If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly) older version. \ + * **DomainReachable**: Verifies the domain the SessionHost is joined to is still reachable. If this check fails is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time of connection. \ + * **WebRTCRedirectorCheck**: Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can service connections, main issue may be the WebRTCRedirector component has to be restarted or updated. \ + * **SupportedEncryptionCheck**: Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate) this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. \ + * **MetaDataServiceCheck**: Verifies the metadata service is accessible and return compute properties. \ + * **AppAttachHealthCheck**: Verifies that the AppAttachService is healthy (there were no issues during package staging). The AppAttachService is used to enable the staging\/registration (and eventual deregistration\/destaging) of MSIX apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging. Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non fatal and the machine still can service connections, main issue may be certain apps will not work for end-users. + */ +export type HealthCheckName = string; + +/** Known values of {@link HealthCheckResult} that the service accepts. */ +export enum KnownHealthCheckResult { + /** Health check result is not currently known. */ + Unknown = "Unknown", + /** Health check passed. */ + HealthCheckSucceeded = "HealthCheckSucceeded", + /** Health check failed. */ + HealthCheckFailed = "HealthCheckFailed", + /** We received a Shutdown notification. */ + SessionHostShutdown = "SessionHostShutdown" +} + +/** + * Defines values for HealthCheckResult. \ + * {@link KnownHealthCheckResult} can be used interchangeably with HealthCheckResult, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Health check result is not currently known. \ + * **HealthCheckSucceeded**: Health check passed. \ + * **HealthCheckFailed**: Health check failed. \ + * **SessionHostShutdown**: We received a Shutdown notification. + */ +export type HealthCheckResult = string; + +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + Pending = "Pending", + Approved = "Approved", + Rejected = "Rejected" +} + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Rejected** + */ +export type PrivateEndpointServiceConnectionStatus = string; + +/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + Succeeded = "Succeeded", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed" +} + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Deleting** \ + * **Failed** + */ +export type PrivateEndpointConnectionProvisioningState = string; +/** Defines values for SkuTier. */ +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = ResourceProviderOperationList; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = ResourceProviderOperationList; + +/** Optional parameters. */ +export interface WorkspacesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WorkspacesGetResponse = Workspace; + +/** Optional parameters. */ +export interface WorkspacesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type WorkspacesCreateOrUpdateResponse = Workspace; + +/** Optional parameters. */ +export interface WorkspacesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing Workspace definitions. */ + workspace?: WorkspacePatch; +} + +/** Contains response data for the update operation. */ +export type WorkspacesUpdateResponse = Workspace; + +/** Optional parameters. */ +export interface WorkspacesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type WorkspacesListByResourceGroupResponse = WorkspaceList; + +/** Optional parameters. */ +export interface WorkspacesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type WorkspacesListBySubscriptionResponse = WorkspaceList; + +/** Optional parameters. */ +export interface WorkspacesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type WorkspacesListByResourceGroupNextResponse = WorkspaceList; + +/** Optional parameters. */ +export interface WorkspacesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type WorkspacesListBySubscriptionNextResponse = WorkspaceList; + +/** Optional parameters. */ +export interface ScalingPlansGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ScalingPlansGetResponse = ScalingPlan; + +/** Optional parameters. */ +export interface ScalingPlansCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type ScalingPlansCreateResponse = ScalingPlan; + +/** Optional parameters. */ +export interface ScalingPlansDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ScalingPlansUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing scaling plan definitions. */ + scalingPlan?: ScalingPlanPatch; +} + +/** Contains response data for the update operation. */ +export type ScalingPlansUpdateResponse = ScalingPlan; + +/** Optional parameters. */ +export interface ScalingPlansListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ScalingPlansListByResourceGroupResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ScalingPlansListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ScalingPlansListBySubscriptionResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ScalingPlansListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type ScalingPlansListByHostPoolResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ScalingPlansListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ScalingPlansListByResourceGroupNextResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ScalingPlansListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ScalingPlansListBySubscriptionNextResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ScalingPlansListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type ScalingPlansListByHostPoolNextResponse = ScalingPlanList; + +/** Optional parameters. */ +export interface ApplicationGroupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ApplicationGroupsGetResponse = ApplicationGroup; + +/** Optional parameters. */ +export interface ApplicationGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ApplicationGroupsCreateOrUpdateResponse = ApplicationGroup; + +/** Optional parameters. */ +export interface ApplicationGroupsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGroupsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing ApplicationGroup definitions. */ + applicationGroup?: ApplicationGroupPatch; +} + +/** Contains response data for the update operation. */ +export type ApplicationGroupsUpdateResponse = ApplicationGroup; + +/** Optional parameters. */ +export interface ApplicationGroupsListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are applicationGroupType. */ + filter?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type ApplicationGroupsListByResourceGroupResponse = ApplicationGroupList; + +/** Optional parameters. */ +export interface ApplicationGroupsListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are applicationGroupType. */ + filter?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type ApplicationGroupsListBySubscriptionResponse = ApplicationGroupList; + +/** Optional parameters. */ +export interface ApplicationGroupsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are applicationGroupType. */ + filter?: string; +} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ApplicationGroupsListByResourceGroupNextResponse = ApplicationGroupList; + +/** Optional parameters. */ +export interface ApplicationGroupsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are applicationGroupType. */ + filter?: string; +} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ApplicationGroupsListBySubscriptionNextResponse = ApplicationGroupList; + +/** Optional parameters. */ +export interface StartMenuItemsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type StartMenuItemsListResponse = StartMenuItemList; + +/** Optional parameters. */ +export interface StartMenuItemsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type StartMenuItemsListNextResponse = StartMenuItemList; + +/** Optional parameters. */ +export interface ApplicationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ApplicationsGetResponse = Application; + +/** Optional parameters. */ +export interface ApplicationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ApplicationsCreateOrUpdateResponse = Application; + +/** Optional parameters. */ +export interface ApplicationsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing Application definitions. */ + application?: ApplicationPatch; +} + +/** Contains response data for the update operation. */ +export type ApplicationsUpdateResponse = Application; + +/** Optional parameters. */ +export interface ApplicationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ApplicationsListResponse = ApplicationList; + +/** Optional parameters. */ +export interface ApplicationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ApplicationsListNextResponse = ApplicationList; + +/** Optional parameters. */ +export interface DesktopsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DesktopsGetResponse = Desktop; + +/** Optional parameters. */ +export interface DesktopsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing Desktop definitions. */ + desktop?: DesktopPatch; +} + +/** Contains response data for the update operation. */ +export type DesktopsUpdateResponse = Desktop; + +/** Optional parameters. */ +export interface DesktopsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DesktopsListResponse = DesktopList; + +/** Optional parameters. */ +export interface DesktopsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DesktopsListNextResponse = DesktopList; + +/** Optional parameters. */ +export interface HostPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HostPoolsGetResponse = HostPool; + +/** Optional parameters. */ +export interface HostPoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type HostPoolsCreateOrUpdateResponse = HostPool; + +/** Optional parameters. */ +export interface HostPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Force flag to delete sessionHost. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface HostPoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing HostPool definitions. */ + hostPool?: HostPoolPatch; +} + +/** Contains response data for the update operation. */ +export type HostPoolsUpdateResponse = HostPool; + +/** Optional parameters. */ +export interface HostPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type HostPoolsListByResourceGroupResponse = HostPoolList; + +/** Optional parameters. */ +export interface HostPoolsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type HostPoolsListResponse = HostPoolList; + +/** Optional parameters. */ +export interface HostPoolsRetrieveRegistrationTokenOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the retrieveRegistrationToken operation. */ +export type HostPoolsRetrieveRegistrationTokenResponse = RegistrationInfo; + +/** Optional parameters. */ +export interface HostPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type HostPoolsListByResourceGroupNextResponse = HostPoolList; + +/** Optional parameters. */ +export interface HostPoolsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type HostPoolsListNextResponse = HostPoolList; + +/** Optional parameters. */ +export interface UserSessionsListByHostPoolOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. */ + filter?: string; +} + +/** Contains response data for the listByHostPool operation. */ +export type UserSessionsListByHostPoolResponse = UserSessionList; + +/** Optional parameters. */ +export interface UserSessionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type UserSessionsGetResponse = UserSession; + +/** Optional parameters. */ +export interface UserSessionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Force flag to login off userSession. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface UserSessionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type UserSessionsListResponse = UserSessionList; + +/** Optional parameters. */ +export interface UserSessionsDisconnectOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface UserSessionsSendMessageOptionalParams + extends coreClient.OperationOptions { + /** Object containing message includes title and message body */ + sendMessage?: SendMessage; +} + +/** Optional parameters. */ +export interface UserSessionsListByHostPoolNextOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. */ + filter?: string; +} + +/** Contains response data for the listByHostPoolNext operation. */ +export type UserSessionsListByHostPoolNextResponse = UserSessionList; + +/** Optional parameters. */ +export interface UserSessionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type UserSessionsListNextResponse = UserSessionList; + +/** Optional parameters. */ +export interface SessionHostsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SessionHostsGetResponse = SessionHost; + +/** Optional parameters. */ +export interface SessionHostsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Force flag to force sessionHost deletion even when userSession exists. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface SessionHostsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Force flag to update assign, unassign or reassign personal desktop. */ + force?: boolean; + /** Object containing SessionHost definitions. */ + sessionHost?: SessionHostPatch; +} + +/** Contains response data for the update operation. */ +export type SessionHostsUpdateResponse = SessionHost; + +/** Optional parameters. */ +export interface SessionHostsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SessionHostsListResponse = SessionHostList; + +/** Optional parameters. */ +export interface SessionHostsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SessionHostsListNextResponse = SessionHostList; + +/** Optional parameters. */ +export interface MsixPackagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MsixPackagesGetResponse = MsixPackage; + +/** Optional parameters. */ +export interface MsixPackagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type MsixPackagesCreateOrUpdateResponse = MsixPackage; + +/** Optional parameters. */ +export interface MsixPackagesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface MsixPackagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing MSIX Package definitions. */ + msixPackage?: MsixPackagePatch; +} + +/** Contains response data for the update operation. */ +export type MsixPackagesUpdateResponse = MsixPackage; + +/** Optional parameters. */ +export interface MsixPackagesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MsixPackagesListResponse = MsixPackageList; + +/** Optional parameters. */ +export interface MsixPackagesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MsixPackagesListNextResponse = MsixPackageList; + +/** Optional parameters. */ +export interface MsixImagesExpandOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the expand operation. */ +export type MsixImagesExpandResponse = ExpandMsixImageList; + +/** Optional parameters. */ +export interface MsixImagesExpandNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the expandNext operation. */ +export type MsixImagesExpandNextResponse = ExpandMsixImageList; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type PrivateEndpointConnectionsListByHostPoolResponse = PrivateEndpointConnectionListResultWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsGetByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getByHostPool operation. */ +export type PrivateEndpointConnectionsGetByHostPoolResponse = PrivateEndpointConnectionWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsDeleteByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsUpdateByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateByHostPool operation. */ +export type PrivateEndpointConnectionsUpdateByHostPoolResponse = PrivateEndpointConnectionWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByWorkspace operation. */ +export type PrivateEndpointConnectionsListByWorkspaceResponse = PrivateEndpointConnectionListResultWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsGetByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getByWorkspace operation. */ +export type PrivateEndpointConnectionsGetByWorkspaceResponse = PrivateEndpointConnectionWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateByWorkspace operation. */ +export type PrivateEndpointConnectionsUpdateByWorkspaceResponse = PrivateEndpointConnectionWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type PrivateEndpointConnectionsListByHostPoolNextResponse = PrivateEndpointConnectionListResultWithSystemData; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByWorkspaceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByWorkspaceNext operation. */ +export type PrivateEndpointConnectionsListByWorkspaceNextResponse = PrivateEndpointConnectionListResultWithSystemData; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type PrivateLinkResourcesListByHostPoolResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByWorkspace operation. */ +export type PrivateLinkResourcesListByWorkspaceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type PrivateLinkResourcesListByHostPoolNextResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByWorkspaceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByWorkspaceNext operation. */ +export type PrivateLinkResourcesListByWorkspaceNextResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface DesktopVirtualizationAPIClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts new file mode 100644 index 000000000000..5c5d50a3da3a --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts @@ -0,0 +1,2807 @@ +/* + * 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 coreClient from "@azure/core-client"; + +export const ResourceProviderOperationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceProviderOperationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceProviderOperation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ResourceProviderOperation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceProviderOperation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "ResourceProviderOperationDisplay" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } + } + } + } +}; + +export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceProviderOperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const ServiceSpecification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } + } + } + } +}; + +export const LogSpecification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const CloudError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "CloudErrorProperties" + } + } + } + } +}; + +export const CloudErrorProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudErrorProperties", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceModelWithAllowedPropertySet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySet", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + kind: { + constraints: { + Pattern: new RegExp("^[-\\w\\._,\\(\\)]+$") + }, + serializedName: "kind", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku" + } + }, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetPlan" + } + } + } + } +}; + +export const Identity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + defaultValue: "SystemAssigned", + isConstant: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "Enum", + allowedValues: ["Free", "Basic", "Standard", "Premium"] + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const Plan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + required: true, + type: { + name: "String" + } + }, + product: { + serializedName: "product", + required: true, + type: { + name: "String" + } + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const WorkspacePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspacePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + applicationGroupReferences: { + serializedName: "properties.applicationGroupReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Workspace" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ScalingSchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingSchedule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + daysOfWeek: { + serializedName: "daysOfWeek", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + rampUpStartTime: { + serializedName: "rampUpStartTime", + type: { + name: "Composite", + className: "Time" + } + }, + rampUpLoadBalancingAlgorithm: { + serializedName: "rampUpLoadBalancingAlgorithm", + type: { + name: "String" + } + }, + rampUpMinimumHostsPct: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "rampUpMinimumHostsPct", + type: { + name: "Number" + } + }, + rampUpCapacityThresholdPct: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 1 + }, + serializedName: "rampUpCapacityThresholdPct", + type: { + name: "Number" + } + }, + peakStartTime: { + serializedName: "peakStartTime", + type: { + name: "Composite", + className: "Time" + } + }, + peakLoadBalancingAlgorithm: { + serializedName: "peakLoadBalancingAlgorithm", + type: { + name: "String" + } + }, + rampDownStartTime: { + serializedName: "rampDownStartTime", + type: { + name: "Composite", + className: "Time" + } + }, + rampDownLoadBalancingAlgorithm: { + serializedName: "rampDownLoadBalancingAlgorithm", + type: { + name: "String" + } + }, + rampDownMinimumHostsPct: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "rampDownMinimumHostsPct", + type: { + name: "Number" + } + }, + rampDownCapacityThresholdPct: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "rampDownCapacityThresholdPct", + type: { + name: "Number" + } + }, + rampDownForceLogoffUsers: { + serializedName: "rampDownForceLogoffUsers", + type: { + name: "Boolean" + } + }, + rampDownStopHostsWhen: { + serializedName: "rampDownStopHostsWhen", + type: { + name: "String" + } + }, + rampDownWaitTimeMinutes: { + serializedName: "rampDownWaitTimeMinutes", + type: { + name: "Number" + } + }, + rampDownNotificationMessage: { + serializedName: "rampDownNotificationMessage", + type: { + name: "String" + } + }, + offPeakStartTime: { + serializedName: "offPeakStartTime", + type: { + name: "Composite", + className: "Time" + } + }, + offPeakLoadBalancingAlgorithm: { + serializedName: "offPeakLoadBalancingAlgorithm", + type: { + name: "String" + } + } + } + } +}; + +export const Time: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Time", + modelProperties: { + hour: { + constraints: { + InclusiveMaximum: 23, + InclusiveMinimum: 0 + }, + serializedName: "hour", + required: true, + type: { + name: "Number" + } + }, + minute: { + constraints: { + InclusiveMaximum: 59, + InclusiveMinimum: 0 + }, + serializedName: "minute", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ScalingHostPoolReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingHostPoolReference", + modelProperties: { + hostPoolArmPath: { + serializedName: "hostPoolArmPath", + type: { + name: "String" + } + }, + scalingPlanEnabled: { + serializedName: "scalingPlanEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ScalingPlanPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingPlanPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + timeZone: { + serializedName: "properties.timeZone", + type: { + name: "String" + } + }, + exclusionTag: { + serializedName: "properties.exclusionTag", + type: { + name: "String" + } + }, + schedules: { + serializedName: "properties.schedules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingSchedule" + } + } + } + }, + hostPoolReferences: { + serializedName: "properties.hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingHostPoolReference" + } + } + } + } + } + } +}; + +export const ScalingPlanList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingPlanList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingPlan" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MigrationRequestProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrationRequestProperties", + modelProperties: { + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + migrationPath: { + serializedName: "migrationPath", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationGroupList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroupList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const StartMenuItemList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StartMenuItemList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StartMenuItem" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + filePath: { + serializedName: "properties.filePath", + type: { + name: "String" + } + }, + commandLineSetting: { + serializedName: "properties.commandLineSetting", + type: { + name: "String" + } + }, + commandLineArguments: { + serializedName: "properties.commandLineArguments", + type: { + name: "String" + } + }, + showInPortal: { + serializedName: "properties.showInPortal", + type: { + name: "Boolean" + } + }, + iconPath: { + serializedName: "properties.iconPath", + type: { + name: "String" + } + }, + iconIndex: { + serializedName: "properties.iconIndex", + type: { + name: "Number" + } + }, + msixPackageFamilyName: { + serializedName: "properties.msixPackageFamilyName", + nullable: true, + type: { + name: "String" + } + }, + msixPackageApplicationId: { + serializedName: "properties.msixPackageApplicationId", + nullable: true, + type: { + name: "String" + } + }, + applicationType: { + serializedName: "properties.applicationType", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Application" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DesktopPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DesktopPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + } + } + } +}; + +export const DesktopList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DesktopList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Desktop" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RegistrationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistrationInfo", + modelProperties: { + expirationTime: { + serializedName: "expirationTime", + type: { + name: "DateTime" + } + }, + token: { + serializedName: "token", + type: { + name: "String" + } + }, + registrationTokenOperation: { + serializedName: "registrationTokenOperation", + type: { + name: "String" + } + } + } + } +}; + +export const RegistrationInfoPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistrationInfoPatch", + modelProperties: { + expirationTime: { + serializedName: "expirationTime", + type: { + name: "DateTime" + } + }, + registrationTokenOperation: { + serializedName: "registrationTokenOperation", + type: { + name: "String" + } + } + } + } +}; + +export const HostPoolList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostPoolList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UserSessionList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserSessionList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserSession" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostHealthCheckReport: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostHealthCheckReport", + modelProperties: { + healthCheckName: { + serializedName: "healthCheckName", + readOnly: true, + type: { + name: "String" + } + }, + healthCheckResult: { + serializedName: "healthCheckResult", + readOnly: true, + type: { + name: "String" + } + }, + additionalFailureDetails: { + serializedName: "additionalFailureDetails", + type: { + name: "Composite", + className: "SessionHostHealthCheckFailureDetails" + } + } + } + } +}; + +export const SessionHostHealthCheckFailureDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostHealthCheckFailureDetails", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + errorCode: { + serializedName: "errorCode", + readOnly: true, + type: { + name: "Number" + } + }, + lastHealthCheckDateTime: { + serializedName: "lastHealthCheckDateTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const SessionHostList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHost" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MsixPackageDependencies: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageDependencies", + modelProperties: { + dependencyName: { + serializedName: "dependencyName", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + minVersion: { + serializedName: "minVersion", + type: { + name: "String" + } + } + } + } +}; + +export const MsixPackageApplications: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageApplications", + modelProperties: { + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + appUserModelID: { + serializedName: "appUserModelID", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "friendlyName", + type: { + name: "String" + } + }, + iconImageName: { + serializedName: "iconImageName", + type: { + name: "String" + } + }, + rawIcon: { + serializedName: "rawIcon", + type: { + name: "ByteArray" + } + }, + rawPng: { + serializedName: "rawPng", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const MsixPackageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MsixImageURI: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixImageURI", + modelProperties: { + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandMsixImageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpandMsixImageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpandMsixImage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SendMessage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SendMessage", + modelProperties: { + messageTitle: { + serializedName: "messageTitle", + type: { + name: "String" + } + }, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResultWithSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResultWithSystemData", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionWithSystemData" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Workspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Workspace", + modelProperties: { + ...ResourceModelWithAllowedPropertySet.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + applicationGroupReferences: { + serializedName: "properties.applicationGroupReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cloudPcResource: { + serializedName: "properties.cloudPcResource", + readOnly: true, + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const ScalingPlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingPlan", + modelProperties: { + ...ResourceModelWithAllowedPropertySet.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + timeZone: { + serializedName: "properties.timeZone", + type: { + name: "String" + } + }, + hostPoolType: { + serializedName: "properties.hostPoolType", + type: { + name: "String" + } + }, + exclusionTag: { + serializedName: "properties.exclusionTag", + type: { + name: "String" + } + }, + schedules: { + serializedName: "properties.schedules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingSchedule" + } + } + } + }, + hostPoolReferences: { + serializedName: "properties.hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingHostPoolReference" + } + } + } + } + } + } +}; + +export const ApplicationGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroup", + modelProperties: { + ...ResourceModelWithAllowedPropertySet.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + hostPoolArmPath: { + serializedName: "properties.hostPoolArmPath", + required: true, + type: { + name: "String" + } + }, + workspaceArmPath: { + serializedName: "properties.workspaceArmPath", + readOnly: true, + type: { + name: "String" + } + }, + applicationGroupType: { + serializedName: "properties.applicationGroupType", + required: true, + type: { + name: "String" + } + }, + migrationRequest: { + serializedName: "properties.migrationRequest", + type: { + name: "Composite", + className: "MigrationRequestProperties" + } + }, + cloudPcResource: { + serializedName: "properties.cloudPcResource", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const HostPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostPool", + modelProperties: { + ...ResourceModelWithAllowedPropertySet.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + hostPoolType: { + serializedName: "properties.hostPoolType", + required: true, + type: { + name: "String" + } + }, + personalDesktopAssignmentType: { + serializedName: "properties.personalDesktopAssignmentType", + type: { + name: "String" + } + }, + customRdpProperty: { + serializedName: "properties.customRdpProperty", + type: { + name: "String" + } + }, + maxSessionLimit: { + serializedName: "properties.maxSessionLimit", + type: { + name: "Number" + } + }, + loadBalancerType: { + serializedName: "properties.loadBalancerType", + required: true, + type: { + name: "String" + } + }, + ring: { + serializedName: "properties.ring", + type: { + name: "Number" + } + }, + validationEnvironment: { + serializedName: "properties.validationEnvironment", + type: { + name: "Boolean" + } + }, + registrationInfo: { + serializedName: "properties.registrationInfo", + type: { + name: "Composite", + className: "RegistrationInfo" + } + }, + vmTemplate: { + serializedName: "properties.vmTemplate", + type: { + name: "String" + } + }, + applicationGroupReferences: { + serializedName: "properties.applicationGroupReferences", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ssoadfsAuthority: { + serializedName: "properties.ssoadfsAuthority", + type: { + name: "String" + } + }, + ssoClientId: { + serializedName: "properties.ssoClientId", + type: { + name: "String" + } + }, + ssoClientSecretKeyVaultPath: { + serializedName: "properties.ssoClientSecretKeyVaultPath", + type: { + name: "String" + } + }, + ssoSecretType: { + serializedName: "properties.ssoSecretType", + type: { + name: "String" + } + }, + preferredAppGroupType: { + serializedName: "properties.preferredAppGroupType", + required: true, + type: { + name: "String" + } + }, + startVMOnConnect: { + serializedName: "properties.startVMOnConnect", + type: { + name: "Boolean" + } + }, + migrationRequest: { + serializedName: "properties.migrationRequest", + type: { + name: "Composite", + className: "MigrationRequestProperties" + } + }, + cloudPcResource: { + serializedName: "properties.cloudPcResource", + readOnly: true, + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceModelWithAllowedPropertySetIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity", + modelProperties: { + ...Identity.type.modelProperties + } + } +}; + +export const ResourceModelWithAllowedPropertySetSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku", + modelProperties: { + ...Sku.type.modelProperties + } + } +}; + +export const ResourceModelWithAllowedPropertySetPlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetPlan", + modelProperties: { + ...Plan.type.modelProperties + } + } +}; + +export const ApplicationGroupPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroupPatch", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + } + } + } +}; + +export const StartMenuItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StartMenuItem", + modelProperties: { + ...Resource.type.modelProperties, + appAlias: { + serializedName: "properties.appAlias", + type: { + name: "String" + } + }, + filePath: { + serializedName: "properties.filePath", + type: { + name: "String" + } + }, + commandLineArguments: { + serializedName: "properties.commandLineArguments", + type: { + name: "String" + } + }, + iconPath: { + serializedName: "properties.iconPath", + type: { + name: "String" + } + }, + iconIndex: { + serializedName: "properties.iconIndex", + type: { + name: "Number" + } + } + } + } +}; + +export const Application: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Application", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + filePath: { + serializedName: "properties.filePath", + type: { + name: "String" + } + }, + msixPackageFamilyName: { + serializedName: "properties.msixPackageFamilyName", + nullable: true, + type: { + name: "String" + } + }, + msixPackageApplicationId: { + serializedName: "properties.msixPackageApplicationId", + nullable: true, + type: { + name: "String" + } + }, + applicationType: { + serializedName: "properties.applicationType", + type: { + name: "String" + } + }, + commandLineSetting: { + serializedName: "properties.commandLineSetting", + required: true, + type: { + name: "String" + } + }, + commandLineArguments: { + serializedName: "properties.commandLineArguments", + type: { + name: "String" + } + }, + showInPortal: { + serializedName: "properties.showInPortal", + type: { + name: "Boolean" + } + }, + iconPath: { + serializedName: "properties.iconPath", + type: { + name: "String" + } + }, + iconIndex: { + serializedName: "properties.iconIndex", + type: { + name: "Number" + } + }, + iconHash: { + serializedName: "properties.iconHash", + readOnly: true, + type: { + name: "String" + } + }, + iconContent: { + serializedName: "properties.iconContent", + readOnly: true, + type: { + name: "ByteArray" + } + } + } + } +}; + +export const Desktop: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Desktop", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + iconHash: { + serializedName: "properties.iconHash", + readOnly: true, + type: { + name: "String" + } + }, + iconContent: { + serializedName: "properties.iconContent", + readOnly: true, + type: { + name: "ByteArray" + } + } + } + } +}; + +export const HostPoolPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostPoolPatch", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + customRdpProperty: { + serializedName: "properties.customRdpProperty", + type: { + name: "String" + } + }, + maxSessionLimit: { + serializedName: "properties.maxSessionLimit", + type: { + name: "Number" + } + }, + personalDesktopAssignmentType: { + serializedName: "properties.personalDesktopAssignmentType", + type: { + name: "String" + } + }, + loadBalancerType: { + serializedName: "properties.loadBalancerType", + type: { + name: "String" + } + }, + ring: { + serializedName: "properties.ring", + type: { + name: "Number" + } + }, + validationEnvironment: { + serializedName: "properties.validationEnvironment", + type: { + name: "Boolean" + } + }, + registrationInfo: { + serializedName: "properties.registrationInfo", + type: { + name: "Composite", + className: "RegistrationInfoPatch" + } + }, + vmTemplate: { + serializedName: "properties.vmTemplate", + type: { + name: "String" + } + }, + ssoadfsAuthority: { + serializedName: "properties.ssoadfsAuthority", + type: { + name: "String" + } + }, + ssoClientId: { + serializedName: "properties.ssoClientId", + type: { + name: "String" + } + }, + ssoClientSecretKeyVaultPath: { + serializedName: "properties.ssoClientSecretKeyVaultPath", + type: { + name: "String" + } + }, + ssoSecretType: { + serializedName: "properties.ssoSecretType", + type: { + name: "String" + } + }, + preferredAppGroupType: { + serializedName: "properties.preferredAppGroupType", + type: { + name: "String" + } + }, + startVMOnConnect: { + serializedName: "properties.startVMOnConnect", + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const UserSession: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserSession", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + userPrincipalName: { + serializedName: "properties.userPrincipalName", + type: { + name: "String" + } + }, + applicationType: { + serializedName: "properties.applicationType", + type: { + name: "String" + } + }, + sessionState: { + serializedName: "properties.sessionState", + type: { + name: "String" + } + }, + activeDirectoryUserName: { + serializedName: "properties.activeDirectoryUserName", + type: { + name: "String" + } + }, + createTime: { + serializedName: "properties.createTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const SessionHost: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHost", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + objectId: { + serializedName: "properties.objectId", + readOnly: true, + type: { + name: "String" + } + }, + lastHeartBeat: { + serializedName: "properties.lastHeartBeat", + type: { + name: "DateTime" + } + }, + sessions: { + serializedName: "properties.sessions", + type: { + name: "Number" + } + }, + agentVersion: { + serializedName: "properties.agentVersion", + type: { + name: "String" + } + }, + allowNewSession: { + serializedName: "properties.allowNewSession", + type: { + name: "Boolean" + } + }, + virtualMachineId: { + serializedName: "properties.virtualMachineId", + readOnly: true, + type: { + name: "String" + } + }, + resourceId: { + serializedName: "properties.resourceId", + readOnly: true, + type: { + name: "String" + } + }, + assignedUser: { + serializedName: "properties.assignedUser", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + statusTimestamp: { + serializedName: "properties.statusTimestamp", + readOnly: true, + type: { + name: "DateTime" + } + }, + osVersion: { + serializedName: "properties.osVersion", + type: { + name: "String" + } + }, + sxSStackVersion: { + serializedName: "properties.sxSStackVersion", + type: { + name: "String" + } + }, + updateState: { + serializedName: "properties.updateState", + type: { + name: "String" + } + }, + lastUpdateTime: { + serializedName: "properties.lastUpdateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + updateErrorMessage: { + serializedName: "properties.updateErrorMessage", + type: { + name: "String" + } + }, + sessionHostHealthCheckResults: { + serializedName: "properties.sessionHostHealthCheckResults", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostHealthCheckReport" + } + } + } + } + } + } +}; + +export const SessionHostPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostPatch", + modelProperties: { + ...Resource.type.modelProperties, + allowNewSession: { + serializedName: "properties.allowNewSession", + type: { + name: "Boolean" + } + }, + assignedUser: { + serializedName: "properties.assignedUser", + type: { + name: "String" + } + } + } + } +}; + +export const MsixPackage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackage", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + imagePath: { + serializedName: "properties.imagePath", + type: { + name: "String" + } + }, + packageName: { + serializedName: "properties.packageName", + type: { + name: "String" + } + }, + packageFamilyName: { + serializedName: "properties.packageFamilyName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + nullable: true, + type: { + name: "String" + } + }, + packageRelativePath: { + serializedName: "properties.packageRelativePath", + type: { + name: "String" + } + }, + isRegularRegistration: { + serializedName: "properties.isRegularRegistration", + type: { + name: "Boolean" + } + }, + isActive: { + serializedName: "properties.isActive", + type: { + name: "Boolean" + } + }, + packageDependencies: { + serializedName: "properties.packageDependencies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageDependencies" + } + } + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "properties.lastUpdated", + type: { + name: "DateTime" + } + }, + packageApplications: { + serializedName: "properties.packageApplications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageApplications" + } + } + } + } + } + } +}; + +export const MsixPackagePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackagePatch", + modelProperties: { + ...Resource.type.modelProperties, + isActive: { + serializedName: "properties.isActive", + type: { + name: "Boolean" + } + }, + isRegularRegistration: { + serializedName: "properties.isRegularRegistration", + type: { + name: "Boolean" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandMsixImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpandMsixImage", + modelProperties: { + ...Resource.type.modelProperties, + packageAlias: { + serializedName: "properties.packageAlias", + type: { + name: "String" + } + }, + imagePath: { + serializedName: "properties.imagePath", + type: { + name: "String" + } + }, + packageName: { + serializedName: "properties.packageName", + type: { + name: "String" + } + }, + packageFamilyName: { + serializedName: "properties.packageFamilyName", + type: { + name: "String" + } + }, + packageFullName: { + serializedName: "properties.packageFullName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + nullable: true, + type: { + name: "String" + } + }, + packageRelativePath: { + serializedName: "properties.packageRelativePath", + type: { + name: "String" + } + }, + isRegularRegistration: { + serializedName: "properties.isRegularRegistration", + type: { + name: "Boolean" + } + }, + isActive: { + serializedName: "properties.isActive", + type: { + name: "Boolean" + } + }, + packageDependencies: { + serializedName: "properties.packageDependencies", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageDependencies" + } + } + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "properties.lastUpdated", + type: { + name: "DateTime" + } + }, + packageApplications: { + serializedName: "properties.packageApplications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageApplications" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionWithSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionWithSystemData", + modelProperties: { + ...PrivateEndpointConnection.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts new file mode 100644 index 000000000000..6c8618a4d9ea --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts @@ -0,0 +1,372 @@ +/* + * 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 { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + Workspace as WorkspaceMapper, + WorkspacePatch as WorkspacePatchMapper, + ScalingPlan as ScalingPlanMapper, + ScalingPlanPatch as ScalingPlanPatchMapper, + ApplicationGroup as ApplicationGroupMapper, + ApplicationGroupPatch as ApplicationGroupPatchMapper, + Application as ApplicationMapper, + ApplicationPatch as ApplicationPatchMapper, + DesktopPatch as DesktopPatchMapper, + HostPool as HostPoolMapper, + HostPoolPatch as HostPoolPatchMapper, + SendMessage as SendMessageMapper, + SessionHostPatch as SessionHostPatchMapper, + MsixPackage as MsixPackageMapper, + MsixPackagePatch as MsixPackagePatchMapper, + MsixImageURI as MsixImageURIMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-09-03-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const workspaceName: OperationURLParameter = { + parameterPath: "workspaceName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "workspaceName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const workspace: OperationParameter = { + parameterPath: "workspace", + mapper: WorkspaceMapper +}; + +export const workspace1: OperationParameter = { + parameterPath: ["options", "workspace"], + mapper: WorkspacePatchMapper +}; + +export const scalingPlanName: OperationURLParameter = { + parameterPath: "scalingPlanName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "scalingPlanName", + required: true, + type: { + name: "String" + } + } +}; + +export const scalingPlan: OperationParameter = { + parameterPath: "scalingPlan", + mapper: ScalingPlanMapper +}; + +export const scalingPlan1: OperationParameter = { + parameterPath: ["options", "scalingPlan"], + mapper: ScalingPlanPatchMapper +}; + +export const hostPoolName: OperationURLParameter = { + parameterPath: "hostPoolName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "hostPoolName", + required: true, + type: { + name: "String" + } + } +}; + +export const applicationGroupName: OperationURLParameter = { + parameterPath: "applicationGroupName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "applicationGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const applicationGroup: OperationParameter = { + parameterPath: "applicationGroup", + mapper: ApplicationGroupMapper +}; + +export const applicationGroup1: OperationParameter = { + parameterPath: ["options", "applicationGroup"], + mapper: ApplicationGroupPatchMapper +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const applicationName: OperationURLParameter = { + parameterPath: "applicationName", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 3 + }, + serializedName: "applicationName", + required: true, + type: { + name: "String" + } + } +}; + +export const application: OperationParameter = { + parameterPath: "application", + mapper: ApplicationMapper +}; + +export const application1: OperationParameter = { + parameterPath: ["options", "application"], + mapper: ApplicationPatchMapper +}; + +export const desktopName: OperationURLParameter = { + parameterPath: "desktopName", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 3 + }, + serializedName: "desktopName", + required: true, + type: { + name: "String" + } + } +}; + +export const desktop: OperationParameter = { + parameterPath: ["options", "desktop"], + mapper: DesktopPatchMapper +}; + +export const hostPool: OperationParameter = { + parameterPath: "hostPool", + mapper: HostPoolMapper +}; + +export const force: OperationQueryParameter = { + parameterPath: ["options", "force"], + mapper: { + serializedName: "force", + type: { + name: "Boolean" + } + } +}; + +export const hostPool1: OperationParameter = { + parameterPath: ["options", "hostPool"], + mapper: HostPoolPatchMapper +}; + +export const sessionHostName: OperationURLParameter = { + parameterPath: "sessionHostName", + mapper: { + constraints: { + MaxLength: 48, + MinLength: 3 + }, + serializedName: "sessionHostName", + required: true, + type: { + name: "String" + } + } +}; + +export const userSessionId: OperationURLParameter = { + parameterPath: "userSessionId", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 1 + }, + serializedName: "userSessionId", + required: true, + type: { + name: "String" + } + } +}; + +export const sendMessage: OperationParameter = { + parameterPath: ["options", "sendMessage"], + mapper: SendMessageMapper +}; + +export const sessionHost: OperationParameter = { + parameterPath: ["options", "sessionHost"], + mapper: SessionHostPatchMapper +}; + +export const msixPackageFullName: OperationURLParameter = { + parameterPath: "msixPackageFullName", + mapper: { + constraints: { + MaxLength: 100, + MinLength: 3 + }, + serializedName: "msixPackageFullName", + required: true, + type: { + name: "String" + } + } +}; + +export const msixPackage: OperationParameter = { + parameterPath: "msixPackage", + mapper: MsixPackageMapper +}; + +export const msixPackage1: OperationParameter = { + parameterPath: ["options", "msixPackage"], + mapper: MsixPackagePatchMapper +}; + +export const msixImageURI: OperationParameter = { + parameterPath: "msixImageURI", + mapper: MsixImageURIMapper +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + type: { + name: "String" + } + } +}; + +export const connection: OperationParameter = { + parameterPath: "connection", + mapper: PrivateEndpointConnectionMapper +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applicationGroups.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applicationGroups.ts new file mode 100644 index 000000000000..729fa6d2fcbe --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applicationGroups.ts @@ -0,0 +1,447 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ApplicationGroups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + ApplicationGroup, + ApplicationGroupsListByResourceGroupNextOptionalParams, + ApplicationGroupsListByResourceGroupOptionalParams, + ApplicationGroupsListBySubscriptionNextOptionalParams, + ApplicationGroupsListBySubscriptionOptionalParams, + ApplicationGroupsGetOptionalParams, + ApplicationGroupsGetResponse, + ApplicationGroupsCreateOrUpdateOptionalParams, + ApplicationGroupsCreateOrUpdateResponse, + ApplicationGroupsDeleteOptionalParams, + ApplicationGroupsUpdateOptionalParams, + ApplicationGroupsUpdateResponse, + ApplicationGroupsListByResourceGroupResponse, + ApplicationGroupsListBySubscriptionResponse, + ApplicationGroupsListByResourceGroupNextResponse, + ApplicationGroupsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing ApplicationGroups operations. */ +export class ApplicationGroupsImpl implements ApplicationGroups { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class ApplicationGroups class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List applicationGroups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ApplicationGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ApplicationGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ApplicationGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List applicationGroups in subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ApplicationGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ApplicationGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ApplicationGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get an application group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + getOperationSpec + ); + } + + /** + * Create or update an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationGroup Object containing ApplicationGroup definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + applicationGroupName: string, + applicationGroup: ApplicationGroup, + options?: ApplicationGroupsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, applicationGroup, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + deleteOperationSpec + ); + } + + /** + * Update an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + updateOperationSpec + ); + } + + /** + * List applicationGroups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ApplicationGroupsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List applicationGroups in subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ApplicationGroupsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ApplicationGroupsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ApplicationGroupsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroup + }, + 201: { + bodyMapper: Mappers.ApplicationGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.applicationGroup, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.applicationGroup1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applications.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applications.ts new file mode 100644 index 000000000000..5de8195e028a --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/applications.ts @@ -0,0 +1,378 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Applications } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + Application, + ApplicationsListNextOptionalParams, + ApplicationsListOptionalParams, + ApplicationsGetOptionalParams, + ApplicationsGetResponse, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsCreateOrUpdateResponse, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsUpdateResponse, + ApplicationsListResponse, + ApplicationsListNextResponse +} from "../models"; + +/// +/** Class containing Applications operations. */ +export class ApplicationsImpl implements Applications { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class Applications class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List applications. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + applicationGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + applicationGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + applicationGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + )) { + yield* page; + } + } + + /** + * Get an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, applicationName, options }, + getOperationSpec + ); + } + + /** + * Create or update an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param application Object containing Application definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + application: Application, + options?: ApplicationsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationGroupName, + applicationName, + application, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, applicationName, options }, + deleteOperationSpec + ); + } + + /** + * Update an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, applicationName, options }, + updateOperationSpec + ); + } + + /** + * List applications. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + applicationGroupName: string, + nextLink: string, + options?: ApplicationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.applicationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + 201: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.application, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.applicationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.applicationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.application1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.applicationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/desktops.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/desktops.ts new file mode 100644 index 000000000000..14ab8058056f --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/desktops.ts @@ -0,0 +1,279 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Desktops } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + Desktop, + DesktopsListNextOptionalParams, + DesktopsListOptionalParams, + DesktopsGetOptionalParams, + DesktopsGetResponse, + DesktopsUpdateOptionalParams, + DesktopsUpdateResponse, + DesktopsListResponse, + DesktopsListNextResponse +} from "../models"; + +/// +/** Class containing Desktops operations. */ +export class DesktopsImpl implements Desktops { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class Desktops class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List desktops. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + applicationGroupName: string, + options?: DesktopsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + applicationGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + applicationGroupName: string, + options?: DesktopsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + applicationGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + applicationGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + applicationGroupName: string, + options?: DesktopsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + )) { + yield* page; + } + } + + /** + * Get a desktop. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param desktopName The name of the desktop within the specified desktop group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + desktopName: string, + options?: DesktopsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, desktopName, options }, + getOperationSpec + ); + } + + /** + * Update a desktop. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param desktopName The name of the desktop within the specified desktop group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + desktopName: string, + options?: DesktopsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, desktopName, options }, + updateOperationSpec + ); + } + + /** + * List desktops. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + applicationGroupName: string, + options?: DesktopsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + applicationGroupName: string, + nextLink: string, + options?: DesktopsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Desktop + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.desktopName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Desktop + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.desktop, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName, + Parameters.desktopName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DesktopList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DesktopList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/hostPools.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/hostPools.ts new file mode 100644 index 000000000000..5a78f133bb85 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/hostPools.ts @@ -0,0 +1,485 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { HostPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + HostPool, + HostPoolsListByResourceGroupNextOptionalParams, + HostPoolsListByResourceGroupOptionalParams, + HostPoolsListNextOptionalParams, + HostPoolsListOptionalParams, + HostPoolsGetOptionalParams, + HostPoolsGetResponse, + HostPoolsCreateOrUpdateOptionalParams, + HostPoolsCreateOrUpdateResponse, + HostPoolsDeleteOptionalParams, + HostPoolsUpdateOptionalParams, + HostPoolsUpdateResponse, + HostPoolsListByResourceGroupResponse, + HostPoolsListResponse, + HostPoolsRetrieveRegistrationTokenOptionalParams, + HostPoolsRetrieveRegistrationTokenResponse, + HostPoolsListByResourceGroupNextResponse, + HostPoolsListNextResponse +} from "../models"; + +/// +/** Class containing HostPools operations. */ +export class HostPoolsImpl implements HostPools { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class HostPools class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List hostPools. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: HostPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: HostPoolsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: HostPoolsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List hostPools in subscription. + * @param options The options parameters. + */ + public list( + options?: HostPoolsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: HostPoolsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: HostPoolsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + getOperationSpec + ); + } + + /** + * Create or update a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPool Object containing HostPool definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + hostPool: HostPool, + options?: HostPoolsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, hostPool, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + deleteOperationSpec + ); + } + + /** + * Update a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + updateOperationSpec + ); + } + + /** + * List hostPools. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: HostPoolsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List hostPools in subscription. + * @param options The options parameters. + */ + private _list( + options?: HostPoolsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Registration token of the host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + retrieveRegistrationToken( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsRetrieveRegistrationTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + retrieveRegistrationTokenOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: HostPoolsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: HostPoolsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HostPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.HostPool + }, + 201: { + bodyMapper: Mappers.HostPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.hostPool, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.HostPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.hostPool1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HostPoolList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HostPoolList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const retrieveRegistrationTokenOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RegistrationInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HostPoolList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HostPoolList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts new file mode 100644 index 000000000000..7431743f39da --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts @@ -0,0 +1,22 @@ +/* + * 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 "./operations"; +export * from "./workspaces"; +export * from "./scalingPlans"; +export * from "./applicationGroups"; +export * from "./startMenuItems"; +export * from "./applications"; +export * from "./desktops"; +export * from "./hostPools"; +export * from "./userSessions"; +export * from "./sessionHosts"; +export * from "./msixPackages"; +export * from "./msixImages"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixImages.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixImages.ts new file mode 100644 index 000000000000..96ffeb489b86 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixImages.ts @@ -0,0 +1,206 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { MsixImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + ExpandMsixImage, + MsixImageURI, + MsixImagesExpandNextOptionalParams, + MsixImagesExpandOptionalParams, + MsixImagesExpandResponse, + MsixImagesExpandNextResponse +} from "../models"; + +/// +/** Class containing MsixImages operations. */ +export class MsixImagesImpl implements MsixImages { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class MsixImages class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * Expands and Lists MSIX packages in an Image, given the Image Path. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixImageURI Object containing URI to MSIX Image + * @param options The options parameters. + */ + public listExpand( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + options?: MsixImagesExpandOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.expandPagingAll( + resourceGroupName, + hostPoolName, + msixImageURI, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.expandPagingPage( + resourceGroupName, + hostPoolName, + msixImageURI, + options + ); + } + }; + } + + private async *expandPagingPage( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + options?: MsixImagesExpandOptionalParams + ): AsyncIterableIterator { + let result = await this._expand( + resourceGroupName, + hostPoolName, + msixImageURI, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._expandNext( + resourceGroupName, + hostPoolName, + msixImageURI, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *expandPagingAll( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + options?: MsixImagesExpandOptionalParams + ): AsyncIterableIterator { + for await (const page of this.expandPagingPage( + resourceGroupName, + hostPoolName, + msixImageURI, + options + )) { + yield* page; + } + } + + /** + * Expands and Lists MSIX packages in an Image, given the Image Path. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixImageURI Object containing URI to MSIX Image + * @param options The options parameters. + */ + private _expand( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + options?: MsixImagesExpandOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, msixImageURI, options }, + expandOperationSpec + ); + } + + /** + * ExpandNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixImageURI Object containing URI to MSIX Image + * @param nextLink The nextLink from the previous successful call to the Expand method. + * @param options The options parameters. + */ + private _expandNext( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + nextLink: string, + options?: MsixImagesExpandNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, msixImageURI, nextLink, options }, + expandNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const expandOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ExpandMsixImageList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.msixImageURI, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const expandNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpandMsixImageList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixPackages.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixPackages.ts new file mode 100644 index 000000000000..75a65dad6afd --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/msixPackages.ts @@ -0,0 +1,370 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { MsixPackages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + MsixPackage, + MsixPackagesListNextOptionalParams, + MsixPackagesListOptionalParams, + MsixPackagesGetOptionalParams, + MsixPackagesGetResponse, + MsixPackagesCreateOrUpdateOptionalParams, + MsixPackagesCreateOrUpdateResponse, + MsixPackagesDeleteOptionalParams, + MsixPackagesUpdateOptionalParams, + MsixPackagesUpdateResponse, + MsixPackagesListResponse, + MsixPackagesListNextResponse +} from "../models"; + +/// +/** Class containing MsixPackages operations. */ +export class MsixPackagesImpl implements MsixPackages { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class MsixPackages class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List MSIX packages in hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + hostPoolName: string, + options?: MsixPackagesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, hostPoolName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, hostPoolName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: MsixPackagesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, hostPoolName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: MsixPackagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get a msixpackage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, msixPackageFullName, options }, + getOperationSpec + ); + } + + /** + * Create or update a MSIX package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param msixPackage Object containing MSIX Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + msixPackage: MsixPackage, + options?: MsixPackagesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + msixPackageFullName, + msixPackage, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove an MSIX Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, msixPackageFullName, options }, + deleteOperationSpec + ); + } + + /** + * Update an MSIX Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, msixPackageFullName, options }, + updateOperationSpec + ); + } + + /** + * List MSIX packages in hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + hostPoolName: string, + options?: MsixPackagesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: MsixPackagesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MsixPackage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.msixPackageFullName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MsixPackage + }, + 201: { + bodyMapper: Mappers.MsixPackage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.msixPackage, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.msixPackageFullName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.msixPackageFullName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.MsixPackage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.msixPackage1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.msixPackageFullName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MsixPackageList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MsixPackageList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/operations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/operations.ts new file mode 100644 index 000000000000..16979b5873f3 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/operations.ts @@ -0,0 +1,137 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + ResourceProviderOperation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List all of the available operations the Desktop Virtualization resource provider supports. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all of the available operations the Desktop Virtualization resource provider supports. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.DesktopVirtualization/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceProviderOperationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceProviderOperationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateEndpointConnections.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..8fed1e3f3f2a --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateEndpointConnections.ts @@ -0,0 +1,652 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + PrivateEndpointConnectionWithSystemData, + PrivateEndpointConnectionsListByHostPoolNextOptionalParams, + PrivateEndpointConnectionsListByHostPoolOptionalParams, + PrivateEndpointConnectionsListByWorkspaceNextOptionalParams, + PrivateEndpointConnectionsListByWorkspaceOptionalParams, + PrivateEndpointConnectionsListByHostPoolResponse, + PrivateEndpointConnectionsGetByHostPoolOptionalParams, + PrivateEndpointConnectionsGetByHostPoolResponse, + PrivateEndpointConnectionsDeleteByHostPoolOptionalParams, + PrivateEndpointConnection, + PrivateEndpointConnectionsUpdateByHostPoolOptionalParams, + PrivateEndpointConnectionsUpdateByHostPoolResponse, + PrivateEndpointConnectionsListByWorkspaceResponse, + PrivateEndpointConnectionsGetByWorkspaceOptionalParams, + PrivateEndpointConnectionsGetByWorkspaceResponse, + PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams, + PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams, + PrivateEndpointConnectionsUpdateByWorkspaceResponse, + PrivateEndpointConnectionsListByHostPoolNextResponse, + PrivateEndpointConnectionsListByWorkspaceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnections operations. */ +export class PrivateEndpointConnectionsImpl + implements PrivateEndpointConnections { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class PrivateEndpointConnections class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List private endpoint connections associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateEndpointConnectionsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateEndpointConnectionsListByHostPoolOptionalParams + ): AsyncIterableIterator { + let result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateEndpointConnectionsListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * List private endpoint connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + public listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByWorkspacePagingAll( + resourceGroupName, + workspaceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByWorkspacePagingPage( + resourceGroupName, + workspaceName, + options + ); + } + }; + } + + private async *listByWorkspacePagingPage( + resourceGroupName: string, + workspaceName: string, + options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByWorkspace( + resourceGroupName, + workspaceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByWorkspaceNext( + resourceGroupName, + workspaceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByWorkspacePagingAll( + resourceGroupName: string, + workspaceName: string, + options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByWorkspacePagingPage( + resourceGroupName, + workspaceName, + options + )) { + yield* page; + } + } + + /** + * List private endpoint connections associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateEndpointConnectionsListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * Get a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + getByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + options + }, + getByHostPoolOperationSpec + ); + } + + /** + * Remove a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + deleteByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + options + }, + deleteByHostPoolOperationSpec + ); + } + + /** + * Approve or reject a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param connection Object containing the updated connection. + * @param options The options parameters. + */ + updateByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + connection: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsUpdateByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + connection, + options + }, + updateByHostPoolOperationSpec + ); + } + + /** + * List private endpoint connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + private _listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + listByWorkspaceOperationSpec + ); + } + + /** + * Get a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + getByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetByWorkspaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + getByWorkspaceOperationSpec + ); + } + + /** + * Remove a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + deleteByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + deleteByWorkspaceOperationSpec + ); + } + + /** + * Approve or reject a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param connection Object containing the updated connection. + * @param options The options parameters. + */ + updateByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + connection: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + connection, + options + }, + updateByWorkspaceOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: PrivateEndpointConnectionsListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } + + /** + * ListByWorkspaceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. + * @param options The options parameters. + */ + private _listByWorkspaceNext( + resourceGroupName: string, + workspaceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsListByWorkspaceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, nextLink, options }, + listByWorkspaceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResultWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.connection, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByWorkspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResultWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getByWorkspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteByWorkspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateByWorkspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.connection, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResultWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResultWithSystemData + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateLinkResources.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..dbb495a38cb5 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/privateLinkResources.ts @@ -0,0 +1,344 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + PrivateLinkResource, + PrivateLinkResourcesListByHostPoolNextOptionalParams, + PrivateLinkResourcesListByHostPoolOptionalParams, + PrivateLinkResourcesListByWorkspaceNextOptionalParams, + PrivateLinkResourcesListByWorkspaceOptionalParams, + PrivateLinkResourcesListByHostPoolResponse, + PrivateLinkResourcesListByWorkspaceResponse, + PrivateLinkResourcesListByHostPoolNextResponse, + PrivateLinkResourcesListByWorkspaceNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkResources operations. */ +export class PrivateLinkResourcesImpl implements PrivateLinkResources { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class PrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List the private link resources available for this hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateLinkResourcesListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateLinkResourcesListByHostPoolOptionalParams + ): AsyncIterableIterator { + let result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateLinkResourcesListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * List the private link resources available for this workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + public listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateLinkResourcesListByWorkspaceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByWorkspacePagingAll( + resourceGroupName, + workspaceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByWorkspacePagingPage( + resourceGroupName, + workspaceName, + options + ); + } + }; + } + + private async *listByWorkspacePagingPage( + resourceGroupName: string, + workspaceName: string, + options?: PrivateLinkResourcesListByWorkspaceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByWorkspace( + resourceGroupName, + workspaceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByWorkspaceNext( + resourceGroupName, + workspaceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByWorkspacePagingAll( + resourceGroupName: string, + workspaceName: string, + options?: PrivateLinkResourcesListByWorkspaceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByWorkspacePagingPage( + resourceGroupName, + workspaceName, + options + )) { + yield* page; + } + } + + /** + * List the private link resources available for this hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateLinkResourcesListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * List the private link resources available for this workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + private _listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateLinkResourcesListByWorkspaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + listByWorkspaceOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: PrivateLinkResourcesListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } + + /** + * ListByWorkspaceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. + * @param options The options parameters. + */ + private _listByWorkspaceNext( + resourceGroupName: string, + workspaceName: string, + nextLink: string, + options?: PrivateLinkResourcesListByWorkspaceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, nextLink, options }, + listByWorkspaceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByWorkspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/scalingPlans.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/scalingPlans.ts new file mode 100644 index 000000000000..2df17f2709a1 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/scalingPlans.ts @@ -0,0 +1,602 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ScalingPlans } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + ScalingPlan, + ScalingPlansListByResourceGroupNextOptionalParams, + ScalingPlansListByResourceGroupOptionalParams, + ScalingPlansListBySubscriptionNextOptionalParams, + ScalingPlansListBySubscriptionOptionalParams, + ScalingPlansListByHostPoolNextOptionalParams, + ScalingPlansListByHostPoolOptionalParams, + ScalingPlansGetOptionalParams, + ScalingPlansGetResponse, + ScalingPlansCreateOptionalParams, + ScalingPlansCreateResponse, + ScalingPlansDeleteOptionalParams, + ScalingPlansUpdateOptionalParams, + ScalingPlansUpdateResponse, + ScalingPlansListByResourceGroupResponse, + ScalingPlansListBySubscriptionResponse, + ScalingPlansListByHostPoolResponse, + ScalingPlansListByResourceGroupNextResponse, + ScalingPlansListBySubscriptionNextResponse, + ScalingPlansListByHostPoolNextResponse +} from "../models"; + +/// +/** Class containing ScalingPlans operations. */ +export class ScalingPlansImpl implements ScalingPlans { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class ScalingPlans class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List scaling plans. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ScalingPlansListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ScalingPlansListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ScalingPlansListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List scaling plans in subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ScalingPlansListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ScalingPlansListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ScalingPlansListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List scaling plan associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ScalingPlansListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: ScalingPlansListByHostPoolOptionalParams + ): AsyncIterableIterator { + let result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: ScalingPlansListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scalingPlanName, options }, + getOperationSpec + ); + } + + /** + * Create or update a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan definitions. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + scalingPlanName: string, + scalingPlan: ScalingPlan, + options?: ScalingPlansCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scalingPlanName, scalingPlan, options }, + createOperationSpec + ); + } + + /** + * Remove a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scalingPlanName, options }, + deleteOperationSpec + ); + } + + /** + * Update a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scalingPlanName, options }, + updateOperationSpec + ); + } + + /** + * List scaling plans. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ScalingPlansListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List scaling plans in subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ScalingPlansListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * List scaling plan associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ScalingPlansListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ScalingPlansListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ScalingPlansListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: ScalingPlansListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlan + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scalingPlanName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlan + }, + 201: { + bodyMapper: Mappers.ScalingPlan + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.scalingPlan, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scalingPlanName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scalingPlanName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlan + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.scalingPlan1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scalingPlanName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ScalingPlanList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHosts.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHosts.ts new file mode 100644 index 000000000000..6b2aee4ab699 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHosts.ts @@ -0,0 +1,309 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SessionHosts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + SessionHost, + SessionHostsListNextOptionalParams, + SessionHostsListOptionalParams, + SessionHostsGetOptionalParams, + SessionHostsGetResponse, + SessionHostsDeleteOptionalParams, + SessionHostsUpdateOptionalParams, + SessionHostsUpdateResponse, + SessionHostsListResponse, + SessionHostsListNextResponse +} from "../models"; + +/// +/** Class containing SessionHosts operations. */ +export class SessionHostsImpl implements SessionHosts { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class SessionHosts class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List sessionHosts. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, hostPoolName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, hostPoolName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, hostPoolName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get a session host. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, options }, + getOperationSpec + ); + } + + /** + * Remove a SessionHost. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, options }, + deleteOperationSpec + ); + } + + /** + * Update a session host. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, options }, + updateOperationSpec + ); + } + + /** + * List sessionHosts. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: SessionHostsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHost + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SessionHost + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.sessionHost, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/startMenuItems.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/startMenuItems.ts new file mode 100644 index 000000000000..f9d6206b1f95 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/startMenuItems.ts @@ -0,0 +1,189 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { StartMenuItems } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + StartMenuItem, + StartMenuItemsListNextOptionalParams, + StartMenuItemsListOptionalParams, + StartMenuItemsListResponse, + StartMenuItemsListNextResponse +} from "../models"; + +/// +/** Class containing StartMenuItems operations. */ +export class StartMenuItemsImpl implements StartMenuItems { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class StartMenuItems class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List start menu items in the given application group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + applicationGroupName: string, + options?: StartMenuItemsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + applicationGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + applicationGroupName: string, + options?: StartMenuItemsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + applicationGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + applicationGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + applicationGroupName: string, + options?: StartMenuItemsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + applicationGroupName, + options + )) { + yield* page; + } + } + + /** + * List start menu items in the given application group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + applicationGroupName: string, + options?: StartMenuItemsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + applicationGroupName: string, + nextLink: string, + options?: StartMenuItemsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, applicationGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StartMenuItemList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StartMenuItemList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/userSessions.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/userSessions.ts new file mode 100644 index 000000000000..1069604b9ad3 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/userSessions.ts @@ -0,0 +1,565 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { UserSessions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + UserSession, + UserSessionsListByHostPoolNextOptionalParams, + UserSessionsListByHostPoolOptionalParams, + UserSessionsListNextOptionalParams, + UserSessionsListOptionalParams, + UserSessionsListByHostPoolResponse, + UserSessionsGetOptionalParams, + UserSessionsGetResponse, + UserSessionsDeleteOptionalParams, + UserSessionsListResponse, + UserSessionsDisconnectOptionalParams, + UserSessionsSendMessageOptionalParams, + UserSessionsListByHostPoolNextResponse, + UserSessionsListNextResponse +} from "../models"; + +/// +/** Class containing UserSessions operations. */ +export class UserSessionsImpl implements UserSessions { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class UserSessions class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: UserSessionsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: UserSessionsListByHostPoolOptionalParams + ): AsyncIterableIterator { + let result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: UserSessionsListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: UserSessionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + hostPoolName, + sessionHostName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + hostPoolName, + sessionHostName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: UserSessionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + hostPoolName, + sessionHostName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + hostPoolName, + sessionHostName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: UserSessionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + hostPoolName, + sessionHostName, + options + )) { + yield* page; + } + } + + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: UserSessionsListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * Get a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + sessionHostName, + userSessionId, + options + }, + getOperationSpec + ); + } + + /** + * Remove a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + sessionHostName, + userSessionId, + options + }, + deleteOperationSpec + ); + } + + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: UserSessionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, options }, + listOperationSpec + ); + } + + /** + * Disconnect a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + disconnect( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsDisconnectOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + sessionHostName, + userSessionId, + options + }, + disconnectOperationSpec + ); + } + + /** + * Send a message to a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + sendMessage( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsSendMessageOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + sessionHostName, + userSessionId, + options + }, + sendMessageOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: UserSessionsListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + nextLink: string, + options?: UserSessionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserSessionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserSession + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName, + Parameters.userSessionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName, + Parameters.userSessionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserSessionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept], + serializer +}; +const disconnectOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName, + Parameters.userSessionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const sendMessageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.sendMessage, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName, + Parameters.userSessionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserSessionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserSessionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/workspaces.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/workspaces.ts new file mode 100644 index 000000000000..bc72d6fb0234 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/workspaces.ts @@ -0,0 +1,447 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Workspaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClientContext } from "../desktopVirtualizationAPIClientContext"; +import { + Workspace, + WorkspacesListByResourceGroupNextOptionalParams, + WorkspacesListByResourceGroupOptionalParams, + WorkspacesListBySubscriptionNextOptionalParams, + WorkspacesListBySubscriptionOptionalParams, + WorkspacesGetOptionalParams, + WorkspacesGetResponse, + WorkspacesCreateOrUpdateOptionalParams, + WorkspacesCreateOrUpdateResponse, + WorkspacesDeleteOptionalParams, + WorkspacesUpdateOptionalParams, + WorkspacesUpdateResponse, + WorkspacesListByResourceGroupResponse, + WorkspacesListBySubscriptionResponse, + WorkspacesListByResourceGroupNextResponse, + WorkspacesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing Workspaces operations. */ +export class WorkspacesImpl implements Workspaces { + private readonly client: DesktopVirtualizationAPIClientContext; + + /** + * Initialize a new instance of the class Workspaces class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClientContext) { + this.client = client; + } + + /** + * List workspaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: WorkspacesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: WorkspacesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: WorkspacesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List workspaces in subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: WorkspacesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: WorkspacesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: WorkspacesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + getOperationSpec + ); + } + + /** + * Create or update a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param workspace Object containing Workspace definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + workspaceName: string, + workspace: Workspace, + options?: WorkspacesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, workspace, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + deleteOperationSpec + ); + } + + /** + * Update a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + update( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + updateOperationSpec + ); + } + + /** + * List workspaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: WorkspacesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List workspaces in subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: WorkspacesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: WorkspacesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: WorkspacesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Workspace + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Workspace + }, + 201: { + bodyMapper: Mappers.Workspace + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.workspace, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Workspace + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.workspace1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applicationGroups.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applicationGroups.ts new file mode 100644 index 000000000000..1df378218909 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applicationGroups.ts @@ -0,0 +1,88 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ApplicationGroup, + ApplicationGroupsListByResourceGroupOptionalParams, + ApplicationGroupsListBySubscriptionOptionalParams, + ApplicationGroupsGetOptionalParams, + ApplicationGroupsGetResponse, + ApplicationGroupsCreateOrUpdateOptionalParams, + ApplicationGroupsCreateOrUpdateResponse, + ApplicationGroupsDeleteOptionalParams, + ApplicationGroupsUpdateOptionalParams, + ApplicationGroupsUpdateResponse +} from "../models"; + +/// +/** Interface representing a ApplicationGroups. */ +export interface ApplicationGroups { + /** + * List applicationGroups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ApplicationGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List applicationGroups in subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ApplicationGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get an application group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsGetOptionalParams + ): Promise; + /** + * Create or update an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationGroup Object containing ApplicationGroup definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + applicationGroupName: string, + applicationGroup: ApplicationGroup, + options?: ApplicationGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsDeleteOptionalParams + ): Promise; + /** + * Update an applicationGroup. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationGroupsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applications.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applications.ts new file mode 100644 index 000000000000..4a22b8e62f2e --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/applications.ts @@ -0,0 +1,90 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Application, + ApplicationsListOptionalParams, + ApplicationsGetOptionalParams, + ApplicationsGetResponse, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsCreateOrUpdateResponse, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsUpdateResponse +} from "../models"; + +/// +/** Interface representing a Applications. */ +export interface Applications { + /** + * List applications. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + applicationGroupName: string, + options?: ApplicationsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsGetOptionalParams + ): Promise; + /** + * Create or update an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param application Object containing Application definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + application: Application, + options?: ApplicationsCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsDeleteOptionalParams + ): Promise; + /** + * Update an application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param applicationName The name of the application within the specified application group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + applicationName: string, + options?: ApplicationsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/desktops.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/desktops.ts new file mode 100644 index 000000000000..036e9f6be381 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/desktops.ts @@ -0,0 +1,59 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Desktop, + DesktopsListOptionalParams, + DesktopsGetOptionalParams, + DesktopsGetResponse, + DesktopsUpdateOptionalParams, + DesktopsUpdateResponse +} from "../models"; + +/// +/** Interface representing a Desktops. */ +export interface Desktops { + /** + * List desktops. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + applicationGroupName: string, + options?: DesktopsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a desktop. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param desktopName The name of the desktop within the specified desktop group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + applicationGroupName: string, + desktopName: string, + options?: DesktopsGetOptionalParams + ): Promise; + /** + * Update a desktop. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param desktopName The name of the desktop within the specified desktop group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + applicationGroupName: string, + desktopName: string, + options?: DesktopsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/hostPools.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/hostPools.ts new file mode 100644 index 000000000000..ab47e55fa977 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/hostPools.ts @@ -0,0 +1,101 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + HostPool, + HostPoolsListByResourceGroupOptionalParams, + HostPoolsListOptionalParams, + HostPoolsGetOptionalParams, + HostPoolsGetResponse, + HostPoolsCreateOrUpdateOptionalParams, + HostPoolsCreateOrUpdateResponse, + HostPoolsDeleteOptionalParams, + HostPoolsUpdateOptionalParams, + HostPoolsUpdateResponse, + HostPoolsRetrieveRegistrationTokenOptionalParams, + HostPoolsRetrieveRegistrationTokenResponse +} from "../models"; + +/// +/** Interface representing a HostPools. */ +export interface HostPools { + /** + * List hostPools. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: HostPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List hostPools in subscription. + * @param options The options parameters. + */ + list( + options?: HostPoolsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsGetOptionalParams + ): Promise; + /** + * Create or update a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPool Object containing HostPool definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + hostPool: HostPool, + options?: HostPoolsCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsDeleteOptionalParams + ): Promise; + /** + * Update a host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsUpdateOptionalParams + ): Promise; + /** + * Registration token of the host pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + retrieveRegistrationToken( + resourceGroupName: string, + hostPoolName: string, + options?: HostPoolsRetrieveRegistrationTokenOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..7431743f39da --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts @@ -0,0 +1,22 @@ +/* + * 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 "./operations"; +export * from "./workspaces"; +export * from "./scalingPlans"; +export * from "./applicationGroups"; +export * from "./startMenuItems"; +export * from "./applications"; +export * from "./desktops"; +export * from "./hostPools"; +export * from "./userSessions"; +export * from "./sessionHosts"; +export * from "./msixPackages"; +export * from "./msixImages"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixImages.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixImages.ts new file mode 100644 index 000000000000..26a17a1f0041 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixImages.ts @@ -0,0 +1,32 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ExpandMsixImage, + MsixImageURI, + MsixImagesExpandOptionalParams +} from "../models"; + +/// +/** Interface representing a MsixImages. */ +export interface MsixImages { + /** + * Expands and Lists MSIX packages in an Image, given the Image Path. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixImageURI Object containing URI to MSIX Image + * @param options The options parameters. + */ + listExpand( + resourceGroupName: string, + hostPoolName: string, + msixImageURI: MsixImageURI, + options?: MsixImagesExpandOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixPackages.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixPackages.ts new file mode 100644 index 000000000000..c38ab500bbfa --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/msixPackages.ts @@ -0,0 +1,94 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + MsixPackage, + MsixPackagesListOptionalParams, + MsixPackagesGetOptionalParams, + MsixPackagesGetResponse, + MsixPackagesCreateOrUpdateOptionalParams, + MsixPackagesCreateOrUpdateResponse, + MsixPackagesDeleteOptionalParams, + MsixPackagesUpdateOptionalParams, + MsixPackagesUpdateResponse +} from "../models"; + +/// +/** Interface representing a MsixPackages. */ +export interface MsixPackages { + /** + * List MSIX packages in hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + hostPoolName: string, + options?: MsixPackagesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a msixpackage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesGetOptionalParams + ): Promise; + /** + * Create or update a MSIX package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param msixPackage Object containing MSIX Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + msixPackage: MsixPackage, + options?: MsixPackagesCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove an MSIX Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesDeleteOptionalParams + ): Promise; + /** + * Update an MSIX Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param msixPackageFullName The version specific package full name of the MSIX package within + * specified hostpool + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + msixPackageFullName: string, + options?: MsixPackagesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/operations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..2c3b2fbb0b64 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/operations.ts @@ -0,0 +1,25 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ResourceProviderOperation, + OperationsListOptionalParams +} from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * List all of the available operations the Desktop Virtualization resource provider supports. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateEndpointConnections.ts new file mode 100644 index 000000000000..d57d4c906c60 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateEndpointConnections.ts @@ -0,0 +1,140 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + PrivateEndpointConnectionWithSystemData, + PrivateEndpointConnectionsListByHostPoolOptionalParams, + PrivateEndpointConnectionsListByWorkspaceOptionalParams, + PrivateEndpointConnectionsGetByHostPoolOptionalParams, + PrivateEndpointConnectionsGetByHostPoolResponse, + PrivateEndpointConnectionsDeleteByHostPoolOptionalParams, + PrivateEndpointConnection, + PrivateEndpointConnectionsUpdateByHostPoolOptionalParams, + PrivateEndpointConnectionsUpdateByHostPoolResponse, + PrivateEndpointConnectionsGetByWorkspaceOptionalParams, + PrivateEndpointConnectionsGetByWorkspaceResponse, + PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams, + PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams, + PrivateEndpointConnectionsUpdateByWorkspaceResponse +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnections. */ +export interface PrivateEndpointConnections { + /** + * List private endpoint connections associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateEndpointConnectionsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * List private endpoint connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateEndpointConnectionsListByWorkspaceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + getByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetByHostPoolOptionalParams + ): Promise; + /** + * Remove a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + deleteByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteByHostPoolOptionalParams + ): Promise; + /** + * Approve or reject a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param connection Object containing the updated connection. + * @param options The options parameters. + */ + updateByHostPool( + resourceGroupName: string, + hostPoolName: string, + privateEndpointConnectionName: string, + connection: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsUpdateByHostPoolOptionalParams + ): Promise; + /** + * Get a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + getByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetByWorkspaceOptionalParams + ): Promise; + /** + * Remove a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + deleteByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteByWorkspaceOptionalParams + ): Promise; + /** + * Approve or reject a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param connection Object containing the updated connection. + * @param options The options parameters. + */ + updateByWorkspace( + resourceGroupName: string, + workspaceName: string, + privateEndpointConnectionName: string, + connection: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsUpdateByWorkspaceOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateLinkResources.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateLinkResources.ts new file mode 100644 index 000000000000..e72893f912c2 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/privateLinkResources.ts @@ -0,0 +1,41 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + PrivateLinkResource, + PrivateLinkResourcesListByHostPoolOptionalParams, + PrivateLinkResourcesListByWorkspaceOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkResources. */ +export interface PrivateLinkResources { + /** + * List the private link resources available for this hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: PrivateLinkResourcesListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * List the private link resources available for this workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + listByWorkspace( + resourceGroupName: string, + workspaceName: string, + options?: PrivateLinkResourcesListByWorkspaceOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/scalingPlans.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/scalingPlans.ts new file mode 100644 index 000000000000..600d7856d964 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/scalingPlans.ts @@ -0,0 +1,100 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ScalingPlan, + ScalingPlansListByResourceGroupOptionalParams, + ScalingPlansListBySubscriptionOptionalParams, + ScalingPlansListByHostPoolOptionalParams, + ScalingPlansGetOptionalParams, + ScalingPlansGetResponse, + ScalingPlansCreateOptionalParams, + ScalingPlansCreateResponse, + ScalingPlansDeleteOptionalParams, + ScalingPlansUpdateOptionalParams, + ScalingPlansUpdateResponse +} from "../models"; + +/// +/** Interface representing a ScalingPlans. */ +export interface ScalingPlans { + /** + * List scaling plans. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ScalingPlansListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List scaling plans in subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ScalingPlansListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List scaling plan associated with hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ScalingPlansListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansGetOptionalParams + ): Promise; + /** + * Create or update a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan definitions. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + scalingPlanName: string, + scalingPlan: ScalingPlan, + options?: ScalingPlansCreateOptionalParams + ): Promise; + /** + * Remove a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansDeleteOptionalParams + ): Promise; + /** + * Update a scaling plan. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + scalingPlanName: string, + options?: ScalingPlansUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHosts.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHosts.ts new file mode 100644 index 000000000000..33281aa841c8 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHosts.ts @@ -0,0 +1,73 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SessionHost, + SessionHostsListOptionalParams, + SessionHostsGetOptionalParams, + SessionHostsGetResponse, + SessionHostsDeleteOptionalParams, + SessionHostsUpdateOptionalParams, + SessionHostsUpdateResponse +} from "../models"; + +/// +/** Interface representing a SessionHosts. */ +export interface SessionHosts { + /** + * List sessionHosts. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a session host. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsGetOptionalParams + ): Promise; + /** + * Remove a SessionHost. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsDeleteOptionalParams + ): Promise; + /** + * Update a session host. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/startMenuItems.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/startMenuItems.ts new file mode 100644 index 000000000000..0f214e379d72 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/startMenuItems.ts @@ -0,0 +1,26 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { StartMenuItem, StartMenuItemsListOptionalParams } from "../models"; + +/// +/** Interface representing a StartMenuItems. */ +export interface StartMenuItems { + /** + * List start menu items in the given application group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + applicationGroupName: string, + options?: StartMenuItemsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/userSessions.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/userSessions.ts new file mode 100644 index 000000000000..e3e6e4a41b99 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/userSessions.ts @@ -0,0 +1,108 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + UserSession, + UserSessionsListByHostPoolOptionalParams, + UserSessionsListOptionalParams, + UserSessionsGetOptionalParams, + UserSessionsGetResponse, + UserSessionsDeleteOptionalParams, + UserSessionsDisconnectOptionalParams, + UserSessionsSendMessageOptionalParams +} from "../models"; + +/// +/** Interface representing a UserSessions. */ +export interface UserSessions { + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: UserSessionsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * List userSessions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + list( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: UserSessionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsGetOptionalParams + ): Promise; + /** + * Remove a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsDeleteOptionalParams + ): Promise; + /** + * Disconnect a userSession. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + disconnect( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsDisconnectOptionalParams + ): Promise; + /** + * Send a message to a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param userSessionId The name of the user session within the specified session host + * @param options The options parameters. + */ + sendMessage( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + userSessionId: string, + options?: UserSessionsSendMessageOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/workspaces.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/workspaces.ts new file mode 100644 index 000000000000..b25835697187 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/workspaces.ts @@ -0,0 +1,88 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Workspace, + WorkspacesListByResourceGroupOptionalParams, + WorkspacesListBySubscriptionOptionalParams, + WorkspacesGetOptionalParams, + WorkspacesGetResponse, + WorkspacesCreateOrUpdateOptionalParams, + WorkspacesCreateOrUpdateResponse, + WorkspacesDeleteOptionalParams, + WorkspacesUpdateOptionalParams, + WorkspacesUpdateResponse +} from "../models"; + +/// +/** Interface representing a Workspaces. */ +export interface Workspaces { + /** + * List workspaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: WorkspacesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List workspaces in subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: WorkspacesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesGetOptionalParams + ): Promise; + /** + * Create or update a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param workspace Object containing Workspace definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + workspaceName: string, + workspace: Workspace, + options?: WorkspacesCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesDeleteOptionalParams + ): Promise; + /** + * Update a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param options The options parameters. + */ + update( + resourceGroupName: string, + workspaceName: string, + options?: WorkspacesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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 { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json b/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json new file mode 100644 index 000000000000..6e3251194117 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts", "./test/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/desktopvirtualization/ci.yml b/sdk/desktopvirtualization/ci.yml new file mode 100644 index 000000000000..031a1b9fbf01 --- /dev/null +++ b/sdk/desktopvirtualization/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/desktopvirtualization/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/desktopvirtualization/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: desktopvirtualization + Artifacts: + - name: azure-arm-desktopvirtualization + safeName: azurearmdesktopvirtualization + \ No newline at end of file