text: /**
   * @name exports
   * @summary Slot Class
   */
  module.exports = class Slot {
    constructor(opts) {
      // Create an object to store all props
      Object.defineProperty(this, '__data', { value: {} });
  
      // Define getters and setters as enumerable
  
      Object.defineProperty(this, '_id', {
        enumerable: true,
        get: () => this.__data._id,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._id = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'id', {
        enumerable: true,
        get: () => this.__data.id,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.id = value;
        },
      });
  
      Object.defineProperty(this, 'meta', {
        enumerable: true,
        get: () => this.__data.meta,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Meta = require('./meta.js');
          this.__data.meta = new Meta(value);
        },
      });
  
      Object.defineProperty(this, '_implicitRules', {
        enumerable: true,
        get: () => this.__data._implicitRules,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._implicitRules = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'implicitRules', {
        enumerable: true,
        get: () => this.__data.implicitRules,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.implicitRules = value;
        },
      });
  
      Object.defineProperty(this, '_language', {
        enumerable: true,
        get: () => this.__data._language,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._language = new Element(value);
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/languages
      Object.defineProperty(this, 'language', {
        enumerable: true,
        get: () => this.__data.language,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.language = value;
        },
      });
  
      Object.defineProperty(this, 'text', {
        enumerable: true,
        get: () => this.__data.text,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Narrative = require('./narrative.js');
          this.__data.text = new Narrative(value);
        },
      });
  
      Object.defineProperty(this, 'contained', {
        enumerable: true,
        get: () => this.__data.contained,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.contained = Array.isArray(value) ? value.map((v) => v) : [value];
        },
      });
  
      Object.defineProperty(this, 'extension', {
        enumerable: true,
        get: () => this.__data.extension,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Extension = require('./extension.js');
          this.__data.extension = Array.isArray(value)
            ? value.map((v) => new Extension(v))
            : [new Extension(value)];
        },
      });
  
      Object.defineProperty(this, 'modifierExtension', {
        enumerable: true,
        get: () => this.__data.modifierExtension,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Extension = require('./extension.js');
          this.__data.modifierExtension = Array.isArray(value)
            ? value.map((v) => new Extension(v))
            : [new Extension(value)];
        },
      });
  
      Object.defineProperty(this, 'identifier', {
        enumerable: true,
        get: () => this.__data.identifier,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Identifier = require('./identifier.js');
          this.__data.identifier = Array.isArray(value)
            ? value.map((v) => new Identifier(v))
            : [new Identifier(value)];
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/service-category
      Object.defineProperty(this, 'serviceCategory', {
        enumerable: true,
        get: () => this.__data.serviceCategory,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let CodeableConcept = require('./codeableconcept.js');
          this.__data.serviceCategory = new CodeableConcept(value);
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/service-type
      Object.defineProperty(this, 'serviceType', {
        enumerable: true,
        get: () => this.__data.serviceType,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let CodeableConcept = require('./codeableconcept.js');
          this.__data.serviceType = Array.isArray(value)
            ? value.map((v) => new CodeableConcept(v))
            : [new CodeableConcept(value)];
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes
      Object.defineProperty(this, 'specialty', {
        enumerable: true,
        get: () => this.__data.specialty,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let CodeableConcept = require('./codeableconcept.js');
          this.__data.specialty = Array.isArray(value)
            ? value.map((v) => new CodeableConcept(v))
            : [new CodeableConcept(value)];
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0276
      Object.defineProperty(this, 'appointmentType', {
        enumerable: true,
        get: () => this.__data.appointmentType,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let CodeableConcept = require('./codeableconcept.js');
          this.__data.appointmentType = new CodeableConcept(value);
        },
      });
  
      Object.defineProperty(this, 'schedule', {
        enumerable: true,
        get: () => this.__data.schedule,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Reference = require('./reference.js');
          this.__data.schedule = new Reference(value);
        },
      });
  
      Object.defineProperty(this, '_status', {
        enumerable: true,
        get: () => this.__data._status,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._status = new Element(value);
        },
      });
      // valueSetReference: http://hl7.org/fhir/ValueSet/slotstatus
      Object.defineProperty(this, 'status', {
        enumerable: true,
        get: () => this.__data.status,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.status = value;
        },
      });
  
      Object.defineProperty(this, '_start', {
        enumerable: true,
        get: () => this.__data._start,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._start = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'start', {
        enumerable: true,
        get: () => this.__data.start,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.start = value;
        },
      });
  
      Object.defineProperty(this, '_end', {
        enumerable: true,
        get: () => this.__data._end,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._end = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'end', {
        enumerable: true,
        get: () => this.__data.end,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.end = value;
        },
      });
  
      Object.defineProperty(this, '_overbooked', {
        enumerable: true,
        get: () => this.__data._overbooked,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._overbooked = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'overbooked', {
        enumerable: true,
        get: () => this.__data.overbooked,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.overbooked = value;
        },
      });
  
      Object.defineProperty(this, '_comment', {
        enumerable: true,
        get: () => this.__data._comment,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._comment = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'comment', {
        enumerable: true,
        get: () => this.__data.comment,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.comment = value;
        },
      });
  
      // Merge in any defaults
      Object.assign(this, opts);
  
      // Define a default non-writable resourceType property
      Object.defineProperty(this, 'resourceType', {
        value: 'Slot',
        enumerable: true,
        writable: false,
      });
    }
  
    static get resourceType() {
      return 'Slot';
    }
  
    toJSON() {
      return {
        resourceType: this.resourceType,
        id: this.id,
        meta: this.meta && this.meta.toJSON(),
        _implicitRules: this._implicitRules && this._implicitRules.toJSON(),
        implicitRules: this.implicitRules,
        _language: this._language && this._language.toJSON(),
        language: this.language,
        text: this.text && this.text.toJSON(),
        contained: this.contained,
        extension: this.extension && this.extension.map((v) => v.toJSON()),
        modifierExtension: this.modifierExtension && this.modifierExtension.map((v) => v.toJSON()),
        identifier: this.identifier && this.identifier.map((v) => v.toJSON()),
        serviceCategory: this.serviceCategory && this.serviceCategory.toJSON(),
        serviceType: this.serviceType && this.serviceType.map((v) => v.toJSON()),
        specialty: this.specialty && this.specialty.map((v) => v.toJSON()),
        appointmentType: this.appointmentType && this.appointmentType.toJSON(),
        schedule: this.schedule && this.schedule.toJSON(),
        _status: this._status && this._status.toJSON(),
        status: this.status,
        _start: this._start && this._start.toJSON(),
        start: this.start,
        _end: this._end && this._end.toJSON(),
        end: this.end,
        _overbooked: this._overbooked && this._overbooked.toJSON(),
        overbooked: this.overbooked,
        _comment: this._comment && this._comment.toJSON(),
        comment: this.comment,
      };
    }
  };
  