UNPKG

@dasch-swiss/dsp-js

Version:
111 lines 4.69 kB
import { __decorate, __metadata } from "tslib"; import { JsonObject, JsonProperty } from 'json2typescript'; import { Constants } from '../../../Constants'; import { DateTimeStampConverter } from '../../../custom-converters/date-time-stamp-converter'; import { IdConverter } from '../../../custom-converters/id-converter'; import { UriConverter } from '../../../custom-converters/uri-converter'; import { BaseValue } from '../base-value'; /** * @category Model V2 */ let ReadValue = class ReadValue extends BaseValue { /** * @category Internal * @param id the id of the value. * @param type the type of the value. * @param attachedToUser the user the value is attached to. * @param arkUrl the value's persistent URL. * @param versionArkUrl the value's persistent URL for this version. * @param valueCreationDate the value's date of creation. * @param hasPermissions the permission set for the value. * @param userHasPermission the current user's permissions on the value. * @param uuid the value's UUID. * @param propertyLabel the label of the value's property. * @param propertyComment the comment of the value's property. * @param property the property pointing to the value. * @param strval the value's string representation, if any. * @param valueHasComment the comment on the value, if any. */ constructor(id, type, attachedToUser, arkUrl, versionArkUrl, valueCreationDate, hasPermissions, userHasPermission, uuid, propertyLabel, propertyComment, property, strval, valueHasComment) { super(); this.id = ''; this.attachedToUser = ''; this.arkUrl = ''; this.versionArkUrl = ''; this.valueCreationDate = ''; this.hasPermissions = ''; this.userHasPermission = ''; this.uuid = ''; this.valueHasComment = undefined; if (id !== undefined) this.id = id; if (type !== undefined) this.type = type; if (attachedToUser !== undefined) this.attachedToUser = attachedToUser; if (arkUrl !== undefined) this.arkUrl = arkUrl; if (versionArkUrl !== undefined) this.versionArkUrl = versionArkUrl; if (valueCreationDate !== undefined) this.valueCreationDate = valueCreationDate; if (hasPermissions !== undefined) this.hasPermissions = hasPermissions; if (userHasPermission !== undefined) this.userHasPermission = userHasPermission; if (uuid !== undefined) this.uuid = uuid; if (propertyLabel !== undefined) this.propertyLabel = propertyLabel; if (propertyComment !== undefined) this.propertyComment = propertyLabel; if (property !== undefined) this.property = property; if (strval !== undefined) this.strval = strval; if (valueHasComment !== undefined) this.valueHasComment = valueHasComment; } }; __decorate([ JsonProperty('@id', String), __metadata("design:type", Object) ], ReadValue.prototype, "id", void 0); __decorate([ JsonProperty(Constants.AttachedToUser, IdConverter), __metadata("design:type", Object) ], ReadValue.prototype, "attachedToUser", void 0); __decorate([ JsonProperty(Constants.ArkUrl, UriConverter), __metadata("design:type", Object) ], ReadValue.prototype, "arkUrl", void 0); __decorate([ JsonProperty(Constants.VersionArkUrl, UriConverter), __metadata("design:type", Object) ], ReadValue.prototype, "versionArkUrl", void 0); __decorate([ JsonProperty(Constants.ValueCreationDate, DateTimeStampConverter), __metadata("design:type", Object) ], ReadValue.prototype, "valueCreationDate", void 0); __decorate([ JsonProperty(Constants.HasPermissions, String), __metadata("design:type", Object) ], ReadValue.prototype, "hasPermissions", void 0); __decorate([ JsonProperty(Constants.UserHasPermission, String), __metadata("design:type", Object) ], ReadValue.prototype, "userHasPermission", void 0); __decorate([ JsonProperty(Constants.ValueHasUUID, String), __metadata("design:type", Object) ], ReadValue.prototype, "uuid", void 0); __decorate([ JsonProperty(Constants.ValueHasComment, String, true), __metadata("design:type", String) ], ReadValue.prototype, "valueHasComment", void 0); ReadValue = __decorate([ JsonObject('ReadValue'), __metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String, String, String, String, String]) ], ReadValue); export { ReadValue }; //# sourceMappingURL=read-value.js.map