@azure/arm-security
Version:
A generated SDK for SecurityCenter.
29 lines • 1.13 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter, __rest } from "tslib";
export class LroImpl {
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
this.sendOperationFn = sendOperationFn;
this.args = args;
this.spec = spec;
this.requestPath = requestPath;
this.requestMethod = requestMethod;
}
sendInitialRequest() {
return __awaiter(this, void 0, void 0, function* () {
return this.sendOperationFn(this.args, this.spec);
});
}
sendPollRequest(path) {
return __awaiter(this, void 0, void 0, function* () {
const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
});
}
}
//# sourceMappingURL=lroImpl.js.map