text: /**
   * @name exports
   * @summary AppointmentParticipant Class
   */
  module.exports = class AppointmentParticipant {
    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, '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, 'type', {
        enumerable: true,
        get: () => this.__data.type,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let CodeableConcept = require('./codeableconcept.js');
          this.__data.type = Array.isArray(value)
            ? value.map((v) => new CodeableConcept(v))
            : [new CodeableConcept(value)];
        },
      });
  
      Object.defineProperty(this, 'actor', {
        enumerable: true,
        get: () => this.__data.actor,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Reference = require('./reference.js');
          this.__data.actor = new Reference(value);
        },
      });
  
      Object.defineProperty(this, '_required', {
        enumerable: true,
        get: () => this.__data._required,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Element = require('./element.js');
          this.__data._required = new Element(value);
        },
      });
  
      Object.defineProperty(this, 'required', {
        enumerable: true,
        get: () => this.__data.required,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          this.__data.required = 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);
        },
      });
  
      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, 'period', {
        enumerable: true,
        get: () => this.__data.period,
        set: (value) => {
          if (value === undefined || value === null) {
            return;
          }
  
          let Period = require('./period.js');
          this.__data.period = new Period(value);
        },
      });
  
      // Merge in any defaults
      Object.assign(this, opts);
  
      // Define a default non-writable resourceType property
      Object.defineProperty(this, 'resourceType', {
        value: 'AppointmentParticipant',
        enumerable: true,
        writable: false,
      });
    }
  
    static get resourceType() {
      return 'AppointmentParticipant';
    }
  
    toJSON() {
      return {
        id: this.id,
        extension: this.extension && this.extension.map((v) => v.toJSON()),
        modifierExtension: this.modifierExtension && this.modifierExtension.map((v) => v.toJSON()),
        type: this.type && this.type.map((v) => v.toJSON()),
        actor: this.actor && this.actor.toJSON(),
        _required: this._required && this._required.toJSON(),
        required: this.required,
        _status: this._status && this._status.toJSON(),
        status: this.status,
        period: this.period && this.period.toJSON(),
      };
    }
  };
  