"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://main.vscode-cdn.net/sourcemaps/8761a5560cfd65fdd19ce7e2bd18dab5c0a4d84e/node_modules/@microsoft/dev-tunnels-ssh/events/sshRequestEventArgs.js.map