From b47bbae2e3f23d6faa87107628f15717dff47661 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 6 Nov 2023 20:07:51 +0000 Subject: [PATCH] CodeGen from PR 26203 in Azure/azure-rest-api-specs Merge 36a0e408a7c869966780999b0b339c6a2cf9e8a0 into b594fd4145904c9bbd018f4a2ddea75c7134aee7 --- common/config/rush/pnpm-lock.yaml | 4 +- .../arm-desktopvirtualization/CHANGELOG.md | 58 ++- .../arm-desktopvirtualization/README.md | 2 +- .../arm-desktopvirtualization/_meta.json | 8 +- .../arm-desktopvirtualization/package.json | 18 +- .../review/arm-desktopvirtualization.api.md | 220 ++++++++ .../src/desktopVirtualizationAPIClient.ts | 16 +- .../src/models/index.ts | 336 +++++++++++++ .../src/models/mappers.ts | 427 ++++++++++++++++ .../src/models/parameters.ts | 38 +- .../src/operations/appAttachPackageInfo.ts | 225 +++++++++ .../operations/appAttachPackageOperations.ts | 475 ++++++++++++++++++ .../src/operations/index.ts | 2 + .../appAttachPackageInfo.ts | 32 ++ .../appAttachPackageOperations.ts | 88 ++++ .../src/operationsInterfaces/index.ts | 2 + .../test/sampleTest.ts | 43 ++ .../arm-desktopvirtualization/tsconfig.json | 10 +- 18 files changed, 1962 insertions(+), 42 deletions(-) create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 29c35dff55ba..8b875f2ed13b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12187,17 +12187,19 @@ packages: dev: false file:projects/arm-desktopvirtualization.tgz: - resolution: {integrity: sha512-PCPedV/PuxGgESNuEKTPdRHDon5WHZknD/yPvCGIuDFraL8VXe+vgjABNurZzfpYjqPbDLYoS1ollsEk3jug4g==, tarball: file:projects/arm-desktopvirtualization.tgz} + resolution: {integrity: sha512-lZ29hP0WzZqp1A5KSKtuoX5OcnTjB6AMzRzFpwRhpBRi/QjmkURb1P9UI/Dt0aowzcsqa2s5A/YTX9ntEnuBKg==, tarball: file:projects/arm-desktopvirtualization.tgz} name: '@rush-temp/arm-desktopvirtualization' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.2(@types/node@18.18.8) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.8 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 rimraf: 5.0.5 diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md index 0c6f22b14641..734eecbf2491 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md @@ -1,15 +1,53 @@ # Release History + +## 1.2.0-beta.1 (2023-11-06) + +**Features** -## 1.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group AppAttachPackageInfo + - Added operation group AppAttachPackageOperations + - Added Interface AppAttachPackage + - Added Interface AppAttachPackageCreateOrUpdateOptionalParams + - Added Interface AppAttachPackageDeleteOptionalParams + - Added Interface AppAttachPackageGetOptionalParams + - Added Interface AppAttachPackageInfoImportNextOptionalParams + - Added Interface AppAttachPackageInfoImportOptionalParams + - Added Interface AppAttachPackageInfoProperties + - Added Interface AppAttachPackageList + - Added Interface AppAttachPackageListByResourceGroupNextOptionalParams + - Added Interface AppAttachPackageListByResourceGroupOptionalParams + - Added Interface AppAttachPackageListBySubscriptionNextOptionalParams + - Added Interface AppAttachPackageListBySubscriptionOptionalParams + - Added Interface AppAttachPackagePatch + - Added Interface AppAttachPackagePatchProperties + - Added Interface AppAttachPackageProperties + - Added Interface AppAttachPackageUpdateOptionalParams + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface ImportPackageInfoRequest + - Added Type Alias AppAttachPackageArchitectures + - Added Type Alias AppAttachPackageCreateOrUpdateResponse + - Added Type Alias AppAttachPackageGetResponse + - Added Type Alias AppAttachPackageInfoImportNextResponse + - Added Type Alias AppAttachPackageInfoImportResponse + - Added Type Alias AppAttachPackageListByResourceGroupNextResponse + - Added Type Alias AppAttachPackageListByResourceGroupResponse + - Added Type Alias AppAttachPackageListBySubscriptionNextResponse + - Added Type Alias AppAttachPackageListBySubscriptionResponse + - Added Type Alias AppAttachPackageUpdateResponse + - Added Type Alias FailHealthCheckOnStagingFailure + - Added Type Alias PackageTimestamped + - Added Type Alias ProvisioningState + - Interface ExpandMsixImage has a new optional parameter certificateExpiry + - Interface ExpandMsixImage has a new optional parameter certificateName + - Interface HostPool has a new optional parameter appAttachPackageReferences + - Added Enum KnownAppAttachPackageArchitectures + - Added Enum KnownFailHealthCheckOnStagingFailure + - Added Enum KnownPackageTimestamped + - Added Enum KnownProvisioningState + + ## 1.1.0 (2023-10-08) **Features** diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/README.md b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md index 387cf846b7df..2a041a8ec1d5 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/README.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [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) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json index aac8827ff336..2421caa63849 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c280892951a9e45c059132c05aace25a9c752d48", + "commit": "e8193963cc9aa9153cf8459f480789ea729ec04d", "readme": "specification/desktopvirtualization/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs-pr\\specification\\desktopvirtualization\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/desktopvirtualization/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json index d56d3701548d..ad47a9b2d66a 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DesktopVirtualizationAPIClient.", - "version": "1.1.1", + "version": "1.2.0-beta.1", "engines": { "node": ">=18.0.0" }, @@ -32,15 +32,17 @@ "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -103,13 +105,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization" +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md index 015d7bef8d52..e48656dfebdb 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md @@ -24,6 +24,152 @@ export interface AgentUpdateProperties { useSessionHostLocalTime?: boolean; } +// @public +export interface AppAttachPackage extends ResourceModelWithAllowedPropertySet { + properties: AppAttachPackageProperties; + readonly systemData?: SystemData; +} + +// @public +export type AppAttachPackageArchitectures = string; + +// @public +export interface AppAttachPackageCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageCreateOrUpdateResponse = AppAttachPackage; + +// @public +export interface AppAttachPackageDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; +} + +// @public +export interface AppAttachPackageGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageGetResponse = AppAttachPackage; + +// @public +export interface AppAttachPackageInfo { + listImport(resourceGroupName: string, hostPoolName: string, importPackageInfoRequest: ImportPackageInfoRequest, options?: AppAttachPackageInfoImportOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AppAttachPackageInfoImportNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageInfoImportNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageInfoImportOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageInfoImportResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageInfoProperties { + certificateExpiry?: Date; + certificateName?: string; + displayName?: string; + imagePath?: string; + isActive?: boolean; + isPackageTimestamped?: PackageTimestamped; + isRegularRegistration?: boolean; + lastUpdated?: Date; + packageAlias?: string; + packageApplications?: MsixPackageApplications[]; + packageDependencies?: MsixPackageDependencies[]; + packageFamilyName?: string; + packageFullName?: string; + packageName?: string; + packageRelativePath?: string; + version?: string; +} + +// @public +export interface AppAttachPackageList { + readonly nextLink?: string; + value?: AppAttachPackage[]; +} + +// @public +export interface AppAttachPackageListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageListByResourceGroupNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListByResourceGroupOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type AppAttachPackageListByResourceGroupResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageListBySubscriptionNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListBySubscriptionOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type AppAttachPackageListBySubscriptionResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageOperations { + createOrUpdate(resourceGroupName: string, appAttachPackageName: string, appAttachPackage: AppAttachPackage, options?: AppAttachPackageCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageDeleteOptionalParams): Promise; + get(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AppAttachPackageListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AppAttachPackageListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageUpdateOptionalParams): Promise; +} + +// @public +export interface AppAttachPackagePatch extends Resource { + properties?: AppAttachPackagePatchProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface AppAttachPackagePatchProperties { + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; + hostPoolReferences?: string[]; + image?: AppAttachPackageInfoProperties; + keyVaultURL?: string; +} + +// @public +export interface AppAttachPackageProperties { + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; + hostPoolReferences?: string[]; + image?: AppAttachPackageInfoProperties; + keyVaultURL?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AppAttachPackageUpdateOptionalParams extends coreClient.OperationOptions { + appAttachPackagePatch?: AppAttachPackagePatch; +} + +// @public +export type AppAttachPackageUpdateResponse = AppAttachPackage; + // @public export interface Application extends Resource { applicationType?: RemoteApplicationType; @@ -315,6 +461,10 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + appAttachPackageInfo: AppAttachPackageInfo; + // (undocumented) + appAttachPackageOperations: AppAttachPackageOperations; + // (undocumented) applicationGroups: ApplicationGroups; // (undocumented) applications: Applications; @@ -357,8 +507,30 @@ export interface DesktopVirtualizationAPIClientOptionalParams extends coreClient endpoint?: string; } +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface ExpandMsixImage extends Resource { + certificateExpiry?: Date; + certificateName?: string; displayName?: string; imagePath?: string; isActive?: boolean; @@ -380,6 +552,9 @@ export interface ExpandMsixImageList { value?: ExpandMsixImage[]; } +// @public +export type FailHealthCheckOnStagingFailure = string; + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -392,6 +567,7 @@ export type HealthCheckResult = string; // @public export interface HostPool extends ResourceModelWithAllowedPropertySet { agentUpdate?: AgentUpdateProperties; + readonly appAttachPackageReferences?: string[]; readonly applicationGroupReferences?: string[]; readonly cloudPcResource?: boolean; customRdpProperty?: string; @@ -540,6 +716,23 @@ export interface Identity { type?: "SystemAssigned"; } +// @public +export interface ImportPackageInfoRequest { + packageArchitecture?: AppAttachPackageArchitectures; + path?: string; +} + +// @public +export enum KnownAppAttachPackageArchitectures { + ALL = "ALL", + ARM = "ARM", + ARM64 = "ARM64", + Neutral = "Neutral", + X64 = "x64", + X86 = "x86", + X86A64 = "x86a64" +} + // @public export enum KnownApplicationGroupType { Desktop = "Desktop", @@ -567,6 +760,13 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownFailHealthCheckOnStagingFailure { + DoNotFail = "DoNotFail", + NeedsAssistance = "NeedsAssistance", + Unhealthy = "Unhealthy" +} + // @public export enum KnownHealthCheckName { AppAttachHealthCheck = "AppAttachHealthCheck", @@ -612,6 +812,12 @@ export enum KnownLoadBalancerType { Persistent = "Persistent" } +// @public +export enum KnownPackageTimestamped { + NotTimestamped = "NotTimestamped", + Timestamped = "Timestamped" +} + // @public export enum KnownPersonalDesktopAssignmentType { Automatic = "Automatic", @@ -640,6 +846,14 @@ export enum KnownPrivateEndpointServiceConnectionStatus { Rejected = "Rejected" } +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", @@ -925,6 +1139,9 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = ResourceProviderOperationList; +// @public +export type PackageTimestamped = string; + // @public export type PersonalDesktopAssignmentType = string; @@ -1108,6 +1325,9 @@ export interface PrivateLinkServiceConnectionState { status?: PrivateEndpointServiceConnectionStatus; } +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts index 7c2c089c59c3..e83a2ad8bb09 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts @@ -30,7 +30,9 @@ import { UserSessionsImpl, SessionHostsImpl, MsixPackagesImpl, - MsixImagesImpl + AppAttachPackageInfoImpl, + MsixImagesImpl, + AppAttachPackageOperationsImpl } from "./operations"; import { Operations, @@ -48,7 +50,9 @@ import { UserSessions, SessionHosts, MsixPackages, - MsixImages + AppAttachPackageInfo, + MsixImages, + AppAttachPackageOperations } from "./operationsInterfaces"; import { DesktopVirtualizationAPIClientOptionalParams } from "./models"; @@ -84,7 +88,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-desktopvirtualization/1.1.1`; + const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -137,7 +141,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-09-05"; + this.apiVersion = options.apiVersion || "2023-10-04-preview"; this.operations = new OperationsImpl(this); this.workspaces = new WorkspacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -155,7 +159,9 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { this.userSessions = new UserSessionsImpl(this); this.sessionHosts = new SessionHostsImpl(this); this.msixPackages = new MsixPackagesImpl(this); + this.appAttachPackageInfo = new AppAttachPackageInfoImpl(this); this.msixImages = new MsixImagesImpl(this); + this.appAttachPackageOperations = new AppAttachPackageOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -202,5 +208,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { userSessions: UserSessions; sessionHosts: SessionHosts; msixPackages: MsixPackages; + appAttachPackageInfo: AppAttachPackageInfo; msixImages: MsixImages; + appAttachPackageOperations: AppAttachPackageOperations; } diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts index 51a5cad5d64d..53443ef6a438 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts @@ -672,6 +672,127 @@ export interface MsixPackageList { readonly nextLink?: string; } +/** Information to import app attach package */ +export interface ImportPackageInfoRequest { + /** URI to Image */ + path?: string; + /** Possible device architectures that an app attach package can be configured for */ + packageArchitecture?: AppAttachPackageArchitectures; +} + +/** List of App Attach Package definitions. */ +export interface AppAttachPackageList { + /** List of App Attach Package definitions. */ + value?: AppAttachPackage[]; + /** + * 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 App Attach Package properties. */ +export interface AppAttachPackageProperties { + /** + * The provisioning state of the App Attach Package. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Detailed properties for App Attach Package */ + image?: AppAttachPackageInfoProperties; + /** List of Hostpool resource Ids. */ + hostPoolReferences?: string[]; + /** URL of keyvault location to store certificate */ + keyVaultURL?: string; + /** Parameter indicating how the health check should behave if this package fails staging */ + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; +} + +/** Schema for Import Package Information properties. */ +export interface AppAttachPackageInfoProperties { + /** Alias of App Attach Package. Assigned at import time */ + 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[]; + /** Certificate name found in the appxmanifest.xml. */ + certificateName?: string; + /** Date certificate expires, found in the appxmanifest.xml. */ + certificateExpiry?: Date; + /** Is package timestamped so it can ignore the certificate expiry date */ + isPackageTimestamped?: PackageTimestamped; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** Represents URI referring to MSIX Image */ export interface MsixImageURI { /** URI to Image */ @@ -689,6 +810,18 @@ export interface ExpandMsixImageList { readonly nextLink?: string; } +/** Schema for patchable fields on an App Attach Package. */ +export interface AppAttachPackagePatchProperties { + /** Detailed properties for App Attach Package */ + image?: AppAttachPackageInfoProperties; + /** List of Hostpool resource Ids. */ + hostPoolReferences?: string[]; + /** URL of keyvault location to store certificate */ + keyVaultURL?: string; + /** Parameter indicating how the health check should behave if this package fails staging */ + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; +} + /** Represents message sent to a UserSession. */ export interface SendMessage { /** Title of message. */ @@ -1116,6 +1249,18 @@ export interface ExpandMsixImage extends Resource { lastUpdated?: Date; /** List of package applications. */ packageApplications?: MsixPackageApplications[]; + /** Certificate name found in the appxmanifest.xml. */ + certificateName?: string; + /** Date certificate expires, found in the appxmanifest.xml. */ + certificateExpiry?: Date; +} + +/** Schema for patchable App Attach Package properties. */ +export interface AppAttachPackagePatch extends Resource { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Detailed properties for App Attach Package */ + properties?: AppAttachPackagePatchProperties; } /** Represents a Workspace definition. */ @@ -1251,6 +1396,11 @@ export interface HostPool extends ResourceModelWithAllowedPropertySet { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly applicationGroupReferences?: string[]; + /** + * List of App Attach Package links. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly appAttachPackageReferences?: 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. */ @@ -1279,6 +1429,17 @@ export interface HostPool extends ResourceModelWithAllowedPropertySet { readonly privateEndpointConnections?: PrivateEndpointConnection[]; } +/** Schema for App Attach Package properties. */ +export interface AppAttachPackage extends 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; + /** Detailed properties for App Attach Package */ + properties: AppAttachPackageProperties; +} + export interface ResourceModelWithAllowedPropertySetIdentity extends Identity {} export interface ResourceModelWithAllowedPropertySetSku extends Sku {} @@ -2003,6 +2164,102 @@ export enum KnownHealthCheckResult { * **SessionHostShutdown**: We received a Shutdown notification. */ export type HealthCheckResult = string; + +/** Known values of {@link AppAttachPackageArchitectures} that the service accepts. */ +export enum KnownAppAttachPackageArchitectures { + /** ARM */ + ARM = "ARM", + /** ARM64 */ + ARM64 = "ARM64", + /** X86 */ + X86 = "x86", + /** X64 */ + X64 = "x64", + /** Neutral */ + Neutral = "Neutral", + /** X86A64 */ + X86A64 = "x86a64", + /** ALL */ + ALL = "ALL" +} + +/** + * Defines values for AppAttachPackageArchitectures. \ + * {@link KnownAppAttachPackageArchitectures} can be used interchangeably with AppAttachPackageArchitectures, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ARM** \ + * **ARM64** \ + * **x86** \ + * **x64** \ + * **Neutral** \ + * **x86a64** \ + * **ALL** + */ +export type AppAttachPackageArchitectures = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Provisioning */ + Provisioning = "Provisioning", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Provisioning** \ + * **Failed** \ + * **Canceled** + */ +export type ProvisioningState = string; + +/** Known values of {@link PackageTimestamped} that the service accepts. */ +export enum KnownPackageTimestamped { + /** Timestamped */ + Timestamped = "Timestamped", + /** NotTimestamped */ + NotTimestamped = "NotTimestamped" +} + +/** + * Defines values for PackageTimestamped. \ + * {@link KnownPackageTimestamped} can be used interchangeably with PackageTimestamped, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Timestamped** \ + * **NotTimestamped** + */ +export type PackageTimestamped = string; + +/** Known values of {@link FailHealthCheckOnStagingFailure} that the service accepts. */ +export enum KnownFailHealthCheckOnStagingFailure { + /** Unhealthy */ + Unhealthy = "Unhealthy", + /** NeedsAssistance */ + NeedsAssistance = "NeedsAssistance", + /** DoNotFail */ + DoNotFail = "DoNotFail" +} + +/** + * Defines values for FailHealthCheckOnStagingFailure. \ + * {@link KnownFailHealthCheckOnStagingFailure} can be used interchangeably with FailHealthCheckOnStagingFailure, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unhealthy** \ + * **NeedsAssistance** \ + * **DoNotFail** + */ +export type FailHealthCheckOnStagingFailure = string; /** Defines values for SkuTier. */ export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; /** Defines values for DayOfWeek. */ @@ -2815,6 +3072,20 @@ export interface MsixPackagesListNextOptionalParams /** Contains response data for the listNext operation. */ export type MsixPackagesListNextResponse = MsixPackageList; +/** Optional parameters. */ +export interface AppAttachPackageInfoImportOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the import operation. */ +export type AppAttachPackageInfoImportResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageInfoImportNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the importNext operation. */ +export type AppAttachPackageInfoImportNextResponse = AppAttachPackageList; + /** Optional parameters. */ export interface MsixImagesExpandOptionalParams extends coreClient.OperationOptions {} @@ -2829,6 +3100,71 @@ export interface MsixImagesExpandNextOptionalParams /** Contains response data for the expandNext operation. */ export type MsixImagesExpandNextResponse = ExpandMsixImageList; +/** Optional parameters. */ +export interface AppAttachPackageGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AppAttachPackageGetResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AppAttachPackageCreateOrUpdateResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageDeleteOptionalParams + extends coreClient.OperationOptions { + /** Force flag to delete App Attach package. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface AppAttachPackageUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing App Attach Package definition. */ + appAttachPackagePatch?: AppAttachPackagePatch; +} + +/** Contains response data for the update operation. */ +export type AppAttachPackageUpdateResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are package name and host pool. */ + filter?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type AppAttachPackageListByResourceGroupResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are package name, host pool, and resource group. */ + filter?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type AppAttachPackageListBySubscriptionResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AppAttachPackageListByResourceGroupNextResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AppAttachPackageListBySubscriptionNextResponse = AppAttachPackageList; + /** Optional parameters. */ export interface DesktopVirtualizationAPIClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts index 2824f25d99a1..7a71fe6b715b 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts @@ -1861,6 +1861,320 @@ export const MsixPackageList: coreClient.CompositeMapper = { } }; +export const ImportPackageInfoRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportPackageInfoRequest", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String" + } + }, + packageArchitecture: { + serializedName: "packageArchitecture", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppAttachPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + image: { + serializedName: "image", + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties" + } + }, + hostPoolReferences: { + serializedName: "hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + keyVaultURL: { + serializedName: "keyVaultURL", + type: { + name: "String" + } + }, + failHealthCheckOnStagingFailure: { + serializedName: "failHealthCheckOnStagingFailure", + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties", + modelProperties: { + packageAlias: { + serializedName: "packageAlias", + type: { + name: "String" + } + }, + imagePath: { + serializedName: "imagePath", + type: { + name: "String" + } + }, + packageName: { + serializedName: "packageName", + type: { + name: "String" + } + }, + packageFamilyName: { + serializedName: "packageFamilyName", + type: { + name: "String" + } + }, + packageFullName: { + serializedName: "packageFullName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + nullable: true, + type: { + name: "String" + } + }, + packageRelativePath: { + serializedName: "packageRelativePath", + type: { + name: "String" + } + }, + isRegularRegistration: { + serializedName: "isRegularRegistration", + type: { + name: "Boolean" + } + }, + isActive: { + serializedName: "isActive", + type: { + name: "Boolean" + } + }, + packageDependencies: { + serializedName: "packageDependencies", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageDependencies" + } + } + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + }, + packageApplications: { + serializedName: "packageApplications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageApplications" + } + } + } + }, + certificateName: { + serializedName: "certificateName", + nullable: true, + type: { + name: "String" + } + }, + certificateExpiry: { + serializedName: "certificateExpiry", + nullable: true, + type: { + name: "DateTime" + } + }, + isPackageTimestamped: { + serializedName: "isPackageTimestamped", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const MsixImageURI: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1904,6 +2218,45 @@ export const ExpandMsixImageList: coreClient.CompositeMapper = { } }; +export const AppAttachPackagePatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackagePatchProperties", + modelProperties: { + image: { + serializedName: "image", + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties" + } + }, + hostPoolReferences: { + serializedName: "hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + keyVaultURL: { + serializedName: "keyVaultURL", + type: { + name: "String" + } + }, + failHealthCheckOnStagingFailure: { + serializedName: "failHealthCheckOnStagingFailure", + type: { + name: "String" + } + } + } + } +}; + export const SendMessage: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3098,6 +3451,44 @@ export const ExpandMsixImage: coreClient.CompositeMapper = { } } } + }, + certificateName: { + serializedName: "properties.certificateName", + nullable: true, + type: { + name: "String" + } + }, + certificateExpiry: { + serializedName: "properties.certificateExpiry", + nullable: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const AppAttachPackagePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackagePatch", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AppAttachPackagePatchProperties" + } } } } @@ -3427,6 +3818,18 @@ export const HostPool: coreClient.CompositeMapper = { } } }, + appAttachPackageReferences: { + serializedName: "properties.appAttachPackageReferences", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, ssoadfsAuthority: { serializedName: "properties.ssoadfsAuthority", type: { @@ -3501,6 +3904,30 @@ export const HostPool: coreClient.CompositeMapper = { } }; +export const AppAttachPackage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackage", + modelProperties: { + ...ResourceModelWithAllowedPropertySet.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AppAttachPackageProperties" + } + } + } + } +}; + export const ResourceModelWithAllowedPropertySetIdentity: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts index 0b67d82f15f0..8378d30c05d7 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts @@ -32,7 +32,10 @@ import { SessionHostPatch as SessionHostPatchMapper, MsixPackage as MsixPackageMapper, MsixPackagePatch as MsixPackagePatchMapper, - MsixImageURI as MsixImageURIMapper + ImportPackageInfoRequest as ImportPackageInfoRequestMapper, + MsixImageURI as MsixImageURIMapper, + AppAttachPackage as AppAttachPackageMapper, + AppAttachPackagePatch as AppAttachPackagePatchMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -62,7 +65,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-09-05", + defaultValue: "2023-10-04-preview", isConstant: true, serializedName: "api-version", type: { @@ -435,7 +438,38 @@ export const msixPackage1: OperationParameter = { mapper: MsixPackagePatchMapper }; +export const importPackageInfoRequest: OperationParameter = { + parameterPath: "importPackageInfoRequest", + mapper: ImportPackageInfoRequestMapper +}; + export const msixImageURI: OperationParameter = { parameterPath: "msixImageURI", mapper: MsixImageURIMapper }; + +export const appAttachPackageName: OperationURLParameter = { + parameterPath: "appAttachPackageName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$"), + MaxLength: 100, + MinLength: 3 + }, + serializedName: "appAttachPackageName", + required: true, + type: { + name: "String" + } + } +}; + +export const appAttachPackage: OperationParameter = { + parameterPath: "appAttachPackage", + mapper: AppAttachPackageMapper +}; + +export const appAttachPackagePatch: OperationParameter = { + parameterPath: ["options", "appAttachPackagePatch"], + mapper: AppAttachPackagePatchMapper +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts new file mode 100644 index 000000000000..246b816037f4 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts @@ -0,0 +1,225 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AppAttachPackageInfo } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + AppAttachPackage, + ImportPackageInfoRequest, + AppAttachPackageInfoImportNextOptionalParams, + AppAttachPackageInfoImportOptionalParams, + AppAttachPackageInfoImportResponse, + AppAttachPackageInfoImportNextResponse +} from "../models"; + +/// +/** Class containing AppAttachPackageInfo operations. */ +export class AppAttachPackageInfoImpl implements AppAttachPackageInfo { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class AppAttachPackageInfo class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + public listImport( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.importPagingAll( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.importPagingPage( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options, + settings + ); + } + }; + } + + private async *importPagingPage( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageInfoImportResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._import( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._importNext( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *importPagingAll( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): AsyncIterableIterator { + for await (const page of this.importPagingPage( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + )) { + yield* page; + } + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + private _import( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, importPackageInfoRequest, options }, + importOperationSpec + ); + } + + /** + * ImportNext + * @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 importPackageInfoRequest Object containing URI to package image and other optional properties + * @param nextLink The nextLink from the previous successful call to the Import method. + * @param options The options parameters. + */ + private _importNext( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + nextLink: string, + options?: AppAttachPackageInfoImportNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + nextLink, + options + }, + importNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const importOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.importPackageInfoRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const importNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + 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/appAttachPackageOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts new file mode 100644 index 000000000000..0488e03fe4e0 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts @@ -0,0 +1,475 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AppAttachPackageOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + AppAttachPackage, + AppAttachPackageListByResourceGroupNextOptionalParams, + AppAttachPackageListByResourceGroupOptionalParams, + AppAttachPackageListByResourceGroupResponse, + AppAttachPackageListBySubscriptionNextOptionalParams, + AppAttachPackageListBySubscriptionOptionalParams, + AppAttachPackageListBySubscriptionResponse, + AppAttachPackageGetOptionalParams, + AppAttachPackageGetResponse, + AppAttachPackageCreateOrUpdateOptionalParams, + AppAttachPackageCreateOrUpdateResponse, + AppAttachPackageDeleteOptionalParams, + AppAttachPackageUpdateOptionalParams, + AppAttachPackageUpdateResponse, + AppAttachPackageListByResourceGroupNextResponse, + AppAttachPackageListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing AppAttachPackageOperations operations. */ +export class AppAttachPackageOperationsImpl + implements AppAttachPackageOperations { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class AppAttachPackageOperations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AppAttachPackageListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get an app attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + getOperationSpec + ); + } + + /** + * Create or update an App Attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param appAttachPackage Object containing App Attach Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appAttachPackageName: string, + appAttachPackage: AppAttachPackage, + options?: AppAttachPackageCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, appAttachPackage, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove an App Attach Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + deleteOperationSpec + ); + } + + /** + * Update an App Attach Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + updateOperationSpec + ); + } + + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): 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?: AppAttachPackageListByResourceGroupNextOptionalParams + ): 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?: AppAttachPackageListBySubscriptionNextOptionalParams + ): 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/appAttachPackages/{appAttachPackageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + 201: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.appAttachPackage, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.appAttachPackagePatch, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + 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/appAttachPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + 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.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + 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.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + 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 index eac353c3b157..a34bae2d819a 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts @@ -21,4 +21,6 @@ export * from "./hostPools"; export * from "./userSessions"; export * from "./sessionHosts"; export * from "./msixPackages"; +export * from "./appAttachPackageInfo"; export * from "./msixImages"; +export * from "./appAttachPackageOperations"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts new file mode 100644 index 000000000000..c210f69e6760 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.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 { + AppAttachPackage, + ImportPackageInfoRequest, + AppAttachPackageInfoImportOptionalParams +} from "../models"; + +/// +/** Interface representing a AppAttachPackageInfo. */ +export interface AppAttachPackageInfo { + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + listImport( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts new file mode 100644 index 000000000000..83859ed92a93 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.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 { + AppAttachPackage, + AppAttachPackageListByResourceGroupOptionalParams, + AppAttachPackageListBySubscriptionOptionalParams, + AppAttachPackageGetOptionalParams, + AppAttachPackageGetResponse, + AppAttachPackageCreateOrUpdateOptionalParams, + AppAttachPackageCreateOrUpdateResponse, + AppAttachPackageDeleteOptionalParams, + AppAttachPackageUpdateOptionalParams, + AppAttachPackageUpdateResponse +} from "../models"; + +/// +/** Interface representing a AppAttachPackageOperations. */ +export interface AppAttachPackageOperations { + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get an app attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageGetOptionalParams + ): Promise; + /** + * Create or update an App Attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param appAttachPackage Object containing App Attach Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appAttachPackageName: string, + appAttachPackage: AppAttachPackage, + options?: AppAttachPackageCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove an App Attach Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageDeleteOptionalParams + ): Promise; + /** + * Update an App Attach Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts index eac353c3b157..a34bae2d819a 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts @@ -21,4 +21,6 @@ export * from "./hostPools"; export * from "./userSessions"; export * from "./sessionHosts"; export * from "./msixPackages"; +export * from "./appAttachPackageInfo"; export * from "./msixImages"; +export * from "./appAttachPackageOperations"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + 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" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + 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 index 02d427ad910e..3e6ae96443f3 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-desktopvirtualization": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"