@autorest/codemodel
Version:
AutoRest code model library
36 lines • 1.75 kB
JavaScript
;
/*---------------------------------------------------------------------------------------------
* 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.VirtualParameter = exports.Parameter = exports.ImplementationLocation = void 0;
exports.isVirtualParameter = isVirtualParameter;
const value_1 = require("./value");
var ImplementationLocation;
(function (ImplementationLocation) {
/** should be exposed as a method parameter in the operation */
ImplementationLocation["Method"] = "Method";
/** should be exposed as a client parameter (not exposed in the operation directly) */
ImplementationLocation["Client"] = "Client";
/** should be used as input to constructing the context of the client (ie, 'profile') */
ImplementationLocation["Context"] = "Context";
})(ImplementationLocation || (exports.ImplementationLocation = ImplementationLocation = {}));
class Parameter extends value_1.Value {
constructor(name, description, schema, initializer) {
super(name, description, schema);
this.apply(initializer);
}
}
exports.Parameter = Parameter;
class VirtualParameter extends Parameter {
constructor(name, description, schema, initializer) {
super(name, description, schema);
this.applyWithExclusions(["schema"], initializer);
}
}
exports.VirtualParameter = VirtualParameter;
function isVirtualParameter(parameter) {
return !!parameter.originalParameter;
}
//# sourceMappingURL=parameter.js.map