diff --git a/sdk/reservations/arm-reservations/README.md b/sdk/reservations/arm-reservations/README.md index 156ab2e58ad8..4ac380d42d46 100644 --- a/sdk/reservations/arm-reservations/README.md +++ b/sdk/reservations/arm-reservations/README.md @@ -1,94 +1,99 @@ ## Azure AzureReservationAPI SDK for JavaScript -This package contains an isomorphic SDK for AzureReservationAPI. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureReservationAPI. ### 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-reservations` 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-reservations +npm install --save @azure/arm-reservations @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 - Authentication, client creation and get quota 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 reservation as an example written in JavaScript. ##### Sample code ```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { AzureReservationAPI } = require("@azure/arm-reservations"); -const { interactiveLogin } = require("@azure/ms-rest-nodeauth"); - -interactiveLogin().then((creds) => { - const client = new AzureReservationAPI(creds); - const subscriptionId = "testsubscriptionId"; - const providerId = "testproviderId"; - const location = "westus"; - const resourceName = "testresourceName"; - client.quota.get(subscriptionId, providerId, location, resourceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// 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 AzureReservationAPI(creds, subscriptionId); +const reservationOrderId = "testreservationOrderId"; +client.reservation.list(reservationOrderId).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 get quota as an example written in JavaScript. +#### browser - Authentication, client creation, and list reservation as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```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 @azure/arm-reservations sample - - + diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index 3ed3ffb6d440..01cb53024514 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -4,8 +4,9 @@ "description": "AzureReservationAPI Library with typescript type definitions for node.js and browser.", "version": "6.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,13 +21,13 @@ "module": "./esm/azureReservationAPI.js", "types": "./esm/azureReservationAPI.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", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/reservations/arm-reservations", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/reservations/arm-reservations", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts index 6f761cb07da8..93f338093fde 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts @@ -8,6 +8,7 @@ */ 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 Parameters from "./models/parameters"; @@ -27,10 +28,15 @@ class AzureReservationAPI extends AzureReservationAPIContext { /** * Initializes a new instance of the AzureReservationAPI 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 [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureReservationAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.AzureReservationAPIOptions) { super(credentials, options); this.reservation = new operations.Reservation(this); this.reservationOrder = new operations.ReservationOrder(this); diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts b/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts index 49da34adf76d..8364ecb055c6 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPIContext.ts @@ -10,19 +10,25 @@ 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-reservations"; const packageVersion = "6.0.0"; export class AzureReservationAPIContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the AzureReservationAPI 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 [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureReservationAPIOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.AzureReservationAPIOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/reservations/arm-reservations/src/models/index.ts b/sdk/reservations/arm-reservations/src/models/index.ts index 6d94f9ae195d..bacd4bc6c883 100644 --- a/sdk/reservations/arm-reservations/src/models/index.ts +++ b/sdk/reservations/arm-reservations/src/models/index.ts @@ -1605,16 +1605,16 @@ export type ReservationAvailableScopesResponse = AvailableScopeProperties & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableScopeProperties; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableScopeProperties; + }; }; /** @@ -1625,16 +1625,16 @@ export type ReservationSplitResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse[]; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse[]; + }; }; /** @@ -1645,16 +1645,16 @@ export type ReservationMergeResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse[]; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse[]; + }; }; /** @@ -1665,16 +1665,16 @@ export type ReservationListResponse = ReservationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationList; + }; }; /** @@ -1685,16 +1685,16 @@ export type ReservationGetResponse = ReservationResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse; + }; }; /** @@ -1705,16 +1705,16 @@ export type ReservationUpdateResponse = ReservationResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse; + }; }; /** @@ -1725,16 +1725,16 @@ export type ReservationListRevisionsResponse = ReservationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationList; + }; }; /** @@ -1745,16 +1745,16 @@ export type ReservationBeginAvailableScopesResponse = AvailableScopeProperties & * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableScopeProperties; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableScopeProperties; + }; }; /** @@ -1765,16 +1765,16 @@ export type ReservationBeginSplitResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse[]; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse[]; + }; }; /** @@ -1785,16 +1785,16 @@ export type ReservationBeginMergeResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse[]; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse[]; + }; }; /** @@ -1805,16 +1805,16 @@ export type ReservationBeginUpdateResponse = ReservationResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationResponse; + }; }; /** @@ -1825,16 +1825,16 @@ export type ReservationListNextResponse = ReservationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationList; + }; }; /** @@ -1845,16 +1845,16 @@ export type ReservationListRevisionsNextResponse = ReservationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationList; + }; }; /** @@ -1865,16 +1865,16 @@ export type GetCatalogResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Catalog[]; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Catalog[]; + }; }; /** @@ -1885,16 +1885,16 @@ export type GetAppliedReservationListResponse = AppliedReservations & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AppliedReservations; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AppliedReservations; + }; }; /** @@ -1905,16 +1905,16 @@ export type ReservationOrderCalculateResponse = CalculatePriceResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CalculatePriceResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CalculatePriceResponse; + }; }; /** @@ -1925,16 +1925,16 @@ export type ReservationOrderListResponse = ReservationOrderList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationOrderList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderList; + }; }; /** @@ -1945,16 +1945,16 @@ export type ReservationOrderPurchaseResponse = ReservationOrderResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationOrderResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderResponse; + }; }; /** @@ -1965,16 +1965,16 @@ export type ReservationOrderGetResponse = ReservationOrderResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationOrderResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderResponse; + }; }; /** @@ -1985,16 +1985,16 @@ export type ReservationOrderBeginPurchaseResponse = ReservationOrderResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationOrderResponse; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderResponse; + }; }; /** @@ -2005,16 +2005,16 @@ export type ReservationOrderListNextResponse = ReservationOrderList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationOrderList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderList; + }; }; /** @@ -2025,16 +2025,16 @@ export type OperationListResponse = OperationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; }; /** @@ -2045,16 +2045,16 @@ export type OperationListNextResponse = OperationList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; }; /** @@ -2065,21 +2065,21 @@ export type CalculateExchangePostResponse = CalculateExchangeOperationResultResp * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CalculateExchangePostHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CalculateExchangeOperationResultResponse; - }; + /** + * The parsed HTTP response headers. + */ + parsedHeaders: CalculateExchangePostHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CalculateExchangeOperationResultResponse; + }; }; /** @@ -2090,21 +2090,21 @@ export type ExchangePostResponse = ExchangeOperationResultResponse & ExchangePos * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: ExchangePostHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ExchangeOperationResultResponse; - }; + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ExchangePostHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExchangeOperationResultResponse; + }; }; /** @@ -2115,21 +2115,21 @@ export type QuotaGetResponse = CurrentQuotaLimitBase & QuotaGetHeaders & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: QuotaGetHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CurrentQuotaLimitBase; - }; + /** + * The parsed HTTP response headers. + */ + parsedHeaders: QuotaGetHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CurrentQuotaLimitBase; + }; }; /** @@ -2145,16 +2145,16 @@ export type QuotaCreateOrUpdateResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; }; /** @@ -2170,16 +2170,16 @@ export type QuotaUpdateResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; }; /** @@ -2190,21 +2190,21 @@ export type QuotaListResponse = QuotaLimits & QuotaListHeaders & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: QuotaListHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QuotaLimits; - }; + /** + * The parsed HTTP response headers. + */ + parsedHeaders: QuotaListHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaLimits; + }; }; /** @@ -2220,16 +2220,16 @@ export type QuotaBeginCreateOrUpdateResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; }; /** @@ -2245,16 +2245,16 @@ export type QuotaBeginUpdateResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; }; /** @@ -2265,16 +2265,16 @@ export type QuotaRequestStatusGetResponse = QuotaRequestDetails & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QuotaRequestDetails; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaRequestDetails; + }; }; /** @@ -2285,16 +2285,16 @@ export type QuotaRequestStatusListResponse = QuotaRequestDetailsList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QuotaRequestDetailsList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaRequestDetailsList; + }; }; /** @@ -2305,14 +2305,14 @@ export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QuotaRequestDetailsList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaRequestDetailsList; + }; }; diff --git a/sdk/reservations/arm-reservations/src/operations/quota.ts b/sdk/reservations/arm-reservations/src/operations/quota.ts index 9dd20c907d92..53d4a30471b8 100644 --- a/sdk/reservations/arm-reservations/src/operations/quota.ts +++ b/sdk/reservations/arm-reservations/src/operations/quota.ts @@ -91,7 +91,7 @@ export class Quota { * @returns Promise */ createOrUpdate(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: Models.CurrentQuotaLimitBase, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) + return this.beginCreateOrUpdate(subscriptionId,providerId,location,resourceName,createQuotaRequest,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -115,7 +115,7 @@ export class Quota { * @returns Promise */ update(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: Models.CurrentQuotaLimitBase, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) + return this.beginUpdate(subscriptionId,providerId,location,resourceName,createQuotaRequest,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } diff --git a/sdk/reservations/arm-reservations/src/operations/reservation.ts b/sdk/reservations/arm-reservations/src/operations/reservation.ts index 6dde501a1860..9fdda2d79ed7 100644 --- a/sdk/reservations/arm-reservations/src/operations/reservation.ts +++ b/sdk/reservations/arm-reservations/src/operations/reservation.ts @@ -36,7 +36,7 @@ export class Reservation { * @returns Promise */ availableScopes(reservationOrderId: string, reservationId: string, body: Models.AvailableScopeRequest, options?: msRest.RequestOptionsBase): Promise { - return this.beginAvailableScopes(reservationOrderId, reservationId, body, options) + return this.beginAvailableScopes(reservationOrderId,reservationId,body,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -49,7 +49,7 @@ export class Reservation { * @returns Promise */ split(reservationOrderId: string, body: Models.SplitRequest, options?: msRest.RequestOptionsBase): Promise { - return this.beginSplit(reservationOrderId, body, options) + return this.beginSplit(reservationOrderId,body,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -63,7 +63,7 @@ export class Reservation { * @returns Promise */ merge(reservationOrderId: string, body: Models.MergeRequest, options?: msRest.RequestOptionsBase): Promise { - return this.beginMerge(reservationOrderId, body, options) + return this.beginMerge(reservationOrderId,body,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -139,7 +139,7 @@ export class Reservation { * @returns Promise */ update(reservationOrderId: string, reservationId: string, parameters: Models.Patch, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(reservationOrderId, reservationId, parameters, options) + return this.beginUpdate(reservationOrderId,reservationId,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } diff --git a/sdk/reservations/arm-reservations/src/operations/reservationOrder.ts b/sdk/reservations/arm-reservations/src/operations/reservationOrder.ts index 78d274728c65..f25fb3e548fc 100644 --- a/sdk/reservations/arm-reservations/src/operations/reservationOrder.ts +++ b/sdk/reservations/arm-reservations/src/operations/reservationOrder.ts @@ -89,7 +89,7 @@ export class ReservationOrder { * @returns Promise */ purchase(reservationOrderId: string, body: Models.PurchaseRequest, options?: msRest.RequestOptionsBase): Promise { - return this.beginPurchase(reservationOrderId, body, options) + return this.beginPurchase(reservationOrderId,body,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; }