UNPKG

@azure/arm-appservice

Version:
100 lines 3.66 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; /** Class containing Global operations. */ export class GlobalImpl { client; /** * Initialize a new instance of the class Global class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Description for Get deleted app for a subscription. * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 * @param options The options parameters. */ getDeletedWebApp(deletedSiteId, options) { return this.client.sendOperationRequest({ deletedSiteId, options }, getDeletedWebAppOperationSpec); } /** * Description for Get all deleted apps for a subscription. * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 * @param options The options parameters. */ getDeletedWebAppSnapshots(deletedSiteId, options) { return this.client.sendOperationRequest({ deletedSiteId, options }, getDeletedWebAppSnapshotsOperationSpec); } /** * Description for Gets an operation in a subscription and given region * @param location Location name * @param operationId Operation Id * @param options The options parameters. */ getSubscriptionOperationWithAsyncResponse(location, operationId, options) { return this.client.sendOperationRequest({ location, operationId, options }, getSubscriptionOperationWithAsyncResponseOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getDeletedWebAppOperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DeletedSite, }, default: { bodyMapper: Mappers.DefaultErrorResponse, }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.deletedSiteId], headerParameters: [Parameters.accept], serializer, }; const getDeletedWebAppSnapshotsOperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "Snapshot" } }, }, }, }, default: { bodyMapper: Mappers.DefaultErrorResponse, }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.deletedSiteId], headerParameters: [Parameters.accept], serializer, }; const getSubscriptionOperationWithAsyncResponseOperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}", httpMethod: "GET", responses: { 204: {}, default: { bodyMapper: Mappers.DefaultErrorResponse, }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.location, Parameters.operationId, ], headerParameters: [Parameters.accept], serializer, }; //# sourceMappingURL=global.js.map