UNPKG

@autorest/powershell

Version:
101 lines 3.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tag = exports.ServerVariable = exports.Server = exports.Link = exports.ExternalDocumentation = exports.Example = exports.ImplementationLocation = exports.Components = exports.IParameter = void 0; const linq_1 = require("@azure-tools/linq"); const extensions_1 = require("./extensions"); //import { Schema } from './schema'; const uid_1 = require("./uid"); class IParameter extends extensions_1.Extensions { constructor(name, schema, initializer) { super(); this.name = name; this.schema = schema; this.description = ''; this.deprecated = false; this.required = false; this.details = { default: { uid: `parameter:${(0, uid_1.uid)()}`, description: this.description, name, } }; this.allowEmptyValue = false; this.apply(initializer); } } exports.IParameter = IParameter; class Components extends extensions_1.Extensions { constructor(initializer) { super(); /** * Dictionary of Operations in this model. * * This is intended to invert the original PathItems in the OAI model, and focus on operations, not endpoints. */ this.operations = new linq_1.Dictionary(); this.apply(initializer); } } exports.Components = Components; var ImplementationLocation; (function (ImplementationLocation) { ImplementationLocation["Method"] = "Method"; ImplementationLocation["Client"] = "Client"; })(ImplementationLocation || (exports.ImplementationLocation = ImplementationLocation = {})); class Example extends extensions_1.Extensions { constructor(initializer) { super(); this.extensions = new linq_1.Dictionary(); this.apply(initializer); } } exports.Example = Example; class ExternalDocumentation extends extensions_1.Extensions { constructor(url, initializer) { super(); this.url = url; this.extensions = new linq_1.Dictionary(); this.apply(initializer); } } exports.ExternalDocumentation = ExternalDocumentation; class Link extends extensions_1.Extensions { constructor(initializer) { super(); this.extensions = new linq_1.Dictionary(); this.parameters = new linq_1.Dictionary(); this.apply(initializer); } } exports.Link = Link; class Server extends extensions_1.Extensions { constructor(url, initializer) { super(); this.url = url; this.extensions = new linq_1.Dictionary(); this.variables = new linq_1.Dictionary(); this.apply(initializer); } } exports.Server = Server; class ServerVariable extends extensions_1.Extensions { constructor(defaultValue, initializer) { super(); this.extensions = new linq_1.Dictionary(); this.enum = new Array(); this.default = defaultValue; this.apply(initializer); } } exports.ServerVariable = ServerVariable; class Tag extends extensions_1.Extensions { constructor(name, initializer) { super(); this.name = name; this.extensions = new linq_1.Dictionary(); this.apply(initializer); } } exports.Tag = Tag; //# sourceMappingURL=components.js.map