Skip to content

Commit

Permalink
CodeGen from PR 26680 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 456526f6812ca865a74a34ce0ec25ee5b19c5455 into 78eac0bd58633028293cb1ec1709baa200bed9e2
  • Loading branch information
SDKAuto committed Nov 13, 2023
1 parent 687c4a7 commit c184314
Show file tree
Hide file tree
Showing 11 changed files with 497 additions and 415 deletions.
766 changes: 392 additions & 374 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Release History

## 5.5.0 (2023-11-13)

**Features**

## 5.4.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface CertificateRequestCertificateCreateOptions
- Interface CertificateRequest has a new optional parameter certificateCreateOptions


## 5.4.0 (2023-08-29)

**Features**
Expand Down Expand Up @@ -115,4 +113,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.

To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
8 changes: 4 additions & 4 deletions sdk/recoveryservices/arm-recoveryservices/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "d4ceb3d2a889b7e1eff831dbd35f70266b6fe3f6",
"commit": "b29cc1fb1395c7effd0dc0b28a3bbe66263f03fc",
"readme": "specification/recoveryservices/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\\specification\\recoveryservices\\resource-manager\\readme.md --use=@autorest/[email protected].8 --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/recoveryservices/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/[email protected].2",
"use": "@autorest/[email protected].8"
"release_tool": "@azure-tools/[email protected].4",
"use": "@autorest/typescript@^6.0.12"
}
24 changes: 9 additions & 15 deletions sdk/recoveryservices/arm-recoveryservices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for RecoveryServicesClient.",
"version": "5.4.1",
"version": "5.5.0",
"engines": {
"node": ">=18.0.0"
},
Expand Down Expand Up @@ -32,18 +32,20 @@
"mkdirp": "^2.1.2",
"typescript": "~5.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"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",
"ts-node": "^10.0.0",
"@azure/dev-tool": "^1.0.0"
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -77,7 +79,7 @@
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
Expand Down Expand Up @@ -105,13 +107,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservices/arm-recoveryservices",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservices?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservices/arm-recoveryservices"
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ export interface CapabilitiesResponseProperties {

// @public
export interface CertificateRequest {
// (undocumented)
certificateCreateOptions?: CertificateRequestCertificateCreateOptions;
properties?: RawCertificateData;
}

// @public (undocumented)
export interface CertificateRequestCertificateCreateOptions {
// (undocumented)
validityInHours?: number;
}

// @public
export interface CheckNameAvailabilityParameters {
name?: string;
Expand Down
5 changes: 5 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type ResourceCertificateDetailsUnion =
export interface CertificateRequest {
/** Raw certificate data. */
properties?: RawCertificateData;
certificateCreateOptions?: CertificateRequestCertificateCreateOptions;
}

/** Raw certificate data. */
Expand All @@ -27,6 +28,10 @@ export interface RawCertificateData {
certificate?: Uint8Array;
}

export interface CertificateRequestCertificateCreateOptions {
validityInHours?: number;
}

/** Certificate corresponding to a vault that can be used by clients to register themselves with the vault. */
export interface VaultCertificateResponse {
/**
Expand Down
22 changes: 22 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export const CertificateRequest: coreClient.CompositeMapper = {
name: "Composite",
className: "RawCertificateData"
}
},
certificateCreateOptions: {
serializedName: "certificateCreateOptions",
type: {
name: "Composite",
className: "CertificateRequestCertificateCreateOptions"
}
}
}
}
Expand All @@ -45,6 +52,21 @@ export const RawCertificateData: coreClient.CompositeMapper = {
}
};

export const CertificateRequestCertificateCreateOptions: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CertificateRequestCertificateCreateOptions",
modelProperties: {
validityInHours: {
serializedName: "validityInHours",
type: {
name: "Number"
}
}
}
}
};

export const VaultCertificateResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const subscriptionId: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2023-04-01",
defaultValue: "2023-06-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-recoveryservices/5.4.1`;
const packageDetails = `azsdk-js-arm-recoveryservices/5.5.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -131,7 +131,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2023-04-01";
this.apiVersion = options.apiVersion || "2023-06-01";
this.vaultCertificates = new VaultCertificatesImpl(this);
this.registeredIdentities = new RegisteredIdentitiesImpl(this);
this.replicationUsages = new ReplicationUsagesImpl(this);
Expand Down
43 changes: 43 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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<string, string> = {
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!");
});
});
10 changes: 2 additions & 8 deletions sdk/recoveryservices/arm-recoveryservices/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-recoveryservices": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit c184314

Please sign in to comment.