From 465bc4a8fc27dcc5ee3170813da610f5d1641336 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Jun 2021 08:53:55 +0000 Subject: [PATCH] CodeGen from PR 14869 in Azure/azure-rest-api-specs fix api tag (#14869) Co-authored-by: Binjie Qian --- sdk/signalr/arm-signalr/README.md | 111 ++- sdk/signalr/arm-signalr/package.json | 7 +- sdk/signalr/arm-signalr/rollup.config.js | 10 +- sdk/signalr/arm-signalr/src/models/index.ts | 630 +++++++++--------- sdk/signalr/arm-signalr/src/models/mappers.ts | 21 + .../arm-signalr/src/models/parameters.ts | 2 +- .../arm-signalr/src/operations/operations.ts | 53 +- .../arm-signalr/src/operations/signalR.ts | 485 ++++++-------- .../signalRPrivateEndpointConnections.ts | 215 ++---- .../operations/signalRPrivateLinkResources.ts | 83 +-- .../signalRSharedPrivateLinkResources.ts | 208 ++---- .../arm-signalr/src/operations/usages.ts | 63 +- .../src/signalRManagementClient.ts | 15 +- .../src/signalRManagementClientContext.ts | 29 +- 14 files changed, 832 insertions(+), 1100 deletions(-) diff --git a/sdk/signalr/arm-signalr/README.md b/sdk/signalr/arm-signalr/README.md index 7423938c8103..e3841a238dff 100644 --- a/sdk/signalr/arm-signalr/README.md +++ b/sdk/signalr/arm-signalr/README.md @@ -1,65 +1,71 @@ ## Azure SignalRManagementClient SDK for JavaScript -This package contains an isomorphic SDK for SignalRManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for SignalRManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-signalr` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-signalr +npm install --save @azure/arm-signalr @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. - -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { SignalRManagementClient } = require("@azure/arm-signalr"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new SignalRManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new SignalRManagementClient(creds, subscriptionId); +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -67,32 +73,25 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-signalr sample - - + diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index 639818d22aa3..9ed4695ae703 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -4,8 +4,9 @@ "description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.", "version": "4.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/signalRManagementClient.js", "types": "./esm/signalRManagementClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/signalr/arm-signalr/rollup.config.js b/sdk/signalr/arm-signalr/rollup.config.js index 7592cd72d347..0f16348bb245 100644 --- a/sdk/signalr/arm-signalr/rollup.config.js +++ b/sdk/signalr/arm-signalr/rollup.config.js @@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/signalRManagementClient.js", - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-signalr.js", format: "umd", @@ -25,7 +28,10 @@ const config = { * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()] + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] }; export default config; diff --git a/sdk/signalr/arm-signalr/src/models/index.ts b/sdk/signalr/arm-signalr/src/models/index.ts index 710d95537822..e86d6b988860 100644 --- a/sdk/signalr/arm-signalr/src/models/index.ts +++ b/sdk/signalr/arm-signalr/src/models/index.ts @@ -365,7 +365,8 @@ export interface Resource extends BaseResource { * The resource model definition for a ARM proxy resource. It will have everything other than * required location and tags */ -export interface ProxyResource extends Resource {} +export interface ProxyResource extends Resource { +} /** * A private endpoint connection to an azure resource @@ -617,7 +618,7 @@ export interface SignalRCorsSettings { } /** - * Feature of a SignalR resource, which controls the SignalR runtime behavior. + * Feature of a resource, which controls the runtime behavior. */ export interface SignalRFeature { /** @@ -790,6 +791,25 @@ export interface SignalRResource extends TrackedResource { * Network ACLs */ networkACLs?: SignalRNetworkACLs; + /** + * Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network + * ACLs. Default value: 'Enabled'. + */ + publicNetworkAccess?: string; + /** + * DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. Default value: false. + */ + disableLocalAuth?: boolean; + /** + * disableAadAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. Default value: false. + */ + disableAadAuth?: boolean; /** * The kind of the service - e.g. "SignalR" for "Microsoft.SignalRService/SignalR". Possible * values include: 'SignalR', 'RawWebSockets' @@ -997,7 +1017,7 @@ export interface SharedPrivateLinkResourceList extends Array - ): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -62,10 +55,7 @@ export class Operations { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -76,24 +66,15 @@ export class Operations { * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -102,8 +83,12 @@ const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.SignalRService/operations", - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.OperationList @@ -119,9 +104,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.OperationList diff --git a/sdk/signalr/arm-signalr/src/operations/signalR.ts b/sdk/signalr/arm-signalr/src/operations/signalR.ts index eca4f66c7fc6..033f63a676d2 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalR.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalR.ts @@ -33,39 +33,21 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options?: msRest.RequestOptionsBase - ): Promise; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; /** * @param location the region * @param parameters Parameters supplied to the operation. * @param callback The callback */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - callback: msRest.ServiceCallback - ): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, callback: msRest.ServiceCallback): void; /** * @param location the region * @param parameters Parameters supplied to the operation. * @param options The optional parameters * @param callback The callback */ - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - checkNameAvailability( - location: string, - parameters: Models.NameAvailabilityParameters, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { location, @@ -73,8 +55,7 @@ export class SignalR { options }, checkNameAvailabilityOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -82,9 +63,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listBySubscription( - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscription(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -93,21 +72,14 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - listBySubscription( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscription( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listBySubscriptionOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -117,43 +89,28 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param options The optional parameters * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listByResourceGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -164,22 +121,14 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - get( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - get( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -187,18 +136,8 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - get( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -206,8 +145,7 @@ export class SignalR { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -219,20 +157,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRCreateOrUpdateResponse - >; + createOrUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -243,14 +170,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, resourceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -262,18 +184,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - update( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise; + update(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -284,22 +197,14 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listKeys( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - listKeys( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + listKeys(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -307,18 +212,8 @@ export class SignalR { * @param options The optional parameters * @param callback The callback */ - listKeys( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listKeys( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listKeys(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -326,8 +221,7 @@ export class SignalR { options }, listKeysOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -340,20 +234,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - regenerateKey( - parameters: Models.RegenerateKeyParameters, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRegenerateKey( - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRRegenerateKeyResponse - >; + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRegenerateKey(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -364,14 +247,9 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - restart( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRestart(resourceGroupName, resourceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + restart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRestart(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -383,12 +261,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginCreateOrUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -397,8 +270,7 @@ export class SignalR { options }, beginCreateOrUpdateOperationSpec, - options - ); + options); } /** @@ -409,11 +281,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -421,8 +289,7 @@ export class SignalR { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -434,12 +301,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginUpdate( - parameters: Models.SignalRResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginUpdate(parameters: Models.SignalRResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -448,8 +310,7 @@ export class SignalR { options }, beginUpdateOperationSpec, - options - ); + options); } /** @@ -462,12 +323,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginRegenerateKey( - parameters: Models.RegenerateKeyParameters, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginRegenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { parameters, @@ -476,8 +332,7 @@ export class SignalR { options }, beginRegenerateKeyOperationSpec, - options - ); + options); } /** @@ -488,11 +343,7 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - beginRestart( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginRestart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -500,8 +351,7 @@ export class SignalR { options }, beginRestartOperationSpec, - options - ); + options); } /** @@ -510,41 +360,26 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listBySubscriptionNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -553,41 +388,26 @@ export class SignalR { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByResourceGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -595,11 +415,17 @@ export class SignalR { const serializer = new msRest.Serializer(Mappers); const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", - urlParameters: [Parameters.location, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -621,9 +447,15 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/signalR", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -637,11 +469,17 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -655,11 +493,18 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResource @@ -673,11 +518,18 @@ const getOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRKeys @@ -691,11 +543,18 @@ const listKeysOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -720,11 +579,18 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -738,11 +604,18 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -764,11 +637,18 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -789,11 +669,18 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 202: {}, 204: {}, @@ -808,9 +695,15 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList @@ -826,9 +719,15 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts index e8c26ec6804a..eec4311c611c 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts @@ -34,22 +34,14 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -57,20 +49,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -78,8 +58,7 @@ export class SignalRPrivateEndpointConnections { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,12 +70,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -104,12 +78,7 @@ export class SignalRPrivateEndpointConnections { * @param resourceName The name of the resource. * @param callback The callback */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -118,20 +87,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { privateEndpointConnectionName, @@ -140,8 +97,7 @@ export class SignalRPrivateEndpointConnections { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -154,13 +110,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param parameters The resource of private endpoint and its properties @@ -169,13 +119,7 @@ export class SignalRPrivateEndpointConnections { * @param resourceName The name of the resource. * @param callback The callback */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param privateEndpointConnectionName The name of the private endpoint connection * @param parameters The resource of private endpoint and its properties @@ -185,22 +129,8 @@ export class SignalRPrivateEndpointConnections { * @param options The optional parameters * @param callback The callback */ - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - privateEndpointConnectionName: string, - parameters: Models.PrivateEndpointConnection, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { privateEndpointConnectionName, @@ -210,8 +140,7 @@ export class SignalRPrivateEndpointConnections { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -223,18 +152,9 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( - privateEndpointConnectionName, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + deleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(privateEndpointConnectionName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -246,12 +166,7 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - privateEndpointConnectionName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { privateEndpointConnectionName, @@ -260,8 +175,7 @@ export class SignalRPrivateEndpointConnections { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -270,43 +184,26 @@ export class SignalRPrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -314,11 +211,18 @@ export class SignalRPrivateEndpointConnections { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionList @@ -332,16 +236,19 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnection @@ -355,16 +262,19 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -385,16 +295,19 @@ const updateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.privateEndpointConnectionName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -410,9 +323,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts index 4a2b0e86aed5..244c6518f569 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts @@ -33,22 +33,14 @@ export class SignalRPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -56,18 +48,8 @@ export class SignalRPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -75,8 +57,7 @@ export class SignalRPrivateLinkResources { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -85,41 +66,26 @@ export class SignalRPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -127,11 +93,18 @@ export class SignalRPrivateLinkResources { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateLinkResourceList @@ -147,9 +120,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PrivateLinkResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts b/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts index 8f55d84f534c..9380b43bfa72 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalRSharedPrivateLinkResources.ts @@ -34,22 +34,14 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - list( - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. @@ -57,20 +49,8 @@ export class SignalRSharedPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - list( - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - resourceName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -78,8 +58,7 @@ export class SignalRSharedPrivateLinkResources { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,12 +70,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param sharedPrivateLinkResourceName The name of the shared private link resource * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -104,12 +78,7 @@ export class SignalRSharedPrivateLinkResources { * @param resourceName The name of the resource. * @param callback The callback */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param sharedPrivateLinkResourceName The name of the shared private link resource * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -118,20 +87,8 @@ export class SignalRSharedPrivateLinkResources { * @param options The optional parameters * @param callback The callback */ - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { sharedPrivateLinkResourceName, @@ -140,8 +97,7 @@ export class SignalRSharedPrivateLinkResources { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -154,22 +110,9 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - sharedPrivateLinkResourceName: string, - parameters: Models.SharedPrivateLinkResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - sharedPrivateLinkResourceName, - parameters, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SignalRSharedPrivateLinkResourcesCreateOrUpdateResponse - >; + createOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(sharedPrivateLinkResourceName,parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -181,18 +124,9 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( - sharedPrivateLinkResourceName, - resourceGroupName, - resourceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + deleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(sharedPrivateLinkResourceName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -205,13 +139,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate( - sharedPrivateLinkResourceName: string, - parameters: Models.SharedPrivateLinkResource, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginCreateOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { sharedPrivateLinkResourceName, @@ -221,8 +149,7 @@ export class SignalRSharedPrivateLinkResources { options }, beginCreateOrUpdateOperationSpec, - options - ); + options); } /** @@ -234,12 +161,7 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod( - sharedPrivateLinkResourceName: string, - resourceGroupName: string, - resourceName: string, - options?: msRest.RequestOptionsBase - ): Promise { + beginDeleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { sharedPrivateLinkResourceName, @@ -248,8 +170,7 @@ export class SignalRSharedPrivateLinkResources { options }, beginDeleteMethodOperationSpec, - options - ); + options); } /** @@ -258,43 +179,26 @@ export class SignalRSharedPrivateLinkResources { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -302,11 +206,18 @@ export class SignalRSharedPrivateLinkResources { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResourceList @@ -320,16 +231,19 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResource @@ -343,16 +257,19 @@ const getOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -376,16 +293,19 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", urlParameters: [ Parameters.sharedPrivateLinkResourceName, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 202: {}, @@ -401,9 +321,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SharedPrivateLinkResourceList diff --git a/sdk/signalr/arm-signalr/src/operations/usages.ts b/sdk/signalr/arm-signalr/src/operations/usages.ts index f3fddd234648..282817bef03f 100644 --- a/sdk/signalr/arm-signalr/src/operations/usages.ts +++ b/sdk/signalr/arm-signalr/src/operations/usages.ts @@ -42,24 +42,15 @@ export class Usages { * @param options The optional parameters * @param callback The callback */ - list( - location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - location: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { location, options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -68,10 +59,7 @@ export class Usages { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -82,24 +70,15 @@ export class Usages { * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -107,11 +86,17 @@ export class Usages { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", - urlParameters: [Parameters.location, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRUsageList @@ -127,9 +112,15 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.SignalRUsageList diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts index f89ba0585838..6880eb577d4b 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts @@ -8,11 +8,13 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; import { SignalRManagementClientContext } from "./signalRManagementClientContext"; + class SignalRManagementClient extends SignalRManagementClientContext { // Operation groups operations: operations.Operations; @@ -24,16 +26,17 @@ class SignalRManagementClient extends SignalRManagementClientContext { /** * Initializes a new instance of the SignalRManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials, - subscriptionId: string, - options?: Models.SignalRManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.signalR = new operations.SignalR(this); diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index 066c749b799a..940de701b21c 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -10,32 +10,34 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-signalr"; const packageVersion = "4.0.0"; export class SignalRManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the SignalRManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials, - subscriptionId: string, - options?: Models.SignalRManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SignalRManagementClientOptions) { if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + throw new Error('\'subscriptionId\' cannot be null.'); } if (!options) { @@ -48,8 +50,8 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = "2021-04-01-preview"; - this.acceptLanguage = "en-US"; + this.apiVersion = '2021-06-01-preview'; + this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; @@ -59,10 +61,7 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } }