UNPKG

1.75 kBJavaScriptView Raw
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6/* tslint:disable:variable-name */
7const CodegenModel_1 = __importDefault(require("./CodegenModel"));
8const CodegenOperation_1 = __importDefault(require("./CodegenOperation"));
9const CodegenParameter_1 = __importDefault(require("./CodegenParameter"));
10const CodegenProperty_1 = __importDefault(require("./CodegenProperty"));
11const CodegenResponse_1 = __importDefault(require("./CodegenResponse"));
12const CodegenSecurity_1 = __importDefault(require("./CodegenSecurity"));
13class CodegenModelType {
14 constructor(defaultImplementation) {
15 this.ordinal = () => ALL.indexOf(this);
16 this._defaultImplementation = defaultImplementation;
17 }
18 getDefaultImplementation() {
19 return this._defaultImplementation;
20 }
21}
22CodegenModelType.values = () => ALL;
23const forType = type => new CodegenModelType(type);
24exports.MODEL = forType(CodegenModel_1.default);
25exports.OPERATION = forType(CodegenOperation_1.default);
26exports.PARAMETER = forType(CodegenParameter_1.default);
27exports.PROPERTY = forType(CodegenProperty_1.default);
28exports.RESPONSE = forType(CodegenResponse_1.default);
29exports.SECURITY = forType(CodegenSecurity_1.default);
30const ALL = [exports.MODEL, exports.OPERATION, exports.PARAMETER, exports.PROPERTY, exports.RESPONSE, exports.SECURITY];
31exports.default = {
32 MODEL: exports.MODEL,
33 OPERATION: exports.OPERATION,
34 PARAMETER: exports.PARAMETER,
35 PROPERTY: exports.PROPERTY,
36 RESPONSE: exports.RESPONSE,
37 SECURITY: exports.SECURITY,
38};
39//# sourceMappingURL=CodegenModelType.js.map
\No newline at end of file