UNPKG

fhirbuilder

Version:
100 lines (99 loc) 3.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BundleResponse = 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 BundleResponse BackboneElement * @property {string} status * @property {IElement} _status * @property {string} location * @property {IElement} _location * @property {string} etag * @property {IElement} _etag * @property {string} lastModified * @property {IElement} _lastModified * @property {IResource & Record<string, any>} outcome * @author Roberto Araneda Espinoza */ class BundleResponse extends base_1.BackboneElement { /** * @description The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. */ status; /** * @description Extensions for status */ _status; /** * @description The location header created by processing this operation, populated if the operation returns a location. */ location; /** * @description Extensions for location */ _location; /** * @description The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)). */ etag; /** * @description Extensions for etag */ _etag; /** * @description The date/time that the resource was modified on the server. */ lastModified; /** * @description Extensions for lastModified */ _lastModified; /** * @description An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. */ outcome; /** * @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 `BundleResponse${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `BundleResponse${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)('BundleResponse', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.BundleResponse = BundleResponse;