/*
 * 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 { __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;
    }
    async sendInitialRequest() {
        return this.sendOperationFn(this.args, this.spec);
    }
    async sendPollRequest(path) {
        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