UNPKG

fhirbuilder

Version:
75 lines (74 loc) 2.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BundleLink = void 0; const base_1 = require("../base"); const base_2 = require("../../../core/r4/validators/base"); /** * @version R4 (v4.0.1) * @summary FHIR® Specification by HL7® * @description Class for BundleLink BackboneElement * @property {string} relation * @property {IElement} _relation * @property {string} url * @property {IElement} _url * @author Roberto Araneda Espinoza */ class BundleLink extends base_1.BackboneElement { /** * @description A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1). */ relation; /** * @description Extensions for relation */ _relation; /** * @description The reference details for the link. */ url; /** * @description Extensions for url */ _url; /** * @description Returns a JSON representation of the model * @returns {Record<string, any>} */ toJson() { return JSON.parse(JSON.stringify(this)); } /** * @description Returns a string representation of the model * @returns {string} */ toString() { return `BundleLink${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `BundleLink${JSON.stringify(this.toJson(), null, 2)}`; } /** * @description Returns a serialized string representation of the model * @returns {string} */ serialize() { return JSON.stringify(this.toJson()); } /** * @description Validates the model * @returns {isValid: boolean, operationOutcome: IOperationOutcome} */ validate() { return (0, base_2.ConformanceValidator)('BundleLink', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.BundleLink = BundleLink;