/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const EMPTY="";var Issue=function(msg,id){this.msg=msg!==undefined?msg:EMPTY;if(id){this.setId(id)}};Issue.prototype.setMsg=function(msg){this.msg=typeof msg==="string"?msg:EMPTY;return this};Issue.prototype.setMsgEx=function(obj){if(obj){this._msgEx=obj}return this};Issue.prototype.setId=function(id){this.msgId=id||"0000";return this};Issue.prototype.setMsgKey=function(key){this.msgKey=key;return this};Issue.prototype.setPosition=function(arg,col,startIndex,endIndex){var line;if(arg&&typeof arg==="object"){if(arg.hasOwnProperty("startIndex")){startIndex=arg.startIndex}else if(arg.hasOwnProperty("start")){startIndex=arg.start}if(arg.hasOwnProperty("endIndex")){endIndex=arg.endIndex}else if(arg.hasOwnProperty("end")){endIndex=arg.end}if(arg.hasOwnProperty("line")){line=arg.line}else if(arg.hasOwnProperty("row")){line=arg.row}col=arg.col}else{line=arg}if(line!==null&&col!==null){this.index={line:line,col:col}}if(startIndex!==undefined){if(!this.index){this.index={}}this.index.start=startIndex;this.index.end=endIndex}return this};Issue.prototype.setSeverity=function(severity){if(severity){this.severity=severity}return this};Issue.prototype.setReportedFilePath=function(fp){this.filepath=fp};module.exports=Issue;