"use strict";
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//
Object.defineProperty(exports, "__esModule", { value: true });
exports.SshRequestEventArgs = void 0;
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
class SshRequestEventArgs {
    constructor(requestType, request, principal, cancellation) {
        this.requestType = requestType;
        this.request = request;
        this.principal = principal;
        this.cancellationValue = cancellation !== null && cancellation !== void 0 ? cancellation : vscode_jsonrpc_1.CancellationToken.None;
    }
    /**
     * Gets a token that is cancelled if the session ends before the request handler
     * completes.
     */
    get cancellation() {
        return this.cancellationValue;
    }
    /* @internal */
    set cancellation(value) {
        this.cancellationValue = value;
    }
    toString() {
        return `RequestType: ${this.requestType}` + this.request ? ` Request: ${this.request}` : '';
    }
}
exports.SshRequestEventArgs = SshRequestEventArgs;
//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-4c0b0c6cc561d2d3636d1ec250935431876ce4dc/node_modules-@microsoft-dev-tunnels-ssh-events-sshRequestEventArgs.js.map