From 2ffc5a3a31eef07a5c0a6c441f1f384417da6f70 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Aug 2023 07:40:13 +0000 Subject: [PATCH] CodeGen from PR 25135 in Azure/azure-rest-api-specs Merge b36f75338bb933cbf23cc1daedc222f0d50855ca into 7f70e351393addbc31d790a908c994c7c8644d9c --- common/config/rush/pnpm-lock.yaml | 25 ++++++----- sdk/hdinsight/arm-hdinsight/CHANGELOG.md | 5 ++- sdk/hdinsight/arm-hdinsight/_meta.json | 8 ++-- sdk/hdinsight/arm-hdinsight/package.json | 17 +++----- .../arm-hdinsight/review/arm-hdinsight.api.md | 10 +++++ .../src/hDInsightManagementClient.ts | 4 +- .../arm-hdinsight/src/models/index.ts | 20 +++++++++ .../arm-hdinsight/src/models/mappers.ts | 6 +++ .../arm-hdinsight/src/models/parameters.ts | 2 +- .../arm-hdinsight/test/sampleTest.ts | 43 +++++++++++++++++++ sdk/hdinsight/arm-hdinsight/tsconfig.json | 10 +---- 11 files changed, 111 insertions(+), 39 deletions(-) create mode 100644 sdk/hdinsight/arm-hdinsight/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 738fed458ab5..3f1d274316d6 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4136,7 +4136,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230811 + typescript: 5.3.0-dev.20230821 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8721,8 +8721,8 @@ packages: hasBin: true dev: false - /typescript/5.3.0-dev.20230811: - resolution: {integrity: sha512-C4bwx7ZpBwX7bKxrrNl+M1j8yNGmwQ5M58X0mT4VYI1+FHqRvb/uJ4F1uJsVJ+X7iy22iXSICR/Vxnpc1gNk7w==} + /typescript/5.3.0-dev.20230821: + resolution: {integrity: sha512-YkxBZgI3iA0uJR9pJLDXQPZ6xdzGUnDyJTtNlJzh00tGFbDh93aI13DioYrZANNCZeWn7Pr3FUT7tRCq3500wA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -12387,7 +12387,7 @@ packages: dev: false file:projects/arm-hdinsight.tgz: - resolution: {integrity: sha512-Jv8FIekfHl3zs6alhb+YASFgmSPAY4dG9JqMCOM8QFD5bdsZOL+CxbPE46JXZlzldnSPgsxFKZoIMlDqA+j+tA==, tarball: file:projects/arm-hdinsight.tgz} + resolution: {integrity: sha512-B2F+ooAe4AGt59M33XxmEPbjv/tk5jjzuob5Iu8dMoyJodZGkTxkwNM84H+kDGjA/L8n3P4/Ujn+LxPzdFgVUg==, tarball: file:projects/arm-hdinsight.tgz} name: '@rush-temp/arm-hdinsight' version: 0.0.0 dependencies: @@ -12407,10 +12407,13 @@ packages: rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_dmbj5memikchm63lpeyt6ukdau + ts-node: 10.9.1_n7tz6hmpirns3flqdptizaxofa tslib: 2.6.1 typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' - supports-color dev: false @@ -17642,7 +17645,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.36.3_@types+node@14.18.54 + '@microsoft/api-extractor': 7.36.4_@types+node@14.18.54 '@types/chai': 4.3.5 '@types/mocha': 7.0.2 '@types/node': 14.18.54 @@ -17650,7 +17653,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.3.1 - eslint: 8.45.0 + eslint: 8.46.0 karma: 6.4.2 karma-chrome-launcher: 3.2.0 karma-coverage: 2.2.1 @@ -17668,7 +17671,7 @@ packages: prettier: 2.8.8 rimraf: 3.0.2 source-map-support: 0.5.21 - tslib: 2.6.0 + tslib: 2.6.1 typescript: 5.0.4 transitivePeerDependencies: - bufferutil @@ -17683,7 +17686,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.36.3_@types+node@14.18.54 + '@microsoft/api-extractor': 7.36.4_@types+node@14.18.54 '@types/chai': 4.3.5 '@types/mocha': 7.0.2 '@types/node': 14.18.54 @@ -17691,7 +17694,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.3.1 - eslint: 8.45.0 + eslint: 8.46.0 karma: 6.4.2 karma-chrome-launcher: 3.2.0 karma-coverage: 2.2.1 @@ -17709,7 +17712,7 @@ packages: prettier: 2.8.8 rimraf: 3.0.2 source-map-support: 0.5.21 - tslib: 2.6.0 + tslib: 2.6.1 typescript: 5.0.4 transitivePeerDependencies: - bufferutil @@ -18727,7 +18730,7 @@ packages: dev: false file:projects/openai.tgz: - resolution: {integrity: sha512-N8E0x1oZNJ/0S88emgJ97tMxe0iZmc59ZDKR/eNoY5XEqZumAlO1u4R5KLKOHphDdDt30md1DVa/VY68Ql8x2A==, tarball: file:projects/openai.tgz} + resolution: {integrity: sha512-tNYiwuPfWJi5PgGlvJHvqixibWsjTsaFdN2DtuSybs69jV/Ov24tdnaCjtwjcSWOWOoBGfGKY1pVCPRr1vK9Qw==, tarball: file:projects/openai.tgz} name: '@rush-temp/openai' version: 0.0.0 dependencies: diff --git a/sdk/hdinsight/arm-hdinsight/CHANGELOG.md b/sdk/hdinsight/arm-hdinsight/CHANGELOG.md index 03feadf5f97b..6fd9bd8dab09 100644 --- a/sdk/hdinsight/arm-hdinsight/CHANGELOG.md +++ b/sdk/hdinsight/arm-hdinsight/CHANGELOG.md @@ -1,10 +1,13 @@ # Release History -## 1.3.0-beta.1 (2023-07-06) +## 1.3.0-beta.2 (2023-08-21) **Features** + - Added Type Alias OutboundDependenciesManagedType + - Interface NetworkProperties has a new optional parameter outboundDependenciesManagedType - Interface StorageAccount has a new optional parameter enableSecureChannel + - Added Enum KnownOutboundDependenciesManagedType ## 1.2.1 (2023-01-10) diff --git a/sdk/hdinsight/arm-hdinsight/_meta.json b/sdk/hdinsight/arm-hdinsight/_meta.json index 23b8ecb31044..6df76b7f6c6a 100644 --- a/sdk/hdinsight/arm-hdinsight/_meta.json +++ b/sdk/hdinsight/arm-hdinsight/_meta.json @@ -1,8 +1,8 @@ { - "commit": "26cac4f70e9ce0e1c2f77de8303b47d1faa9ad33", + "commit": "5a8691151d01e935ec6595bfbe69fd777886b67f", "readme": "specification/hdinsight/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --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\\specification\\hdinsight\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --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/hdinsight/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.5" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsight/package.json b/sdk/hdinsight/arm-hdinsight/package.json index 1147aacd0f89..162738d9fa90 100644 --- a/sdk/hdinsight/arm-hdinsight/package.json +++ b/sdk/hdinsight/arm-hdinsight/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HDInsightManagementClient.", - "version": "1.3.0-beta.1", + "version": "1.3.0-beta.2", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -48,6 +48,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", + "ts-node": "^10.0.0", "@azure/dev-tool": "^1.0.0" }, "repository": { @@ -111,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsight", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hdinsight?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsight" } \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsight/review/arm-hdinsight.api.md b/sdk/hdinsight/arm-hdinsight/review/arm-hdinsight.api.md index ff76073f22f8..35c045df9616 100644 --- a/sdk/hdinsight/arm-hdinsight/review/arm-hdinsight.api.md +++ b/sdk/hdinsight/arm-hdinsight/review/arm-hdinsight.api.md @@ -893,6 +893,12 @@ export enum KnownOSType { Windows = "Windows" } +// @public +export enum KnownOutboundDependenciesManagedType { + External = "External", + Managed = "Managed" +} + // @public export enum KnownPrivateEndpointConnectionProvisioningState { Canceled = "Canceled", @@ -1058,6 +1064,7 @@ export interface NameAvailabilityCheckResult { // @public export interface NetworkProperties { + outboundDependenciesManagedType?: OutboundDependenciesManagedType; privateLink?: PrivateLink; resourceProviderConnection?: ResourceProviderConnection; } @@ -1115,6 +1122,9 @@ export interface OsProfile { // @public export type OSType = string; +// @public +export type OutboundDependenciesManagedType = string; + // @public export interface PrivateEndpoint { id?: string; diff --git a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts index 5624dd20f995..9c47b8e70827 100644 --- a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts +++ b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts @@ -75,7 +75,7 @@ export class HDInsightManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-hdinsight/1.3.0-beta.1`; + const packageDetails = `azsdk-js-arm-hdinsight/1.3.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -128,7 +128,7 @@ export class HDInsightManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-04-15-preview"; + this.apiVersion = options.apiVersion || "2023-08-15-preview"; this.applications = new ApplicationsImpl(this); this.clusters = new ClustersImpl(this); this.configurations = new ConfigurationsImpl(this); diff --git a/sdk/hdinsight/arm-hdinsight/src/models/index.ts b/sdk/hdinsight/arm-hdinsight/src/models/index.ts index 9c6674cdc2d4..bc3387945b5e 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/index.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/index.ts @@ -526,6 +526,8 @@ export interface EncryptionInTransitProperties { /** The network properties. */ export interface NetworkProperties { + /** A value to describe how the outbound dependencies of a HDInsight cluster are managed. 'Managed' means that the outbound dependencies are managed by the HDInsight service. 'External' means that the outbound dependencies are managed by a customer specific solution. */ + outboundDependenciesManagedType?: OutboundDependenciesManagedType; /** The direction for the resource provider connection. */ resourceProviderConnection?: ResourceProviderConnection; /** Indicates whether or not private link is enabled. */ @@ -1613,6 +1615,24 @@ export enum KnownJsonWebKeyEncryptionAlgorithm { */ export type JsonWebKeyEncryptionAlgorithm = string; +/** Known values of {@link OutboundDependenciesManagedType} that the service accepts. */ +export enum KnownOutboundDependenciesManagedType { + /** Managed */ + Managed = "Managed", + /** External */ + External = "External" +} + +/** + * Defines values for OutboundDependenciesManagedType. \ + * {@link KnownOutboundDependenciesManagedType} can be used interchangeably with OutboundDependenciesManagedType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Managed** \ + * **External** + */ +export type OutboundDependenciesManagedType = string; + /** Known values of {@link ResourceProviderConnection} that the service accepts. */ export enum KnownResourceProviderConnection { /** Inbound */ diff --git a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts index 29255b600511..3dff84e23016 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts @@ -1447,6 +1447,12 @@ export const NetworkProperties: coreClient.CompositeMapper = { name: "Composite", className: "NetworkProperties", modelProperties: { + outboundDependenciesManagedType: { + serializedName: "outboundDependenciesManagedType", + type: { + name: "String" + } + }, resourceProviderConnection: { serializedName: "resourceProviderConnection", type: { diff --git a/sdk/hdinsight/arm-hdinsight/src/models/parameters.ts b/sdk/hdinsight/arm-hdinsight/src/models/parameters.ts index 22c759f50cd7..22e288d60a52 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/parameters.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/parameters.ts @@ -89,7 +89,7 @@ export const clusterName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-04-15-preview", + defaultValue: "2023-08-15-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/hdinsight/arm-hdinsight/test/sampleTest.ts b/sdk/hdinsight/arm-hdinsight/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsight/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/hdinsight/arm-hdinsight/tsconfig.json b/sdk/hdinsight/arm-hdinsight/tsconfig.json index 9cea1f23eb3e..3e6ae96443f3 100644 --- a/sdk/hdinsight/arm-hdinsight/tsconfig.json +++ b/sdk/hdinsight/arm-hdinsight/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hdinsight": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"