Skip to content

Commit

Permalink
CodeGen from PR 18996 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 2a781ad77e4b5072d3c6a1f5ba5462f9539fb989 into ac286e05bedd69d301e1dc94ec70f66e8536686b
  • Loading branch information
SDKAuto committed May 11, 2022
1 parent 427f8e6 commit cad24be
Show file tree
Hide file tree
Showing 10 changed files with 1,343 additions and 960 deletions.
32 changes: 21 additions & 11 deletions sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# Release History

## 1.0.0-beta.4 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes


## 1.0.0-beta.4 (2022-05-11)

**Features**

- Added Interface AgentUpdatePatchProperties
- Added Interface AgentUpdateProperties
- Added Interface MaintenanceWindowPatchProperties
- Added Interface MaintenanceWindowProperties
- Added Type Alias DayOfWeek
- Added Type Alias HostpoolPublicNetworkAccess
- Added Type Alias SessionHostComponentUpdateType
- Type Alias HostPool has a new parameter agentUpdate
- Type Alias HostPool has a new parameter privateEndpointConnections
- Type Alias HostPoolPatch has a new parameter agentUpdate
- Type Alias SessionHost has a new parameter friendlyName
- Type Alias SessionHostPatch has a new parameter friendlyName
- Type Alias Workspace has a new parameter privateEndpointConnections
- Added Enum KnownHostpoolPublicNetworkAccess
- Added Enum KnownSessionHostComponentUpdateType

## 1.0.0-beta.3 (2022-04-18)

**features**
Expand Down
10 changes: 5 additions & 5 deletions sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "c77c6c634dc3644d65d3e35df5d73a9c34d3c956",
"readme": "specification\\desktopvirtualization\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\desktopvirtualization\\resource-manager\\readme.md --use=@autorest/[email protected].20220408.1 --generate-sample=true",
"commit": "e1f482ee1873ca7c545c7ddf0fd7a7beeb4a597c",
"readme": "specification/desktopvirtualization/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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/[email protected].20220425.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
"use": "@autorest/[email protected].20220408.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
"use": "@autorest/[email protected].20220425.1"
}
20 changes: 7 additions & 13 deletions sdk/desktopvirtualization/arm-desktopvirtualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization",
"repository": {
Expand Down Expand Up @@ -91,7 +93,7 @@
"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 --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
},
Expand All @@ -104,13 +106,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { PagedAsyncIterableIterator } from '@azure/core-paging';

// @public
export interface AgentUpdatePatchProperties {
maintenanceWindows?: MaintenanceWindowPatchProperties[];
maintenanceWindowTimeZone?: string;
type?: SessionHostComponentUpdateType;
useSessionHostLocalTime?: boolean;
}

// @public
export interface AgentUpdateProperties {
maintenanceWindows?: MaintenanceWindowProperties[];
maintenanceWindowTimeZone?: string;
type?: SessionHostComponentUpdateType;
useSessionHostLocalTime?: boolean;
}

// @public
export type Application = Resource & {
readonly systemData?: SystemData;
Expand Down Expand Up @@ -219,6 +235,9 @@ export type CommandLineSetting = string;
// @public
export type CreatedByType = string;

// @public
export type DayOfWeek = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday";

// @public
export type Desktop = Resource & {
readonly systemData?: SystemData;
Expand Down Expand Up @@ -379,7 +398,9 @@ export type HostPool = ResourceModelWithAllowedPropertySet & {
startVMOnConnect?: boolean;
migrationRequest?: MigrationRequestProperties;
readonly cloudPcResource?: boolean;
publicNetworkAccess?: PublicNetworkAccess;
publicNetworkAccess?: HostpoolPublicNetworkAccess;
agentUpdate?: AgentUpdateProperties;
readonly privateEndpointConnections?: PrivateEndpointConnection[];
};

// @public
Expand Down Expand Up @@ -409,9 +430,13 @@ export type HostPoolPatch = Resource & {
ssoSecretType?: SSOSecretType;
preferredAppGroupType?: PreferredAppGroupType;
startVMOnConnect?: boolean;
publicNetworkAccess?: PublicNetworkAccess;
publicNetworkAccess?: HostpoolPublicNetworkAccess;
agentUpdate?: AgentUpdatePatchProperties;
};

// @public
export type HostpoolPublicNetworkAccess = string;

// @public
export interface HostPools {
createOrUpdate(resourceGroupName: string, hostPoolName: string, hostPool: HostPool, options?: HostPoolsCreateOrUpdateOptionalParams): Promise<HostPoolsCreateOrUpdateResponse>;
Expand Down Expand Up @@ -556,6 +581,18 @@ export enum KnownHealthCheckResult {
Unknown = "Unknown"
}

// @public
export enum KnownHostpoolPublicNetworkAccess {
// (undocumented)
Disabled = "Disabled",
// (undocumented)
Enabled = "Enabled",
// (undocumented)
EnabledForClientsOnly = "EnabledForClientsOnly",
// (undocumented)
EnabledForSessionHostsOnly = "EnabledForSessionHostsOnly"
}

// @public
export enum KnownHostPoolType {
BYODesktop = "BYODesktop",
Expand Down Expand Up @@ -671,6 +708,12 @@ export enum KnownScalingScheduleDaysOfWeekItem {
Wednesday = "Wednesday"
}

// @public
export enum KnownSessionHostComponentUpdateType {
Default = "Default",
Scheduled = "Scheduled"
}

// @public
export enum KnownSessionHostLoadBalancingAlgorithm {
// (undocumented)
Expand Down Expand Up @@ -755,6 +798,18 @@ export interface LogSpecification {
name?: string;
}

// @public
export interface MaintenanceWindowPatchProperties {
dayOfWeek?: DayOfWeek;
hour?: number;
}

// @public
export interface MaintenanceWindowProperties {
dayOfWeek?: DayOfWeek;
hour?: number;
}

// @public
export interface MigrationRequestProperties {
migrationPath?: string;
Expand Down Expand Up @@ -1329,6 +1384,7 @@ export type SessionHost = Resource & {
readonly virtualMachineId?: string;
readonly resourceId?: string;
assignedUser?: string;
friendlyName?: string;
status?: Status;
readonly statusTimestamp?: Date;
osVersion?: string;
Expand All @@ -1339,6 +1395,9 @@ export type SessionHost = Resource & {
readonly sessionHostHealthCheckResults?: SessionHostHealthCheckReport[];
};

// @public
export type SessionHostComponentUpdateType = string;

// @public
export interface SessionHostHealthCheckFailureDetails {
readonly errorCode?: number;
Expand Down Expand Up @@ -1366,6 +1425,7 @@ export type SessionHostLoadBalancingAlgorithm = string;
export type SessionHostPatch = Resource & {
allowNewSession?: boolean;
assignedUser?: string;
friendlyName?: string;
};

// @public
Expand Down Expand Up @@ -1575,6 +1635,7 @@ export type Workspace = ResourceModelWithAllowedPropertySet & {
applicationGroupReferences?: string[];
readonly cloudPcResource?: boolean;
publicNetworkAccess?: PublicNetworkAccess;
readonly privateEndpointConnections?: PrivateEndpointConnection[];
};

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import {
PipelineRequest,
PipelineResponse,
SendRequest
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import {
OperationsImpl,
Expand Down Expand Up @@ -122,7 +127,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-09-03-preview";
this.apiVersion = options.apiVersion || "2022-02-10-preview";
this.operations = new OperationsImpl(this);
this.workspaces = new WorkspacesImpl(this);
this.scalingPlans = new ScalingPlansImpl(this);
Expand All @@ -137,6 +142,35 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {
this.msixImages = new MsixImagesImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
}

/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
private addCustomApiVersionPolicy(apiVersion?: string) {
if (!apiVersion) {
return;
}
const apiVersionPolicy = {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
const newParams = param[1].split("&").map((item) => {
if (item.indexOf("api-version") > -1) {
return item.replace(/(?<==).*$/, apiVersion);
} else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}

operations: Operations;
Expand Down
Loading

0 comments on commit cad24be

Please sign in to comment.