From 4dd3b7f7781fa97c58f5f5d433728229258d3156 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 23 Feb 2022 20:12:43 +0000 Subject: [PATCH] CodeGen from PR 17853 in Azure/azure-rest-api-specs Merge dc9d0d02990df77737335ecf44862ade6645229c into 9f48feaf684784644513d11ddb7bd0ac2e32f48e --- common/config/rush/pnpm-lock.yaml | 27 ++++++++--- sdk/compute/arm-compute/CHANGELOG.md | 13 +++++ sdk/compute/arm-compute/_meta.json | 6 +-- sdk/compute/arm-compute/package.json | 23 ++------- .../arm-compute/review/arm-compute.api.md | 25 ++++++++++ .../src/computeManagementClient.ts | 2 +- sdk/compute/arm-compute/src/models/index.ts | 38 +++++++++++++++ sdk/compute/arm-compute/src/models/mappers.ts | 18 +++++++ sdk/compute/arm-compute/test/sampleTest.ts | 48 +++++++++++++++++++ sdk/compute/arm-compute/tsconfig.json | 7 +-- 10 files changed, 171 insertions(+), 36 deletions(-) create mode 100644 sdk/compute/arm-compute/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index abd8293e9514..b0cf06a583f9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -611,6 +611,21 @@ packages: - supports-color dev: false + /@azure/arm-compute/17.2.0: + resolution: {integrity: sha512-tcKF04SeLcQyzFxzTlZN8dpyEU3GvRUYmhw3MYdsV7P3e6BJHibhJCL0pWLpB2Wa8GwVTv2ZLQ0UAzfKCtYerw==} + 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.3 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.5.0 + tslib: 2.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/arm-storage/17.0.0: resolution: {integrity: sha512-WS9eT3/vDQ7a1z/8K5BkPhoAi0ilo94yCSws4KyWq6UIA3RaXBDpYYAlN0TOxad9rPeOnWXWcB9gLw3DmjZ4wg==} engines: {node: '>=12.0.0'} @@ -8887,7 +8902,7 @@ packages: dev: false file:projects/ai-text-analytics.tgz: - resolution: {integrity: sha512-o7nTFUp/He8mxChlJgVsEQGvMSgBwZ3Q0cA3IwYAEgFxksGNGDqirKVX14ixCFXZ4WccvZ7N4k7cRVsDsLJO4g==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-negpkvINfMedZMo/5L1bUc1Jurs3pGS6PuodsviCc+XynPV3SHz+/TtOJD49pu7VzkDnSKEU7Yz1DpaV083KQQ==, tarball: file:projects/ai-text-analytics.tgz} name: '@rush-temp/ai-text-analytics' version: 0.0.0 dependencies: @@ -8933,7 +8948,6 @@ packages: - '@swc/wasm' - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -9518,7 +9532,7 @@ packages: dev: false file:projects/arm-compute.tgz: - resolution: {integrity: sha512-gN6VdLPNFLxYG9Q/S//Ru95Im4dd2dhhBU9HrtSa3nLDVk0UPJKzE81RmUaTXyj2O5oZh524mAlC+lJWR2boTg==, tarball: file:projects/arm-compute.tgz} + resolution: {integrity: sha512-mblVe8cn6tBhnRxgFfkaueG3l8Ir9YhqNJC3pDAzvGELAtb9Awcnqta2Iu9nBtTln2oGqqlV1rWPhYnvkR0zww==, tarball: file:projects/arm-compute.tgz} name: '@rush-temp/arm-compute' version: 0.0.0 dependencies: @@ -10393,11 +10407,12 @@ packages: dev: false file:projects/arm-imagebuilder.tgz: - resolution: {integrity: sha512-/aJpNGWOV825XGXVuaOPrTSIOCo5u/7rL9DHpikVBKl1ELqMbqOmdTbF7hAwVc2IIIwv1/XUHYkXsohPu9I/dQ==, tarball: file:projects/arm-imagebuilder.tgz} + resolution: {integrity: sha512-WQtkHWHZBlaxdgMhISbg8GroEYhf0Ul/uWayUMjkBLYBtMcIEUkJwj76ZbdZ/0U58z5Lsx5gr93VXXQcmLhqyA==, tarball: file:projects/arm-imagebuilder.tgz} name: '@rush-temp/arm-imagebuilder' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-compute': 17.2.0 '@microsoft/api-extractor': 7.19.4 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -13740,7 +13755,7 @@ packages: dev: false file:projects/digital-twins-core.tgz: - resolution: {integrity: sha512-HHJexN/cUky99Na2FGl/mUweka1rPkQFFVUaBWqP6yHLcZIikBhJ9rsxOS7TGOSM7wCsEGrlRolOh+5jiHMxzw==, tarball: file:projects/digital-twins-core.tgz} + resolution: {integrity: sha512-O94bnJUDhIxxX2FnhYTmpFtSLvpe2XaNNwI3e6a7JvEuIkcHKMiN8Sh5WvA8BAhkEV+KsKKKNS8v0erLyit6TA==, tarball: file:projects/digital-twins-core.tgz} name: '@rush-temp/digital-twins-core' version: 0.0.0 dependencies: @@ -13789,7 +13804,7 @@ packages: dev: false file:projects/dtdl-parser.tgz: - resolution: {integrity: sha512-HkF/GM4awodeF184YdeRQvLU+4ZEtC14BZNKwc+K3Z08l9qb+MyNS5/M6OogfKRwL0V6T+bgYGNRciYVn4JO3Q==, tarball: file:projects/dtdl-parser.tgz} + resolution: {integrity: sha512-/Dpf2haY7btQZGQuvHBOvp+FV73jJdRtvEb9Iq2FlChhxnlxi3rnU+c5d3RiTER/V7CN2eTqZTmGqU81I5hofA==, tarball: file:projects/dtdl-parser.tgz} name: '@rush-temp/dtdl-parser' version: 0.0.0 dependencies: diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index 6a4c34193718..47236e2760f3 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 17.3.0 (2022-02-23) + +**Features** + + - Added Type Alias Architecture + - Added Type Alias ArchitectureTypes + - Type Alias GalleryImage has a new parameter architecture + - Type Alias GalleryImageUpdate has a new parameter architecture + - Type Alias VirtualMachineImage has a new parameter architecture + - Added Enum KnownArchitecture + - Added Enum KnownArchitectureTypes + + ## 17.2.0 (2022-02-14) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index ed991dab39f9..f8031ac48ff7 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,7 +1,7 @@ { - "commit": "7c98de7664d4565c088350015ccd0cfc102eab49", + "commit": "fb11185b2c1f5e32d6863a9de06f22e5aea35bd5", "readme": "specification/compute/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:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/compute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220128.1 --generate-sample=true", + "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=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/compute/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.20220128.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index 4b1454af02c2..7d31e38f9026 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ComputeManagementClient.", - "version": "17.2.0", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -42,8 +42,7 @@ "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2", - "@azure/arm-network": "^26.0.0" + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute", "repository": { @@ -99,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/computeManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md index 77deb0d2719e..28d03ff7141d 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -64,6 +64,12 @@ export interface ApplicationProfile { galleryApplications?: VMGalleryApplication[]; } +// @public +export type Architecture = string; + +// @public +export type ArchitectureTypes = string; + // @public export interface AutomaticOSUpgradePolicy { disableAutomaticRollback?: boolean; @@ -2345,6 +2351,7 @@ export type GalleryImage = Resource & { purchasePlan?: ImagePurchasePlan; readonly provisioningState?: GalleryImagePropertiesProvisioningState; features?: GalleryImageFeature[]; + architecture?: Architecture; }; // @public @@ -2442,6 +2449,7 @@ export type GalleryImageUpdate = UpdateResourceDefinition & { purchasePlan?: ImagePurchasePlan; readonly provisioningState?: GalleryImagePropertiesProvisioningState; features?: GalleryImageFeature[]; + architecture?: Architecture; }; // @public @@ -2852,6 +2860,22 @@ export enum KnownAggregatedReplicationState { Unknown = "Unknown" } +// @public +export enum KnownArchitecture { + // (undocumented) + Arm64 = "Arm64", + // (undocumented) + X64 = "x64" +} + +// @public +export enum KnownArchitectureTypes { + // (undocumented) + Arm64 = "Arm64", + // (undocumented) + X64 = "x64" +} + // @public export enum KnownAvailabilitySetSkuTypes { // (undocumented) @@ -5961,6 +5985,7 @@ export type VirtualMachineImage = VirtualMachineImageResource & { hyperVGeneration?: HyperVGenerationTypes; disallowed?: DisallowedConfiguration; features?: VirtualMachineImageFeature[]; + architecture?: ArchitectureTypes; }; // @public diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index ce49bdd68231..869e344e577b 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -144,7 +144,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-compute/17.2.0`; + const packageDetails = `azsdk-js-arm-compute/17.3.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index 78c946b28dfb..de464c85325f 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -5090,6 +5090,8 @@ export type GalleryImage = Resource & { readonly provisioningState?: GalleryImagePropertiesProvisioningState; /** A list of gallery image features. */ features?: GalleryImageFeature[]; + /** The architecture of the image. Applicable to OS disks only. */ + architecture?: Architecture; }; /** Specifies information about the gallery image version that you want to create or update. */ @@ -5830,6 +5832,8 @@ export type GalleryImageUpdate = UpdateResourceDefinition & { readonly provisioningState?: GalleryImagePropertiesProvisioningState; /** A list of gallery image features. */ features?: GalleryImageFeature[]; + /** The architecture of the image. Applicable to OS disks only. */ + architecture?: Architecture; }; /** Specifies information about the gallery image version that you want to update. */ @@ -5968,6 +5972,8 @@ export type VirtualMachineImage = VirtualMachineImageResource & { /** Specifies disallowed configuration for the VirtualMachine created from the image */ disallowed?: DisallowedConfiguration; features?: VirtualMachineImageFeature[]; + /** Specifies the Architecture Type */ + architecture?: ArchitectureTypes; }; /** Describes a Virtual Machine Scale Set VM Reimage Parameters. */ @@ -6057,6 +6063,22 @@ export enum KnownVmDiskTypes { */ export type VmDiskTypes = string; +/** Known values of {@link ArchitectureTypes} that the service accepts. */ +export enum KnownArchitectureTypes { + X64 = "x64", + Arm64 = "Arm64" +} + +/** + * Defines values for ArchitectureTypes. \ + * {@link KnownArchitectureTypes} can be used interchangeably with ArchitectureTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **x64** \ + * **Arm64** + */ +export type ArchitectureTypes = string; + /** Known values of {@link ExtendedLocationTypes} that the service accepts. */ export enum KnownExtendedLocationTypes { EdgeZone = "EdgeZone" @@ -7659,6 +7681,22 @@ export enum KnownGalleryImagePropertiesProvisioningState { */ export type GalleryImagePropertiesProvisioningState = string; +/** Known values of {@link Architecture} that the service accepts. */ +export enum KnownArchitecture { + X64 = "x64", + Arm64 = "Arm64" +} + +/** + * Defines values for Architecture. \ + * {@link KnownArchitecture} can be used interchangeably with Architecture, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **x64** \ + * **Arm64** + */ +export type Architecture = string; + /** Known values of {@link StorageAccountType} that the service accepts. */ export enum KnownStorageAccountType { StandardLRS = "Standard_LRS", diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index 387dfffc0b7b..6853d10736ac 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -13147,6 +13147,12 @@ export const GalleryImage: coreClient.CompositeMapper = { } } } + }, + architecture: { + serializedName: "properties.architecture", + type: { + name: "String" + } } } } @@ -15030,6 +15036,12 @@ export const GalleryImageUpdate: coreClient.CompositeMapper = { } } } + }, + architecture: { + serializedName: "properties.architecture", + type: { + name: "String" + } } } } @@ -15439,6 +15451,12 @@ export const VirtualMachineImage: coreClient.CompositeMapper = { } } } + }, + architecture: { + serializedName: "properties.architecture", + type: { + name: "String" + } } } } diff --git a/sdk/compute/arm-compute/test/sampleTest.ts b/sdk/compute/arm-compute/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/compute/arm-compute/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/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index 481f8c36ccdc..3e6ae96443f3 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -15,12 +15,7 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-compute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts",