"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ICompletionsFetchService = exports.CompletionsFetchError = exports.Completions = void 0;
const services_1 = require("../../../util/common/services");
var Completions;
(function (Completions) {
    class RequestCancelled {
        constructor() {
            this.kind = 'cancelled';
        }
    }
    Completions.RequestCancelled = RequestCancelled;
    class UnsuccessfulResponse {
        constructor(status, statusText, headers, text) {
            this.status = status;
            this.statusText = statusText;
            this.headers = headers;
            this.text = text;
            this.kind = 'not-200-status';
        }
    }
    Completions.UnsuccessfulResponse = UnsuccessfulResponse;
    class Unexpected {
        constructor(error) {
            this.error = error;
            this.kind = 'unexpected';
        }
    }
    Completions.Unexpected = Unexpected;
})(Completions || (exports.Completions = Completions = {}));
class CompletionsFetchError extends Error {
    constructor(type, requestId, message) {
        super(message);
        this.type = type;
        this.requestId = requestId;
    }
}
exports.CompletionsFetchError = CompletionsFetchError;
exports.ICompletionsFetchService = (0, services_1.createServiceIdentifier)('ICompletionsFetchService');
//# sourceMappingURL=completionsFetchService.js.map