fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
116 lines (115 loc) • 3.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BundleRequest = 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 BundleRequest BackboneElement
* @property {BundleEntryRequestMethodType} method
* @property {IElement} _method
* @property {string} url
* @property {IElement} _url
* @property {string} ifNoneMatch
* @property {IElement} _ifNoneMatch
* @property {string} ifModifiedSince
* @property {IElement} _ifModifiedSince
* @property {string} ifMatch
* @property {IElement} _ifMatch
* @property {string} ifNoneExist
* @property {IElement} _ifNoneExist
* @author Roberto Araneda Espinoza
*/
class BundleRequest extends base_1.BackboneElement {
/**
* @description In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.
GET | HEAD | POST | PUT | DELETE | PATCH.
*/
method;
/**
* @description Extensions for method
*/
_method;
/**
* @description The URL for this entry, relative to the root (the address to which the request is posted).
*/
url;
/**
* @description Extensions for url
*/
_url;
/**
* @description If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread).
*/
ifNoneMatch;
/**
* @description Extensions for ifNoneMatch
*/
_ifNoneMatch;
/**
* @description Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).
*/
ifModifiedSince;
/**
* @description Extensions for ifModifiedSince
*/
_ifModifiedSince;
/**
* @description Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).
*/
ifMatch;
/**
* @description Extensions for ifMatch
*/
_ifMatch;
/**
* @description Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").
*/
ifNoneExist;
/**
* @description Extensions for ifNoneExist
*/
_ifNoneExist;
/**
* @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 `BundleRequest${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `BundleRequest${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)('BundleRequest', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.BundleRequest = BundleRequest;