text: /**
   * @name exports
   * @summary PaymentReconciliation Class
   */
  module.exports = class PaymentReconciliation {
  	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);
  			},
  		});
  
  		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)];
  			},
  		});
  
  		Object.defineProperty(this, 'request', {
  			enumerable: true,
  			get: () => this.__data.request,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Reference = require('./reference.js');
  				this.__data.request = new Reference(value);
  			},
  		});
  
  		Object.defineProperty(this, '_outcome', {
  			enumerable: true,
  			get: () => this.__data._outcome,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Element = require('./element.js');
  				this.__data._outcome = new Element(value);
  			},
  		});
  		// valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome
  		Object.defineProperty(this, 'outcome', {
  			enumerable: true,
  			get: () => this.__data.outcome,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				this.__data.outcome = value;
  			},
  		});
  
  		Object.defineProperty(this, '_disposition', {
  			enumerable: true,
  			get: () => this.__data._disposition,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Element = require('./element.js');
  				this.__data._disposition = new Element(value);
  			},
  		});
  
  		Object.defineProperty(this, 'disposition', {
  			enumerable: true,
  			get: () => this.__data.disposition,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				this.__data.disposition = value;
  			},
  		});
  		// valueSetReference: http://hl7.org/fhir/ValueSet/ruleset
  		Object.defineProperty(this, 'ruleset', {
  			enumerable: true,
  			get: () => this.__data.ruleset,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Coding = require('./coding.js');
  				this.__data.ruleset = new Coding(value);
  			},
  		});
  		// valueSetReference: http://hl7.org/fhir/ValueSet/ruleset
  		Object.defineProperty(this, 'originalRuleset', {
  			enumerable: true,
  			get: () => this.__data.originalRuleset,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Coding = require('./coding.js');
  				this.__data.originalRuleset = new Coding(value);
  			},
  		});
  
  		Object.defineProperty(this, '_created', {
  			enumerable: true,
  			get: () => this.__data._created,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Element = require('./element.js');
  				this.__data._created = new Element(value);
  			},
  		});
  
  		Object.defineProperty(this, 'created', {
  			enumerable: true,
  			get: () => this.__data.created,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				this.__data.created = 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);
  			},
  		});
  
  		Object.defineProperty(this, 'organization', {
  			enumerable: true,
  			get: () => this.__data.organization,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Reference = require('./reference.js');
  				this.__data.organization = new Reference(value);
  			},
  		});
  
  		Object.defineProperty(this, 'requestProvider', {
  			enumerable: true,
  			get: () => this.__data.requestProvider,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Reference = require('./reference.js');
  				this.__data.requestProvider = new Reference(value);
  			},
  		});
  
  		Object.defineProperty(this, 'requestOrganization', {
  			enumerable: true,
  			get: () => this.__data.requestOrganization,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Reference = require('./reference.js');
  				this.__data.requestOrganization = new Reference(value);
  			},
  		});
  
  		Object.defineProperty(this, 'detail', {
  			enumerable: true,
  			get: () => this.__data.detail,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let PaymentReconciliationDetail = require('./paymentreconciliationdetail.js');
  				this.__data.detail = Array.isArray(value)
  					? value.map(v => new PaymentReconciliationDetail(v))
  					: [new PaymentReconciliationDetail(value)];
  			},
  		});
  		// valueSetReference: http://hl7.org/fhir/ValueSet/forms
  		Object.defineProperty(this, 'form', {
  			enumerable: true,
  			get: () => this.__data.form,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Coding = require('./coding.js');
  				this.__data.form = new Coding(value);
  			},
  		});
  
  		Object.defineProperty(this, 'total', {
  			enumerable: true,
  			get: () => this.__data.total,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let Quantity = require('./quantity.js');
  				this.__data.total = new Quantity(value);
  			},
  		});
  
  		Object.defineProperty(this, 'note', {
  			enumerable: true,
  			get: () => this.__data.note,
  			set: value => {
  				if (value === undefined || value === null) {
  					return;
  				}
  
  				let PaymentReconciliationNote = require('./paymentreconciliationnote.js');
  				this.__data.note = Array.isArray(value)
  					? value.map(v => new PaymentReconciliationNote(v))
  					: [new PaymentReconciliationNote(value)];
  			},
  		});
  
  		// Merge in any defaults
  		Object.assign(this, opts);
  
  		// Define a default non-writable resourceType property
  		Object.defineProperty(this, 'resourceType', {
  			value: 'PaymentReconciliation',
  			enumerable: true,
  			writable: false,
  		});
  	}
  
  	static get resourceType() {
  		return 'PaymentReconciliation';
  	}
  
  	toJSON() {
  		return {
  			resourceType: this.resourceType,
  			_id: this._id && this._id.toJSON(),
  			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()),
  			request: this.request && this.request.toJSON(),
  			_outcome: this._outcome && this._outcome.toJSON(),
  			outcome: this.outcome,
  			_disposition: this._disposition && this._disposition.toJSON(),
  			disposition: this.disposition,
  			ruleset: this.ruleset && this.ruleset.toJSON(),
  			originalRuleset: this.originalRuleset && this.originalRuleset.toJSON(),
  			_created: this._created && this._created.toJSON(),
  			created: this.created,
  			period: this.period && this.period.toJSON(),
  			organization: this.organization && this.organization.toJSON(),
  			requestProvider: this.requestProvider && this.requestProvider.toJSON(),
  			requestOrganization: this.requestOrganization && this.requestOrganization.toJSON(),
  			detail: this.detail && this.detail.map(v => v.toJSON()),
  			form: this.form && this.form.toJSON(),
  			total: this.total && this.total.toJSON(),
  			note: this.note && this.note.map(v => v.toJSON()),
  		};
  	}
  };
  