From 9d55a7df57136534e0d6b2a3b047a3887f238ac9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 19 Apr 2022 09:42:51 +0000 Subject: [PATCH] CodeGen from PR 18730 in Azure/azure-rest-api-specs Update readme.python.md (#18730) --- common/config/rush/pnpm-lock.yaml | 38 ++++++--- sdk/network/arm-network/CHANGELOG.md | 30 ++++--- sdk/network/arm-network/LICENSE | 2 +- sdk/network/arm-network/_meta.json | 7 +- sdk/network/arm-network/api-extractor.json | 25 ++++-- sdk/network/arm-network/package.json | 8 +- .../arm-network/review/arm-network.api.md | 84 +++++++++---------- sdk/network/arm-network/src/models/index.ts | 36 ++++---- .../src/networkManagementClient.ts | 2 +- sdk/network/arm-network/test/sampleTest.ts | 48 +++++++++++ sdk/network/arm-network/tsconfig.json | 16 +++- sdk/network/ci.mgmt.yml | 2 + 12 files changed, 198 insertions(+), 100 deletions(-) create mode 100644 sdk/network/arm-network/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e60b03417579..08496ce18069 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -659,6 +659,21 @@ packages: - supports-color dev: false + /@azure/arm-network/26.0.0: + resolution: {integrity: sha512-Hp0Q4ZzChs8C0DUdGZOChWKMrhzZ53V0Q681puREZ9S1E6o2yWM0Vb+cYuWoyPOylwuzP2fjNjJZGtB7WuFd3w==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.0.4 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.5.0 + '@azure/core-lro': 2.2.4 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.8.0 + tslib: 2.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/communication-common/1.1.0: resolution: {integrity: sha512-vqTtzDtb4NG3LWoWoqlOOJApZRRIIImNUKlGyTa6c1YC+v5A7UEOL9TX8NRDxvFVUF2wDHsSnkhLBVBgkcAhIQ==} engines: {node: '>=12.0.0'} @@ -9967,11 +9982,12 @@ packages: dev: false file:projects/arm-compute.tgz: - resolution: {integrity: sha512-SXG1OOPxmuDjfmHhCOcG31GII1K7GgOEgaWBJ1ljPTcUIHkI9dVHelhX9hgUh5GOlGLpQlC6UYp6PKlJE4JVXA==, tarball: file:projects/arm-compute.tgz} + resolution: {integrity: sha512-4tNK7F3XRMMW1IFB4G4ZovbUugWnaK9e6sbTfB5xi7pVzbEr4kRgGpGYhbbCK10MENwLy7qLaleSmhqVZ75aOg==, tarball: file:projects/arm-compute.tgz} name: '@rush-temp/arm-compute' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.22.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 @@ -10804,11 +10820,12 @@ packages: dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-PSXQZCbu3khNcog69nSkJIkxY5B/rrJrDzexztWggP8zv739TwQNKg4UU8bQ4D/FguT6lMaqLk/umLu+cQ9/Pg==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-/HrcNdZaxor1MRNopoOldzgnfAlRPV57mX9lLLobHcy6gy8KO4OFzrtz36shocuVU5X5wnUDvktsp1/H65L8OA==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.22.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 @@ -12034,23 +12051,23 @@ packages: dev: false file:projects/arm-network.tgz: - resolution: {integrity: sha512-9eOon8zczpcvWKi+Glv2JRq0MSmiVFEuWZ2iPrLn2jjBzJ0VUuVvrUDlmQBh4J6uZQQToD/R2SoC23hxSxXJIQ==, tarball: file:projects/arm-network.tgz} + resolution: {integrity: sha512-dZ44ZqXB5L8o78ZG6w7mt+pbqPifYYBJar2ocQYcjKpPK/I/3lgvWdCpB41omEC2vHbPTQUjfCnAKB7KQfLb9A==, tarball: file:projects/arm-network.tgz} name: '@rush-temp/arm-network' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.22.1 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.1 + '@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 rimraf: 3.0.2 - rollup: 2.70.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.1 + 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.15.4 @@ -12603,11 +12620,12 @@ packages: dev: false file:projects/arm-rediscache.tgz: - resolution: {integrity: sha512-L96UyCle2mXUwU1QCXkofA0Yl4jBo8ElH3wdfGQBGHvDnDGkb1wNzcyuMsNncmPePr3fWsM50xCYuaMASfy0Ag==, tarball: file:projects/arm-rediscache.tgz} + resolution: {integrity: sha512-i4WuesoKvuqkZan0yd7hkUDXW79qopgT2uesZYyLv6nQzNAx8J2zC75YlTZYO3upcRP6N7oaLkEUnF3rdMtKug==, tarball: file:projects/arm-rediscache.tgz} name: '@rush-temp/arm-rediscache' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.22.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 2f51a4fc784e..9302149a8d28 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History - -## 26.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 27.0.0 (2022-04-19) + +**Features** + + - Added Type Alias SingleQueryResultDirection + - Added Type Alias SingleQueryResultMode + - Added Type Alias SingleQueryResultSeverity + - Added Enum KnownSingleQueryResultDirection + - Added Enum KnownSingleQueryResultMode + - Added Enum KnownSingleQueryResultSeverity + +**Breaking Changes** + + - Removed Enum KnownEnum69 + - Removed Enum KnownEnum70 + - Removed Enum KnownEnum71 + + ## 26.0.0 (2021-12-06) The package of @azure/arm-network is using our next generation design principles since version 26.0.0, which contains breaking changes. diff --git a/sdk/network/arm-network/LICENSE b/sdk/network/arm-network/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/network/arm-network/LICENSE +++ b/sdk/network/arm-network/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index ee7107f7c5e6..64b3a95d5dae 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,7 +1,8 @@ { - "commit": "3b2f85d320fac5b282bc80240f9e5c2c57753bad", + "commit": "d8700f40abc50e363891802af12261eae32b6abc", "readme": "specification/network/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/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "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/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/network/arm-network/api-extractor.json b/sdk/network/arm-network/api-extractor.json index fb18609746bc..f1d9c8954e48 100644 --- a/sdk/network/arm-network/api-extractor.json +++ b/sdk/network/arm-network/api-extractor.json @@ -1,18 +1,31 @@ { "$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" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-network.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 34d2a35cd669..814145146821 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "26.0.1", + "version": "27.0.0", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-network.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@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": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/network/arm-network/review/arm-network.api.md b/sdk/network/arm-network/review/arm-network.api.md index 41797866987d..71e06aa743b0 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -2737,15 +2737,6 @@ export interface EndpointServicesListResult { // @public export type EndpointType = string; -// @public -export type Enum69 = number; - -// @public -export type Enum70 = number; - -// @public -export type Enum71 = number; - // @public export interface ErrorDetails { code?: string; @@ -5597,36 +5588,6 @@ export enum KnownEndpointType { MMAWorkspaceNetwork = "MMAWorkspaceNetwork" } -// @public -export enum KnownEnum69 { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - -// @public -export enum KnownEnum70 { - // (undocumented) - One = 1, - // (undocumented) - Three = 3, - // (undocumented) - Two = 2 -} - -// @public -export enum KnownEnum71 { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - // @public export enum KnownEvaluationState { // (undocumented) @@ -6489,6 +6450,36 @@ export enum KnownSeverity { Warning = "Warning" } +// @public +export enum KnownSingleQueryResultDirection { + // (undocumented) + One = 1, + // (undocumented) + Two = 2, + // (undocumented) + Zero = 0 +} + +// @public +export enum KnownSingleQueryResultMode { + // (undocumented) + One = 1, + // (undocumented) + Two = 2, + // (undocumented) + Zero = 0 +} + +// @public +export enum KnownSingleQueryResultSeverity { + // (undocumented) + One = 1, + // (undocumented) + Three = 3, + // (undocumented) + Two = 2 +} + // @public export enum KnownSyncRemoteAddressSpace { // (undocumented) @@ -11200,17 +11191,26 @@ export interface SignaturesOverridesProperties { export interface SingleQueryResult { description?: string; destinationPorts?: string[]; - direction?: Enum71; + direction?: SingleQueryResultDirection; group?: string; inheritedFromParentPolicy?: boolean; lastUpdated?: string; - mode?: Enum69; + mode?: SingleQueryResultMode; protocol?: string; - severity?: Enum70; + severity?: SingleQueryResultSeverity; signatureId?: number; sourcePorts?: string[]; } +// @public +export type SingleQueryResultDirection = number; + +// @public +export type SingleQueryResultMode = number; + +// @public +export type SingleQueryResultSeverity = number; + // @public export interface Sku { name?: BastionHostSkuName; diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index 597c7c32cc82..2ae14bfa640b 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -1706,11 +1706,11 @@ export interface SingleQueryResult { /** The ID of the signature */ signatureId?: number; /** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ - mode?: Enum69; + mode?: SingleQueryResultMode; /** Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High */ - severity?: Enum70; + severity?: SingleQueryResultSeverity; /** Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional */ - direction?: Enum71; + direction?: SingleQueryResultDirection; /** Describes the groups the signature belongs to */ group?: string; /** Describes what is the signature enforces */ @@ -11105,59 +11105,59 @@ export enum KnownOrderByOrder { */ export type OrderByOrder = string; -/** Known values of {@link Enum69} that the service accepts. */ -export enum KnownEnum69 { +/** Known values of {@link SingleQueryResultMode} that the service accepts. */ +export enum KnownSingleQueryResultMode { Zero = 0, One = 1, Two = 2 } /** - * Defines values for Enum69. \ - * {@link KnownEnum69} can be used interchangeably with Enum69, + * Defines values for SingleQueryResultMode. \ + * {@link KnownSingleQueryResultMode} can be used interchangeably with SingleQueryResultMode, * this enum contains the known values that the service supports. * ### Known values supported by the service * **0** \ * **1** \ * **2** */ -export type Enum69 = number; +export type SingleQueryResultMode = number; -/** Known values of {@link Enum70} that the service accepts. */ -export enum KnownEnum70 { +/** Known values of {@link SingleQueryResultSeverity} that the service accepts. */ +export enum KnownSingleQueryResultSeverity { One = 1, Two = 2, Three = 3 } /** - * Defines values for Enum70. \ - * {@link KnownEnum70} can be used interchangeably with Enum70, + * Defines values for SingleQueryResultSeverity. \ + * {@link KnownSingleQueryResultSeverity} can be used interchangeably with SingleQueryResultSeverity, * this enum contains the known values that the service supports. * ### Known values supported by the service * **1** \ * **2** \ * **3** */ -export type Enum70 = number; +export type SingleQueryResultSeverity = number; -/** Known values of {@link Enum71} that the service accepts. */ -export enum KnownEnum71 { +/** Known values of {@link SingleQueryResultDirection} that the service accepts. */ +export enum KnownSingleQueryResultDirection { Zero = 0, One = 1, Two = 2 } /** - * Defines values for Enum71. \ - * {@link KnownEnum71} can be used interchangeably with Enum71, + * Defines values for SingleQueryResultDirection. \ + * {@link KnownSingleQueryResultDirection} can be used interchangeably with SingleQueryResultDirection, * this enum contains the known values that the service supports. * ### Known values supported by the service * **0** \ * **1** \ * **2** */ -export type Enum71 = number; +export type SingleQueryResultDirection = number; /** Known values of {@link IpAllocationType} that the service accepts. */ export enum KnownIpAllocationType { diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 86d87cc2dbfe..b5ea99b79376 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -307,7 +307,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/26.0.0`; + const packageDetails = `azsdk-js-arm-network/27.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/network/arm-network/test/sampleTest.ts b/sdk/network/arm-network/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/network/arm-network/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/network/arm-network/tsconfig.json b/sdk/network/arm-network/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/network/arm-network/tsconfig.json +++ b/sdk/network/arm-network/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/network/ci.mgmt.yml b/sdk/network/ci.mgmt.yml index 633178f302b6..da282007355b 100644 --- a/sdk/network/ci.mgmt.yml +++ b/sdk/network/ci.mgmt.yml @@ -11,6 +11,7 @@ trigger: - sdk/network/ci.mgmt.yml - sdk/network/arm-network/ - sdk/network/arm-network-profile-2020-09-01-hybrid + - sdk/network/arm-network pr: branches: include: @@ -25,6 +26,7 @@ pr: - sdk/network/ci.mgmt.yml - sdk/network/arm-network/ - sdk/network/arm-network-profile-2020-09-01-hybrid + - sdk/network/arm-network extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: