[d24f17c] | 1 | import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';
|
---|
| 2 | class Parameter extends ObjectElement {
|
---|
| 3 | constructor(content, meta, attributes) {
|
---|
| 4 | super(content, meta, attributes);
|
---|
| 5 | this.element = 'parameter';
|
---|
| 6 | }
|
---|
| 7 | get name() {
|
---|
| 8 | return this.get('name');
|
---|
| 9 | }
|
---|
| 10 | set name(name) {
|
---|
| 11 | this.set('name', name);
|
---|
| 12 | }
|
---|
| 13 | get in() {
|
---|
| 14 | return this.get('in');
|
---|
| 15 | }
|
---|
| 16 | set in(val) {
|
---|
| 17 | this.set('in', val);
|
---|
| 18 | }
|
---|
| 19 | get required() {
|
---|
| 20 | if (this.hasKey('required')) {
|
---|
| 21 | return this.get('required');
|
---|
| 22 | }
|
---|
| 23 | return new BooleanElement(false);
|
---|
| 24 | }
|
---|
| 25 | set required(required) {
|
---|
| 26 | this.set('required', required);
|
---|
| 27 | }
|
---|
| 28 | get deprecated() {
|
---|
| 29 | if (this.hasKey('deprecated')) {
|
---|
| 30 | return this.get('deprecated');
|
---|
| 31 | }
|
---|
| 32 | return new BooleanElement(false);
|
---|
| 33 | }
|
---|
| 34 | set deprecated(deprecated) {
|
---|
| 35 | this.set('deprecated', deprecated);
|
---|
| 36 | }
|
---|
| 37 | get allowEmptyValue() {
|
---|
| 38 | return this.get('allowEmptyValue');
|
---|
| 39 | }
|
---|
| 40 | set allowEmptyValue(allowEmptyValue) {
|
---|
| 41 | this.set('allowEmptyValue', allowEmptyValue);
|
---|
| 42 | }
|
---|
| 43 | get style() {
|
---|
| 44 | return this.get('style');
|
---|
| 45 | }
|
---|
| 46 | set style(style) {
|
---|
| 47 | this.set('style', style);
|
---|
| 48 | }
|
---|
| 49 | get explode() {
|
---|
| 50 | return this.get('explode');
|
---|
| 51 | }
|
---|
| 52 | set explode(explode) {
|
---|
| 53 | this.set('explode', explode);
|
---|
| 54 | }
|
---|
| 55 | get allowReserved() {
|
---|
| 56 | return this.get('allowReserved');
|
---|
| 57 | }
|
---|
| 58 | set allowReserved(allowReserved) {
|
---|
| 59 | this.set('allowReserved', allowReserved);
|
---|
| 60 | }
|
---|
| 61 | get schema() {
|
---|
| 62 | return this.get('schema');
|
---|
| 63 | }
|
---|
| 64 | set schema(schema) {
|
---|
| 65 | this.set('schema', schema);
|
---|
| 66 | }
|
---|
| 67 | get example() {
|
---|
| 68 | return this.get('example');
|
---|
| 69 | }
|
---|
| 70 | set example(example) {
|
---|
| 71 | this.set('example', example);
|
---|
| 72 | }
|
---|
| 73 | get examples() {
|
---|
| 74 | return this.get('examples');
|
---|
| 75 | }
|
---|
| 76 | set examples(examples) {
|
---|
| 77 | this.set('examples', examples);
|
---|
| 78 | }
|
---|
| 79 | get contentProp() {
|
---|
| 80 | return this.get('content');
|
---|
| 81 | }
|
---|
| 82 | set contentProp(content) {
|
---|
| 83 | this.set('content', content);
|
---|
| 84 | }
|
---|
| 85 | }
|
---|
| 86 | Object.defineProperty(Parameter.prototype, 'description', {
|
---|
| 87 | get() {
|
---|
| 88 | return this.get('description');
|
---|
| 89 | },
|
---|
| 90 | set(description) {
|
---|
| 91 | this.set('description', description);
|
---|
| 92 | },
|
---|
| 93 | enumerable: true
|
---|
| 94 | });
|
---|
| 95 | export default Parameter; |
---|