diff --git a/.gitignore b/.gitignore index 37a60eb..b3588cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -src/gen/java/se .idea out .okhttpcache @@ -18,4 +17,3 @@ codeclimate.json *.received.txt *.DS_Store .vscode* -src/gen/java diff --git a/README.md b/README.md index 49ff273..5afd173 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ A number of **parsers** have been implemented. Some **parsers** can parse output | [_CloudFormation Linter_](https://github.com/aws-cloudformation/cfn-lint) | `JUNIT` | `cfn-lint . -f junit --output-file report-junit.xml` | [_CodeClimate_](https://codeclimate.com/) | `CODECLIMATE` | | [_CodeNarc_](http://codenarc.sourceforge.net/) | `CODENARC` | -| [_Coverity_](https://scan.coverity.com/) | `COVERITY` | | [_Dart_](https://dart.dev/) | `MACHINE` | With `dart analyze --format=machine` | [_Dependency Check_](https://jeremylong.github.io/DependencyCheck/) | `SARIF` | Using `--format SARIF` | [_Detekt_](https://github.com/arturbosch/detekt) | `CHECKSTYLE` | With `--output-format xml`. @@ -90,7 +89,7 @@ A number of **parsers** have been implemented. Some **parsers** can parse output | [_YAMLLint_](https://yamllint.readthedocs.io/en/stable/index.html) | `YAMLLINT` | With `-f parsable` | [_ZPTLint_](https://pypi.python.org/pypi/zptlint) | `ZPTLINT` | -52 parsers and 79 reporters. +51 parsers and 78 reporters. Missing a format? Open an issue [here](https://github.com/tomasbjerre/violations-lib/issues)! diff --git a/build.gradle b/build.gradle index 58f377f..5e308f1 100644 --- a/build.gradle +++ b/build.gradle @@ -28,12 +28,13 @@ apply from: project.buildscript.classLoader.getResource('main.gradle').toURI() apply plugin: 'jsonschema2pojo' +// A bit ugly: https://github.com/joelittlejohn/jsonschema2pojo/issues/1594 [ - [ - removeOldOutput: true, - from: "${rootDir}/src/main/resources/json/sarif-schema.json", - to: "se.bjurr.violations.lib.model.generated.sarif" - ], +// [ +// removeOldOutput: true, +// from: "${rootDir}/src/main/resources/json/sarif-schema.json", +// to: "se.bjurr.violations.lib.model.generated.sarif" +// ], [ removeOldOutput: false, from: "${rootDir}/src/main/resources/json/coverity-schema.json", @@ -53,10 +54,6 @@ apply plugin: 'jsonschema2pojo' } } -spotlessJava.dependsOn generateJsonSchema2Pojo -sourcesJar.dependsOn generateJsonSchema2Pojo -javadocJar.dependsOn generateJsonSchema2Pojo - dependencies { api 'com.google.code.gson:gson:2.10.1' diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CheckerProperty.java b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CheckerProperty.java new file mode 100644 index 0000000..45aa8e1 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CheckerProperty.java @@ -0,0 +1,251 @@ + +package se.bjurr.violations.lib.model.generated.coverity; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class CheckerProperty { + + private String category; + private String categoryDescription; + private String cweCategory; + private List issueKinds = new ArrayList(); + private List eventSetCaptions = new ArrayList(); + private String impact; + private String impactDescription; + private String subcategoryLocalEffect; + private String subcategoryShortDescription; + private String subcategoryLongDescription; + private Map additionalProperties = new LinkedHashMap(); + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public CheckerProperty withCategory(String category) { + this.category = category; + return this; + } + + public String getCategoryDescription() { + return categoryDescription; + } + + public void setCategoryDescription(String categoryDescription) { + this.categoryDescription = categoryDescription; + } + + public CheckerProperty withCategoryDescription(String categoryDescription) { + this.categoryDescription = categoryDescription; + return this; + } + + public String getCweCategory() { + return cweCategory; + } + + public void setCweCategory(String cweCategory) { + this.cweCategory = cweCategory; + } + + public CheckerProperty withCweCategory(String cweCategory) { + this.cweCategory = cweCategory; + return this; + } + + public List getIssueKinds() { + return issueKinds; + } + + public void setIssueKinds(List issueKinds) { + this.issueKinds = issueKinds; + } + + public CheckerProperty withIssueKinds(List issueKinds) { + this.issueKinds = issueKinds; + return this; + } + + public List getEventSetCaptions() { + return eventSetCaptions; + } + + public void setEventSetCaptions(List eventSetCaptions) { + this.eventSetCaptions = eventSetCaptions; + } + + public CheckerProperty withEventSetCaptions(List eventSetCaptions) { + this.eventSetCaptions = eventSetCaptions; + return this; + } + + public String getImpact() { + return impact; + } + + public void setImpact(String impact) { + this.impact = impact; + } + + public CheckerProperty withImpact(String impact) { + this.impact = impact; + return this; + } + + public String getImpactDescription() { + return impactDescription; + } + + public void setImpactDescription(String impactDescription) { + this.impactDescription = impactDescription; + } + + public CheckerProperty withImpactDescription(String impactDescription) { + this.impactDescription = impactDescription; + return this; + } + + public String getSubcategoryLocalEffect() { + return subcategoryLocalEffect; + } + + public void setSubcategoryLocalEffect(String subcategoryLocalEffect) { + this.subcategoryLocalEffect = subcategoryLocalEffect; + } + + public CheckerProperty withSubcategoryLocalEffect(String subcategoryLocalEffect) { + this.subcategoryLocalEffect = subcategoryLocalEffect; + return this; + } + + public String getSubcategoryShortDescription() { + return subcategoryShortDescription; + } + + public void setSubcategoryShortDescription(String subcategoryShortDescription) { + this.subcategoryShortDescription = subcategoryShortDescription; + } + + public CheckerProperty withSubcategoryShortDescription(String subcategoryShortDescription) { + this.subcategoryShortDescription = subcategoryShortDescription; + return this; + } + + public String getSubcategoryLongDescription() { + return subcategoryLongDescription; + } + + public void setSubcategoryLongDescription(String subcategoryLongDescription) { + this.subcategoryLongDescription = subcategoryLongDescription; + } + + public CheckerProperty withSubcategoryLongDescription(String subcategoryLongDescription) { + this.subcategoryLongDescription = subcategoryLongDescription; + return this; + } + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public CheckerProperty withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CheckerProperty.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("category"); + sb.append('='); + sb.append(((this.category == null)?"":this.category)); + sb.append(','); + sb.append("categoryDescription"); + sb.append('='); + sb.append(((this.categoryDescription == null)?"":this.categoryDescription)); + sb.append(','); + sb.append("cweCategory"); + sb.append('='); + sb.append(((this.cweCategory == null)?"":this.cweCategory)); + sb.append(','); + sb.append("issueKinds"); + sb.append('='); + sb.append(((this.issueKinds == null)?"":this.issueKinds)); + sb.append(','); + sb.append("eventSetCaptions"); + sb.append('='); + sb.append(((this.eventSetCaptions == null)?"":this.eventSetCaptions)); + sb.append(','); + sb.append("impact"); + sb.append('='); + sb.append(((this.impact == null)?"":this.impact)); + sb.append(','); + sb.append("impactDescription"); + sb.append('='); + sb.append(((this.impactDescription == null)?"":this.impactDescription)); + sb.append(','); + sb.append("subcategoryLocalEffect"); + sb.append('='); + sb.append(((this.subcategoryLocalEffect == null)?"":this.subcategoryLocalEffect)); + sb.append(','); + sb.append("subcategoryShortDescription"); + sb.append('='); + sb.append(((this.subcategoryShortDescription == null)?"":this.subcategoryShortDescription)); + sb.append(','); + sb.append("subcategoryLongDescription"); + sb.append('='); + sb.append(((this.subcategoryLongDescription == null)?"":this.subcategoryLongDescription)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.subcategoryShortDescription == null)? 0 :this.subcategoryShortDescription.hashCode())); + result = ((result* 31)+((this.subcategoryLongDescription == null)? 0 :this.subcategoryLongDescription.hashCode())); + result = ((result* 31)+((this.impact == null)? 0 :this.impact.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.category == null)? 0 :this.category.hashCode())); + result = ((result* 31)+((this.subcategoryLocalEffect == null)? 0 :this.subcategoryLocalEffect.hashCode())); + result = ((result* 31)+((this.cweCategory == null)? 0 :this.cweCategory.hashCode())); + result = ((result* 31)+((this.eventSetCaptions == null)? 0 :this.eventSetCaptions.hashCode())); + result = ((result* 31)+((this.categoryDescription == null)? 0 :this.categoryDescription.hashCode())); + result = ((result* 31)+((this.issueKinds == null)? 0 :this.issueKinds.hashCode())); + result = ((result* 31)+((this.impactDescription == null)? 0 :this.impactDescription.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CheckerProperty) == false) { + return false; + } + CheckerProperty rhs = ((CheckerProperty) other); + return ((((((((((((this.subcategoryShortDescription == rhs.subcategoryShortDescription)||((this.subcategoryShortDescription!= null)&&this.subcategoryShortDescription.equals(rhs.subcategoryShortDescription)))&&((this.subcategoryLongDescription == rhs.subcategoryLongDescription)||((this.subcategoryLongDescription!= null)&&this.subcategoryLongDescription.equals(rhs.subcategoryLongDescription))))&&((this.impact == rhs.impact)||((this.impact!= null)&&this.impact.equals(rhs.impact))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.category == rhs.category)||((this.category!= null)&&this.category.equals(rhs.category))))&&((this.subcategoryLocalEffect == rhs.subcategoryLocalEffect)||((this.subcategoryLocalEffect!= null)&&this.subcategoryLocalEffect.equals(rhs.subcategoryLocalEffect))))&&((this.cweCategory == rhs.cweCategory)||((this.cweCategory!= null)&&this.cweCategory.equals(rhs.cweCategory))))&&((this.eventSetCaptions == rhs.eventSetCaptions)||((this.eventSetCaptions!= null)&&this.eventSetCaptions.equals(rhs.eventSetCaptions))))&&((this.categoryDescription == rhs.categoryDescription)||((this.categoryDescription!= null)&&this.categoryDescription.equals(rhs.categoryDescription))))&&((this.issueKinds == rhs.issueKinds)||((this.issueKinds!= null)&&this.issueKinds.equals(rhs.issueKinds))))&&((this.impactDescription == rhs.impactDescription)||((this.impactDescription!= null)&&this.impactDescription.equals(rhs.impactDescription)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CoveritySchema.java b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CoveritySchema.java new file mode 100644 index 0000000..ef3c39e --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/CoveritySchema.java @@ -0,0 +1,194 @@ + +package se.bjurr.violations.lib.model.generated.coverity; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class CoveritySchema { + + private String type; + private Integer formatVersion; + private Integer suppressedIssueCount; + private List issues = new ArrayList(); + private Object desktopAnalysisSettings; + private Object error; + private List warnings = new ArrayList(); + private Map additionalProperties = new LinkedHashMap(); + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public CoveritySchema withType(String type) { + this.type = type; + return this; + } + + public Integer getFormatVersion() { + return formatVersion; + } + + public void setFormatVersion(Integer formatVersion) { + this.formatVersion = formatVersion; + } + + public CoveritySchema withFormatVersion(Integer formatVersion) { + this.formatVersion = formatVersion; + return this; + } + + public Integer getSuppressedIssueCount() { + return suppressedIssueCount; + } + + public void setSuppressedIssueCount(Integer suppressedIssueCount) { + this.suppressedIssueCount = suppressedIssueCount; + } + + public CoveritySchema withSuppressedIssueCount(Integer suppressedIssueCount) { + this.suppressedIssueCount = suppressedIssueCount; + return this; + } + + public List getIssues() { + return issues; + } + + public void setIssues(List issues) { + this.issues = issues; + } + + public CoveritySchema withIssues(List issues) { + this.issues = issues; + return this; + } + + public Object getDesktopAnalysisSettings() { + return desktopAnalysisSettings; + } + + public void setDesktopAnalysisSettings(Object desktopAnalysisSettings) { + this.desktopAnalysisSettings = desktopAnalysisSettings; + } + + public CoveritySchema withDesktopAnalysisSettings(Object desktopAnalysisSettings) { + this.desktopAnalysisSettings = desktopAnalysisSettings; + return this; + } + + public Object getError() { + return error; + } + + public void setError(Object error) { + this.error = error; + } + + public CoveritySchema withError(Object error) { + this.error = error; + return this; + } + + public List getWarnings() { + return warnings; + } + + public void setWarnings(List warnings) { + this.warnings = warnings; + } + + public CoveritySchema withWarnings(List warnings) { + this.warnings = warnings; + return this; + } + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public CoveritySchema withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CoveritySchema.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("formatVersion"); + sb.append('='); + sb.append(((this.formatVersion == null)?"":this.formatVersion)); + sb.append(','); + sb.append("suppressedIssueCount"); + sb.append('='); + sb.append(((this.suppressedIssueCount == null)?"":this.suppressedIssueCount)); + sb.append(','); + sb.append("issues"); + sb.append('='); + sb.append(((this.issues == null)?"":this.issues)); + sb.append(','); + sb.append("desktopAnalysisSettings"); + sb.append('='); + sb.append(((this.desktopAnalysisSettings == null)?"":this.desktopAnalysisSettings)); + sb.append(','); + sb.append("error"); + sb.append('='); + sb.append(((this.error == null)?"":this.error)); + sb.append(','); + sb.append("warnings"); + sb.append('='); + sb.append(((this.warnings == null)?"":this.warnings)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.warnings == null)? 0 :this.warnings.hashCode())); + result = ((result* 31)+((this.suppressedIssueCount == null)? 0 :this.suppressedIssueCount.hashCode())); + result = ((result* 31)+((this.desktopAnalysisSettings == null)? 0 :this.desktopAnalysisSettings.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + result = ((result* 31)+((this.error == null)? 0 :this.error.hashCode())); + result = ((result* 31)+((this.formatVersion == null)? 0 :this.formatVersion.hashCode())); + result = ((result* 31)+((this.issues == null)? 0 :this.issues.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CoveritySchema) == false) { + return false; + } + CoveritySchema rhs = ((CoveritySchema) other); + return (((((((((this.warnings == rhs.warnings)||((this.warnings!= null)&&this.warnings.equals(rhs.warnings)))&&((this.suppressedIssueCount == rhs.suppressedIssueCount)||((this.suppressedIssueCount!= null)&&this.suppressedIssueCount.equals(rhs.suppressedIssueCount))))&&((this.desktopAnalysisSettings == rhs.desktopAnalysisSettings)||((this.desktopAnalysisSettings!= null)&&this.desktopAnalysisSettings.equals(rhs.desktopAnalysisSettings))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.error == rhs.error)||((this.error!= null)&&this.error.equals(rhs.error))))&&((this.formatVersion == rhs.formatVersion)||((this.formatVersion!= null)&&this.formatVersion.equals(rhs.formatVersion))))&&((this.issues == rhs.issues)||((this.issues!= null)&&this.issues.equals(rhs.issues)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Event.java b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Event.java new file mode 100644 index 0000000..c19e4f9 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Event.java @@ -0,0 +1,306 @@ + +package se.bjurr.violations.lib.model.generated.coverity; + +import java.util.LinkedHashMap; +import java.util.Map; + +public class Event { + + private String covLStrEventDescription; + private String eventDescription; + private Integer eventNumber; + private String eventTreePosition; + private Integer eventSet; + private String eventTag; + private String filePathname; + private String strippedFilePathname; + private Integer lineNumber; + private Boolean main; + private Object moreInformationId; + private Boolean remediation; + private Object events; + private Map additionalProperties = new LinkedHashMap(); + + public String getCovLStrEventDescription() { + return covLStrEventDescription; + } + + public void setCovLStrEventDescription(String covLStrEventDescription) { + this.covLStrEventDescription = covLStrEventDescription; + } + + public Event withCovLStrEventDescription(String covLStrEventDescription) { + this.covLStrEventDescription = covLStrEventDescription; + return this; + } + + public String getEventDescription() { + return eventDescription; + } + + public void setEventDescription(String eventDescription) { + this.eventDescription = eventDescription; + } + + public Event withEventDescription(String eventDescription) { + this.eventDescription = eventDescription; + return this; + } + + public Integer getEventNumber() { + return eventNumber; + } + + public void setEventNumber(Integer eventNumber) { + this.eventNumber = eventNumber; + } + + public Event withEventNumber(Integer eventNumber) { + this.eventNumber = eventNumber; + return this; + } + + public String getEventTreePosition() { + return eventTreePosition; + } + + public void setEventTreePosition(String eventTreePosition) { + this.eventTreePosition = eventTreePosition; + } + + public Event withEventTreePosition(String eventTreePosition) { + this.eventTreePosition = eventTreePosition; + return this; + } + + public Integer getEventSet() { + return eventSet; + } + + public void setEventSet(Integer eventSet) { + this.eventSet = eventSet; + } + + public Event withEventSet(Integer eventSet) { + this.eventSet = eventSet; + return this; + } + + public String getEventTag() { + return eventTag; + } + + public void setEventTag(String eventTag) { + this.eventTag = eventTag; + } + + public Event withEventTag(String eventTag) { + this.eventTag = eventTag; + return this; + } + + public String getFilePathname() { + return filePathname; + } + + public void setFilePathname(String filePathname) { + this.filePathname = filePathname; + } + + public Event withFilePathname(String filePathname) { + this.filePathname = filePathname; + return this; + } + + public String getStrippedFilePathname() { + return strippedFilePathname; + } + + public void setStrippedFilePathname(String strippedFilePathname) { + this.strippedFilePathname = strippedFilePathname; + } + + public Event withStrippedFilePathname(String strippedFilePathname) { + this.strippedFilePathname = strippedFilePathname; + return this; + } + + public Integer getLineNumber() { + return lineNumber; + } + + public void setLineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + } + + public Event withLineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + public Boolean getMain() { + return main; + } + + public void setMain(Boolean main) { + this.main = main; + } + + public Event withMain(Boolean main) { + this.main = main; + return this; + } + + public Object getMoreInformationId() { + return moreInformationId; + } + + public void setMoreInformationId(Object moreInformationId) { + this.moreInformationId = moreInformationId; + } + + public Event withMoreInformationId(Object moreInformationId) { + this.moreInformationId = moreInformationId; + return this; + } + + public Boolean getRemediation() { + return remediation; + } + + public void setRemediation(Boolean remediation) { + this.remediation = remediation; + } + + public Event withRemediation(Boolean remediation) { + this.remediation = remediation; + return this; + } + + public Object getEvents() { + return events; + } + + public void setEvents(Object events) { + this.events = events; + } + + public Event withEvents(Object events) { + this.events = events; + return this; + } + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public Event withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Event.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("covLStrEventDescription"); + sb.append('='); + sb.append(((this.covLStrEventDescription == null)?"":this.covLStrEventDescription)); + sb.append(','); + sb.append("eventDescription"); + sb.append('='); + sb.append(((this.eventDescription == null)?"":this.eventDescription)); + sb.append(','); + sb.append("eventNumber"); + sb.append('='); + sb.append(((this.eventNumber == null)?"":this.eventNumber)); + sb.append(','); + sb.append("eventTreePosition"); + sb.append('='); + sb.append(((this.eventTreePosition == null)?"":this.eventTreePosition)); + sb.append(','); + sb.append("eventSet"); + sb.append('='); + sb.append(((this.eventSet == null)?"":this.eventSet)); + sb.append(','); + sb.append("eventTag"); + sb.append('='); + sb.append(((this.eventTag == null)?"":this.eventTag)); + sb.append(','); + sb.append("filePathname"); + sb.append('='); + sb.append(((this.filePathname == null)?"":this.filePathname)); + sb.append(','); + sb.append("strippedFilePathname"); + sb.append('='); + sb.append(((this.strippedFilePathname == null)?"":this.strippedFilePathname)); + sb.append(','); + sb.append("lineNumber"); + sb.append('='); + sb.append(((this.lineNumber == null)?"":this.lineNumber)); + sb.append(','); + sb.append("main"); + sb.append('='); + sb.append(((this.main == null)?"":this.main)); + sb.append(','); + sb.append("moreInformationId"); + sb.append('='); + sb.append(((this.moreInformationId == null)?"":this.moreInformationId)); + sb.append(','); + sb.append("remediation"); + sb.append('='); + sb.append(((this.remediation == null)?"":this.remediation)); + sb.append(','); + sb.append("events"); + sb.append('='); + sb.append(((this.events == null)?"":this.events)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.covLStrEventDescription == null)? 0 :this.covLStrEventDescription.hashCode())); + result = ((result* 31)+((this.eventTreePosition == null)? 0 :this.eventTreePosition.hashCode())); + result = ((result* 31)+((this.eventNumber == null)? 0 :this.eventNumber.hashCode())); + result = ((result* 31)+((this.filePathname == null)? 0 :this.filePathname.hashCode())); + result = ((result* 31)+((this.moreInformationId == null)? 0 :this.moreInformationId.hashCode())); + result = ((result* 31)+((this.main == null)? 0 :this.main.hashCode())); + result = ((result* 31)+((this.remediation == null)? 0 :this.remediation.hashCode())); + result = ((result* 31)+((this.eventTag == null)? 0 :this.eventTag.hashCode())); + result = ((result* 31)+((this.eventDescription == null)? 0 :this.eventDescription.hashCode())); + result = ((result* 31)+((this.eventSet == null)? 0 :this.eventSet.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.lineNumber == null)? 0 :this.lineNumber.hashCode())); + result = ((result* 31)+((this.strippedFilePathname == null)? 0 :this.strippedFilePathname.hashCode())); + result = ((result* 31)+((this.events == null)? 0 :this.events.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Event) == false) { + return false; + } + Event rhs = ((Event) other); + return (((((((((((((((this.covLStrEventDescription == rhs.covLStrEventDescription)||((this.covLStrEventDescription!= null)&&this.covLStrEventDescription.equals(rhs.covLStrEventDescription)))&&((this.eventTreePosition == rhs.eventTreePosition)||((this.eventTreePosition!= null)&&this.eventTreePosition.equals(rhs.eventTreePosition))))&&((this.eventNumber == rhs.eventNumber)||((this.eventNumber!= null)&&this.eventNumber.equals(rhs.eventNumber))))&&((this.filePathname == rhs.filePathname)||((this.filePathname!= null)&&this.filePathname.equals(rhs.filePathname))))&&((this.moreInformationId == rhs.moreInformationId)||((this.moreInformationId!= null)&&this.moreInformationId.equals(rhs.moreInformationId))))&&((this.main == rhs.main)||((this.main!= null)&&this.main.equals(rhs.main))))&&((this.remediation == rhs.remediation)||((this.remediation!= null)&&this.remediation.equals(rhs.remediation))))&&((this.eventTag == rhs.eventTag)||((this.eventTag!= null)&&this.eventTag.equals(rhs.eventTag))))&&((this.eventDescription == rhs.eventDescription)||((this.eventDescription!= null)&&this.eventDescription.equals(rhs.eventDescription))))&&((this.eventSet == rhs.eventSet)||((this.eventSet!= null)&&this.eventSet.equals(rhs.eventSet))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.lineNumber == rhs.lineNumber)||((this.lineNumber!= null)&&this.lineNumber.equals(rhs.lineNumber))))&&((this.strippedFilePathname == rhs.strippedFilePathname)||((this.strippedFilePathname!= null)&&this.strippedFilePathname.equals(rhs.strippedFilePathname))))&&((this.events == rhs.events)||((this.events!= null)&&this.events.equals(rhs.events)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Issue.java b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Issue.java new file mode 100644 index 0000000..2be41ab --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Issue.java @@ -0,0 +1,498 @@ + +package se.bjurr.violations.lib.model.generated.coverity; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class Issue { + + private String mergeKey; + private Integer occurrenceCountForMK; + private Integer occurrenceNumberInMK; + private Object referenceOccurrenceCountForMK; + private String checkerName; + private String subcategory; + private String type; + private String subtype; + private String codeLanguage; + private String extra; + private String domain; + private String language; + private String mainEventFilePathname; + private String strippedMainEventFilePathname; + private Integer mainEventLineNumber; + private Properties properties; + private String functionDisplayName; + private String functionMangledName; + private Object localStatus; + private Boolean ordered; + private Object stateOnServer; + private List events = new ArrayList(); + private CheckerProperty checkerProperties; + private Map additionalProperties = new LinkedHashMap(); + + public String getMergeKey() { + return mergeKey; + } + + public void setMergeKey(String mergeKey) { + this.mergeKey = mergeKey; + } + + public Issue withMergeKey(String mergeKey) { + this.mergeKey = mergeKey; + return this; + } + + public Integer getOccurrenceCountForMK() { + return occurrenceCountForMK; + } + + public void setOccurrenceCountForMK(Integer occurrenceCountForMK) { + this.occurrenceCountForMK = occurrenceCountForMK; + } + + public Issue withOccurrenceCountForMK(Integer occurrenceCountForMK) { + this.occurrenceCountForMK = occurrenceCountForMK; + return this; + } + + public Integer getOccurrenceNumberInMK() { + return occurrenceNumberInMK; + } + + public void setOccurrenceNumberInMK(Integer occurrenceNumberInMK) { + this.occurrenceNumberInMK = occurrenceNumberInMK; + } + + public Issue withOccurrenceNumberInMK(Integer occurrenceNumberInMK) { + this.occurrenceNumberInMK = occurrenceNumberInMK; + return this; + } + + public Object getReferenceOccurrenceCountForMK() { + return referenceOccurrenceCountForMK; + } + + public void setReferenceOccurrenceCountForMK(Object referenceOccurrenceCountForMK) { + this.referenceOccurrenceCountForMK = referenceOccurrenceCountForMK; + } + + public Issue withReferenceOccurrenceCountForMK(Object referenceOccurrenceCountForMK) { + this.referenceOccurrenceCountForMK = referenceOccurrenceCountForMK; + return this; + } + + public String getCheckerName() { + return checkerName; + } + + public void setCheckerName(String checkerName) { + this.checkerName = checkerName; + } + + public Issue withCheckerName(String checkerName) { + this.checkerName = checkerName; + return this; + } + + public String getSubcategory() { + return subcategory; + } + + public void setSubcategory(String subcategory) { + this.subcategory = subcategory; + } + + public Issue withSubcategory(String subcategory) { + this.subcategory = subcategory; + return this; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Issue withType(String type) { + this.type = type; + return this; + } + + public String getSubtype() { + return subtype; + } + + public void setSubtype(String subtype) { + this.subtype = subtype; + } + + public Issue withSubtype(String subtype) { + this.subtype = subtype; + return this; + } + + public String getCodeLanguage() { + return codeLanguage; + } + + public void setCodeLanguage(String codeLanguage) { + this.codeLanguage = codeLanguage; + } + + public Issue withCodeLanguage(String codeLanguage) { + this.codeLanguage = codeLanguage; + return this; + } + + public String getExtra() { + return extra; + } + + public void setExtra(String extra) { + this.extra = extra; + } + + public Issue withExtra(String extra) { + this.extra = extra; + return this; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public Issue withDomain(String domain) { + this.domain = domain; + return this; + } + + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public Issue withLanguage(String language) { + this.language = language; + return this; + } + + public String getMainEventFilePathname() { + return mainEventFilePathname; + } + + public void setMainEventFilePathname(String mainEventFilePathname) { + this.mainEventFilePathname = mainEventFilePathname; + } + + public Issue withMainEventFilePathname(String mainEventFilePathname) { + this.mainEventFilePathname = mainEventFilePathname; + return this; + } + + public String getStrippedMainEventFilePathname() { + return strippedMainEventFilePathname; + } + + public void setStrippedMainEventFilePathname(String strippedMainEventFilePathname) { + this.strippedMainEventFilePathname = strippedMainEventFilePathname; + } + + public Issue withStrippedMainEventFilePathname(String strippedMainEventFilePathname) { + this.strippedMainEventFilePathname = strippedMainEventFilePathname; + return this; + } + + public Integer getMainEventLineNumber() { + return mainEventLineNumber; + } + + public void setMainEventLineNumber(Integer mainEventLineNumber) { + this.mainEventLineNumber = mainEventLineNumber; + } + + public Issue withMainEventLineNumber(Integer mainEventLineNumber) { + this.mainEventLineNumber = mainEventLineNumber; + return this; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public Issue withProperties(Properties properties) { + this.properties = properties; + return this; + } + + public String getFunctionDisplayName() { + return functionDisplayName; + } + + public void setFunctionDisplayName(String functionDisplayName) { + this.functionDisplayName = functionDisplayName; + } + + public Issue withFunctionDisplayName(String functionDisplayName) { + this.functionDisplayName = functionDisplayName; + return this; + } + + public String getFunctionMangledName() { + return functionMangledName; + } + + public void setFunctionMangledName(String functionMangledName) { + this.functionMangledName = functionMangledName; + } + + public Issue withFunctionMangledName(String functionMangledName) { + this.functionMangledName = functionMangledName; + return this; + } + + public Object getLocalStatus() { + return localStatus; + } + + public void setLocalStatus(Object localStatus) { + this.localStatus = localStatus; + } + + public Issue withLocalStatus(Object localStatus) { + this.localStatus = localStatus; + return this; + } + + public Boolean getOrdered() { + return ordered; + } + + public void setOrdered(Boolean ordered) { + this.ordered = ordered; + } + + public Issue withOrdered(Boolean ordered) { + this.ordered = ordered; + return this; + } + + public Object getStateOnServer() { + return stateOnServer; + } + + public void setStateOnServer(Object stateOnServer) { + this.stateOnServer = stateOnServer; + } + + public Issue withStateOnServer(Object stateOnServer) { + this.stateOnServer = stateOnServer; + return this; + } + + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public Issue withEvents(List events) { + this.events = events; + return this; + } + + public CheckerProperty getCheckerProperties() { + return checkerProperties; + } + + public void setCheckerProperties(CheckerProperty checkerProperties) { + this.checkerProperties = checkerProperties; + } + + public Issue withCheckerProperties(CheckerProperty checkerProperties) { + this.checkerProperties = checkerProperties; + return this; + } + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public Issue withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Issue.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("mergeKey"); + sb.append('='); + sb.append(((this.mergeKey == null)?"":this.mergeKey)); + sb.append(','); + sb.append("occurrenceCountForMK"); + sb.append('='); + sb.append(((this.occurrenceCountForMK == null)?"":this.occurrenceCountForMK)); + sb.append(','); + sb.append("occurrenceNumberInMK"); + sb.append('='); + sb.append(((this.occurrenceNumberInMK == null)?"":this.occurrenceNumberInMK)); + sb.append(','); + sb.append("referenceOccurrenceCountForMK"); + sb.append('='); + sb.append(((this.referenceOccurrenceCountForMK == null)?"":this.referenceOccurrenceCountForMK)); + sb.append(','); + sb.append("checkerName"); + sb.append('='); + sb.append(((this.checkerName == null)?"":this.checkerName)); + sb.append(','); + sb.append("subcategory"); + sb.append('='); + sb.append(((this.subcategory == null)?"":this.subcategory)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("subtype"); + sb.append('='); + sb.append(((this.subtype == null)?"":this.subtype)); + sb.append(','); + sb.append("codeLanguage"); + sb.append('='); + sb.append(((this.codeLanguage == null)?"":this.codeLanguage)); + sb.append(','); + sb.append("extra"); + sb.append('='); + sb.append(((this.extra == null)?"":this.extra)); + sb.append(','); + sb.append("domain"); + sb.append('='); + sb.append(((this.domain == null)?"":this.domain)); + sb.append(','); + sb.append("language"); + sb.append('='); + sb.append(((this.language == null)?"":this.language)); + sb.append(','); + sb.append("mainEventFilePathname"); + sb.append('='); + sb.append(((this.mainEventFilePathname == null)?"":this.mainEventFilePathname)); + sb.append(','); + sb.append("strippedMainEventFilePathname"); + sb.append('='); + sb.append(((this.strippedMainEventFilePathname == null)?"":this.strippedMainEventFilePathname)); + sb.append(','); + sb.append("mainEventLineNumber"); + sb.append('='); + sb.append(((this.mainEventLineNumber == null)?"":this.mainEventLineNumber)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + sb.append("functionDisplayName"); + sb.append('='); + sb.append(((this.functionDisplayName == null)?"":this.functionDisplayName)); + sb.append(','); + sb.append("functionMangledName"); + sb.append('='); + sb.append(((this.functionMangledName == null)?"":this.functionMangledName)); + sb.append(','); + sb.append("localStatus"); + sb.append('='); + sb.append(((this.localStatus == null)?"":this.localStatus)); + sb.append(','); + sb.append("ordered"); + sb.append('='); + sb.append(((this.ordered == null)?"":this.ordered)); + sb.append(','); + sb.append("stateOnServer"); + sb.append('='); + sb.append(((this.stateOnServer == null)?"":this.stateOnServer)); + sb.append(','); + sb.append("events"); + sb.append('='); + sb.append(((this.events == null)?"":this.events)); + sb.append(','); + sb.append("checkerProperties"); + sb.append('='); + sb.append(((this.checkerProperties == null)?"":this.checkerProperties)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.language == null)? 0 :this.language.hashCode())); + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + result = ((result* 31)+((this.localStatus == null)? 0 :this.localStatus.hashCode())); + result = ((result* 31)+((this.checkerProperties == null)? 0 :this.checkerProperties.hashCode())); + result = ((result* 31)+((this.subtype == null)? 0 :this.subtype.hashCode())); + result = ((result* 31)+((this.mainEventFilePathname == null)? 0 :this.mainEventFilePathname.hashCode())); + result = ((result* 31)+((this.extra == null)? 0 :this.extra.hashCode())); + result = ((result* 31)+((this.codeLanguage == null)? 0 :this.codeLanguage.hashCode())); + result = ((result* 31)+((this.events == null)? 0 :this.events.hashCode())); + result = ((result* 31)+((this.mergeKey == null)? 0 :this.mergeKey.hashCode())); + result = ((result* 31)+((this.ordered == null)? 0 :this.ordered.hashCode())); + result = ((result* 31)+((this.strippedMainEventFilePathname == null)? 0 :this.strippedMainEventFilePathname.hashCode())); + result = ((result* 31)+((this.functionDisplayName == null)? 0 :this.functionDisplayName.hashCode())); + result = ((result* 31)+((this.stateOnServer == null)? 0 :this.stateOnServer.hashCode())); + result = ((result* 31)+((this.referenceOccurrenceCountForMK == null)? 0 :this.referenceOccurrenceCountForMK.hashCode())); + result = ((result* 31)+((this.functionMangledName == null)? 0 :this.functionMangledName.hashCode())); + result = ((result* 31)+((this.occurrenceNumberInMK == null)? 0 :this.occurrenceNumberInMK.hashCode())); + result = ((result* 31)+((this.occurrenceCountForMK == null)? 0 :this.occurrenceCountForMK.hashCode())); + result = ((result* 31)+((this.domain == null)? 0 :this.domain.hashCode())); + result = ((result* 31)+((this.checkerName == null)? 0 :this.checkerName.hashCode())); + result = ((result* 31)+((this.mainEventLineNumber == null)? 0 :this.mainEventLineNumber.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.subcategory == null)? 0 :this.subcategory.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Issue) == false) { + return false; + } + Issue rhs = ((Issue) other); + return (((((((((((((((((((((((((this.language == rhs.language)||((this.language!= null)&&this.language.equals(rhs.language)))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.localStatus == rhs.localStatus)||((this.localStatus!= null)&&this.localStatus.equals(rhs.localStatus))))&&((this.checkerProperties == rhs.checkerProperties)||((this.checkerProperties!= null)&&this.checkerProperties.equals(rhs.checkerProperties))))&&((this.subtype == rhs.subtype)||((this.subtype!= null)&&this.subtype.equals(rhs.subtype))))&&((this.mainEventFilePathname == rhs.mainEventFilePathname)||((this.mainEventFilePathname!= null)&&this.mainEventFilePathname.equals(rhs.mainEventFilePathname))))&&((this.extra == rhs.extra)||((this.extra!= null)&&this.extra.equals(rhs.extra))))&&((this.codeLanguage == rhs.codeLanguage)||((this.codeLanguage!= null)&&this.codeLanguage.equals(rhs.codeLanguage))))&&((this.events == rhs.events)||((this.events!= null)&&this.events.equals(rhs.events))))&&((this.mergeKey == rhs.mergeKey)||((this.mergeKey!= null)&&this.mergeKey.equals(rhs.mergeKey))))&&((this.ordered == rhs.ordered)||((this.ordered!= null)&&this.ordered.equals(rhs.ordered))))&&((this.strippedMainEventFilePathname == rhs.strippedMainEventFilePathname)||((this.strippedMainEventFilePathname!= null)&&this.strippedMainEventFilePathname.equals(rhs.strippedMainEventFilePathname))))&&((this.functionDisplayName == rhs.functionDisplayName)||((this.functionDisplayName!= null)&&this.functionDisplayName.equals(rhs.functionDisplayName))))&&((this.stateOnServer == rhs.stateOnServer)||((this.stateOnServer!= null)&&this.stateOnServer.equals(rhs.stateOnServer))))&&((this.referenceOccurrenceCountForMK == rhs.referenceOccurrenceCountForMK)||((this.referenceOccurrenceCountForMK!= null)&&this.referenceOccurrenceCountForMK.equals(rhs.referenceOccurrenceCountForMK))))&&((this.functionMangledName == rhs.functionMangledName)||((this.functionMangledName!= null)&&this.functionMangledName.equals(rhs.functionMangledName))))&&((this.occurrenceNumberInMK == rhs.occurrenceNumberInMK)||((this.occurrenceNumberInMK!= null)&&this.occurrenceNumberInMK.equals(rhs.occurrenceNumberInMK))))&&((this.occurrenceCountForMK == rhs.occurrenceCountForMK)||((this.occurrenceCountForMK!= null)&&this.occurrenceCountForMK.equals(rhs.occurrenceCountForMK))))&&((this.domain == rhs.domain)||((this.domain!= null)&&this.domain.equals(rhs.domain))))&&((this.checkerName == rhs.checkerName)||((this.checkerName!= null)&&this.checkerName.equals(rhs.checkerName))))&&((this.mainEventLineNumber == rhs.mainEventLineNumber)||((this.mainEventLineNumber!= null)&&this.mainEventLineNumber.equals(rhs.mainEventLineNumber))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.subcategory == rhs.subcategory)||((this.subcategory!= null)&&this.subcategory.equals(rhs.subcategory))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Properties.java b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Properties.java new file mode 100644 index 0000000..04f0251 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/coverity/Properties.java @@ -0,0 +1,59 @@ + +package se.bjurr.violations.lib.model.generated.coverity; + +import java.util.LinkedHashMap; +import java.util.Map; + +public class Properties { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public Properties withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Properties.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Properties) == false) { + return false; + } + Properties rhs = ((Properties) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Address.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Address.java new file mode 100644 index 0000000..1694409 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Address.java @@ -0,0 +1,353 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file). + * + */ +public class Address { + + /** + * The address expressed as a byte offset from the start of the addressable region. + * + */ + private Integer absoluteAddress = -1; + /** + * The address expressed as a byte offset from the absolute address of the top-most parent object. + * + */ + private Integer relativeAddress; + /** + * The number of bytes in this range of addresses. + * + */ + private Integer length; + /** + * An open-ended string that identifies the address kind. 'data', 'function', 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', 'table' are well-known values. + * + */ + private String kind; + /** + * A name that is associated with the address, e.g., '.text'. + * + */ + private String name; + /** + * A human-readable fully qualified name that is associated with the address. + * + */ + private String fullyQualifiedName; + /** + * The byte offset of this address from the absolute or relative address of the parent object. + * + */ + private Integer offsetFromParent; + /** + * The index within run.addresses of the cached object for this address. + * + */ + private Integer index = -1; + /** + * The index within run.addresses of the parent object. + * + */ + private Integer parentIndex = -1; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The address expressed as a byte offset from the start of the addressable region. + * + */ + public Integer getAbsoluteAddress() { + return absoluteAddress; + } + + /** + * The address expressed as a byte offset from the start of the addressable region. + * + */ + public void setAbsoluteAddress(Integer absoluteAddress) { + this.absoluteAddress = absoluteAddress; + } + + public Address withAbsoluteAddress(Integer absoluteAddress) { + this.absoluteAddress = absoluteAddress; + return this; + } + + /** + * The address expressed as a byte offset from the absolute address of the top-most parent object. + * + */ + public Integer getRelativeAddress() { + return relativeAddress; + } + + /** + * The address expressed as a byte offset from the absolute address of the top-most parent object. + * + */ + public void setRelativeAddress(Integer relativeAddress) { + this.relativeAddress = relativeAddress; + } + + public Address withRelativeAddress(Integer relativeAddress) { + this.relativeAddress = relativeAddress; + return this; + } + + /** + * The number of bytes in this range of addresses. + * + */ + public Integer getLength() { + return length; + } + + /** + * The number of bytes in this range of addresses. + * + */ + public void setLength(Integer length) { + this.length = length; + } + + public Address withLength(Integer length) { + this.length = length; + return this; + } + + /** + * An open-ended string that identifies the address kind. 'data', 'function', 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', 'table' are well-known values. + * + */ + public String getKind() { + return kind; + } + + /** + * An open-ended string that identifies the address kind. 'data', 'function', 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', 'table' are well-known values. + * + */ + public void setKind(String kind) { + this.kind = kind; + } + + public Address withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * A name that is associated with the address, e.g., '.text'. + * + */ + public String getName() { + return name; + } + + /** + * A name that is associated with the address, e.g., '.text'. + * + */ + public void setName(String name) { + this.name = name; + } + + public Address withName(String name) { + this.name = name; + return this; + } + + /** + * A human-readable fully qualified name that is associated with the address. + * + */ + public String getFullyQualifiedName() { + return fullyQualifiedName; + } + + /** + * A human-readable fully qualified name that is associated with the address. + * + */ + public void setFullyQualifiedName(String fullyQualifiedName) { + this.fullyQualifiedName = fullyQualifiedName; + } + + public Address withFullyQualifiedName(String fullyQualifiedName) { + this.fullyQualifiedName = fullyQualifiedName; + return this; + } + + /** + * The byte offset of this address from the absolute or relative address of the parent object. + * + */ + public Integer getOffsetFromParent() { + return offsetFromParent; + } + + /** + * The byte offset of this address from the absolute or relative address of the parent object. + * + */ + public void setOffsetFromParent(Integer offsetFromParent) { + this.offsetFromParent = offsetFromParent; + } + + public Address withOffsetFromParent(Integer offsetFromParent) { + this.offsetFromParent = offsetFromParent; + return this; + } + + /** + * The index within run.addresses of the cached object for this address. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within run.addresses of the cached object for this address. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public Address withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * The index within run.addresses of the parent object. + * + */ + public Integer getParentIndex() { + return parentIndex; + } + + /** + * The index within run.addresses of the parent object. + * + */ + public void setParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + } + + public Address withParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Address withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Address.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("absoluteAddress"); + sb.append('='); + sb.append(((this.absoluteAddress == null)?"":this.absoluteAddress)); + sb.append(','); + sb.append("relativeAddress"); + sb.append('='); + sb.append(((this.relativeAddress == null)?"":this.relativeAddress)); + sb.append(','); + sb.append("length"); + sb.append('='); + sb.append(((this.length == null)?"":this.length)); + sb.append(','); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("fullyQualifiedName"); + sb.append('='); + sb.append(((this.fullyQualifiedName == null)?"":this.fullyQualifiedName)); + sb.append(','); + sb.append("offsetFromParent"); + sb.append('='); + sb.append(((this.offsetFromParent == null)?"":this.offsetFromParent)); + sb.append(','); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("parentIndex"); + sb.append('='); + sb.append(((this.parentIndex == null)?"":this.parentIndex)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.offsetFromParent == null)? 0 :this.offsetFromParent.hashCode())); + result = ((result* 31)+((this.parentIndex == null)? 0 :this.parentIndex.hashCode())); + result = ((result* 31)+((this.relativeAddress == null)? 0 :this.relativeAddress.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.length == null)? 0 :this.length.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.fullyQualifiedName == null)? 0 :this.fullyQualifiedName.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.absoluteAddress == null)? 0 :this.absoluteAddress.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Address) == false) { + return false; + } + Address rhs = ((Address) other); + return (((((((((((this.offsetFromParent == rhs.offsetFromParent)||((this.offsetFromParent!= null)&&this.offsetFromParent.equals(rhs.offsetFromParent)))&&((this.parentIndex == rhs.parentIndex)||((this.parentIndex!= null)&&this.parentIndex.equals(rhs.parentIndex))))&&((this.relativeAddress == rhs.relativeAddress)||((this.relativeAddress!= null)&&this.relativeAddress.equals(rhs.relativeAddress))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.length == rhs.length)||((this.length!= null)&&this.length.equals(rhs.length))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.fullyQualifiedName == rhs.fullyQualifiedName)||((this.fullyQualifiedName!= null)&&this.fullyQualifiedName.equals(rhs.fullyQualifiedName))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.absoluteAddress == rhs.absoluteAddress)||((this.absoluteAddress!= null)&&this.absoluteAddress.equals(rhs.absoluteAddress)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Artifact.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Artifact.java new file mode 100644 index 0000000..7f02fff --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Artifact.java @@ -0,0 +1,449 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Date; +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * A single artifact. In some cases, this artifact might be nested within another artifact. + * + */ +public class Artifact { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation location; + /** + * Identifies the index of the immediate parent of the artifact, if this artifact is nested. + * + */ + private Integer parentIndex = -1; + /** + * The offset in bytes of the artifact within its containing artifact. + * + */ + private Integer offset; + /** + * The length of the artifact in bytes. + * + */ + private Integer length = -1; + /** + * The role or roles played by the artifact in the analysis. + * + */ + private Set roles = new LinkedHashSet(); + /** + * The MIME type (RFC 2045) of the artifact. + * + */ + private String mimeType; + /** + * Represents the contents of an artifact. + * + */ + private ArtifactContent contents; + /** + * Specifies the encoding for an artifact object that refers to a text file. + * + */ + private String encoding; + /** + * Specifies the source language for any artifact object that refers to a text file that contains source code. + * + */ + private String sourceLanguage; + /** + * A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function. + * + */ + private Hashes hashes; + /** + * The Coordinated Universal Time (UTC) date and time at which the artifact was most recently modified. See "Date/time properties" in the SARIF spec for the required format. + * + */ + private Date lastModifiedTimeUtc; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public Artifact withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getLocation() { + return location; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setLocation(ArtifactLocation location) { + this.location = location; + } + + public Artifact withLocation(ArtifactLocation location) { + this.location = location; + return this; + } + + /** + * Identifies the index of the immediate parent of the artifact, if this artifact is nested. + * + */ + public Integer getParentIndex() { + return parentIndex; + } + + /** + * Identifies the index of the immediate parent of the artifact, if this artifact is nested. + * + */ + public void setParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + } + + public Artifact withParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + return this; + } + + /** + * The offset in bytes of the artifact within its containing artifact. + * + */ + public Integer getOffset() { + return offset; + } + + /** + * The offset in bytes of the artifact within its containing artifact. + * + */ + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Artifact withOffset(Integer offset) { + this.offset = offset; + return this; + } + + /** + * The length of the artifact in bytes. + * + */ + public Integer getLength() { + return length; + } + + /** + * The length of the artifact in bytes. + * + */ + public void setLength(Integer length) { + this.length = length; + } + + public Artifact withLength(Integer length) { + this.length = length; + return this; + } + + /** + * The role or roles played by the artifact in the analysis. + * + */ + public Set getRoles() { + return roles; + } + + /** + * The role or roles played by the artifact in the analysis. + * + */ + public void setRoles(Set roles) { + this.roles = roles; + } + + public Artifact withRoles(Set roles) { + this.roles = roles; + return this; + } + + /** + * The MIME type (RFC 2045) of the artifact. + * + */ + public String getMimeType() { + return mimeType; + } + + /** + * The MIME type (RFC 2045) of the artifact. + * + */ + public void setMimeType(String mimeType) { + this.mimeType = mimeType; + } + + public Artifact withMimeType(String mimeType) { + this.mimeType = mimeType; + return this; + } + + /** + * Represents the contents of an artifact. + * + */ + public ArtifactContent getContents() { + return contents; + } + + /** + * Represents the contents of an artifact. + * + */ + public void setContents(ArtifactContent contents) { + this.contents = contents; + } + + public Artifact withContents(ArtifactContent contents) { + this.contents = contents; + return this; + } + + /** + * Specifies the encoding for an artifact object that refers to a text file. + * + */ + public String getEncoding() { + return encoding; + } + + /** + * Specifies the encoding for an artifact object that refers to a text file. + * + */ + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public Artifact withEncoding(String encoding) { + this.encoding = encoding; + return this; + } + + /** + * Specifies the source language for any artifact object that refers to a text file that contains source code. + * + */ + public String getSourceLanguage() { + return sourceLanguage; + } + + /** + * Specifies the source language for any artifact object that refers to a text file that contains source code. + * + */ + public void setSourceLanguage(String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + } + + public Artifact withSourceLanguage(String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + return this; + } + + /** + * A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function. + * + */ + public Hashes getHashes() { + return hashes; + } + + /** + * A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function. + * + */ + public void setHashes(Hashes hashes) { + this.hashes = hashes; + } + + public Artifact withHashes(Hashes hashes) { + this.hashes = hashes; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the artifact was most recently modified. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public Date getLastModifiedTimeUtc() { + return lastModifiedTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the artifact was most recently modified. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public void setLastModifiedTimeUtc(Date lastModifiedTimeUtc) { + this.lastModifiedTimeUtc = lastModifiedTimeUtc; + } + + public Artifact withLastModifiedTimeUtc(Date lastModifiedTimeUtc) { + this.lastModifiedTimeUtc = lastModifiedTimeUtc; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Artifact withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Artifact.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("parentIndex"); + sb.append('='); + sb.append(((this.parentIndex == null)?"":this.parentIndex)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("length"); + sb.append('='); + sb.append(((this.length == null)?"":this.length)); + sb.append(','); + sb.append("roles"); + sb.append('='); + sb.append(((this.roles == null)?"":this.roles)); + sb.append(','); + sb.append("mimeType"); + sb.append('='); + sb.append(((this.mimeType == null)?"":this.mimeType)); + sb.append(','); + sb.append("contents"); + sb.append('='); + sb.append(((this.contents == null)?"":this.contents)); + sb.append(','); + sb.append("encoding"); + sb.append('='); + sb.append(((this.encoding == null)?"":this.encoding)); + sb.append(','); + sb.append("sourceLanguage"); + sb.append('='); + sb.append(((this.sourceLanguage == null)?"":this.sourceLanguage)); + sb.append(','); + sb.append("hashes"); + sb.append('='); + sb.append(((this.hashes == null)?"":this.hashes)); + sb.append(','); + sb.append("lastModifiedTimeUtc"); + sb.append('='); + sb.append(((this.lastModifiedTimeUtc == null)?"":this.lastModifiedTimeUtc)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.parentIndex == null)? 0 :this.parentIndex.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + result = ((result* 31)+((this.roles == null)? 0 :this.roles.hashCode())); + result = ((result* 31)+((this.lastModifiedTimeUtc == null)? 0 :this.lastModifiedTimeUtc.hashCode())); + result = ((result* 31)+((this.length == null)? 0 :this.length.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.mimeType == null)? 0 :this.mimeType.hashCode())); + result = ((result* 31)+((this.encoding == null)? 0 :this.encoding.hashCode())); + result = ((result* 31)+((this.contents == null)? 0 :this.contents.hashCode())); + result = ((result* 31)+((this.hashes == null)? 0 :this.hashes.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.sourceLanguage == null)? 0 :this.sourceLanguage.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Artifact) == false) { + return false; + } + Artifact rhs = ((Artifact) other); + return ((((((((((((((this.parentIndex == rhs.parentIndex)||((this.parentIndex!= null)&&this.parentIndex.equals(rhs.parentIndex)))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.roles == rhs.roles)||((this.roles!= null)&&this.roles.equals(rhs.roles))))&&((this.lastModifiedTimeUtc == rhs.lastModifiedTimeUtc)||((this.lastModifiedTimeUtc!= null)&&this.lastModifiedTimeUtc.equals(rhs.lastModifiedTimeUtc))))&&((this.length == rhs.length)||((this.length!= null)&&this.length.equals(rhs.length))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.mimeType == rhs.mimeType)||((this.mimeType!= null)&&this.mimeType.equals(rhs.mimeType))))&&((this.encoding == rhs.encoding)||((this.encoding!= null)&&this.encoding.equals(rhs.encoding))))&&((this.contents == rhs.contents)||((this.contents!= null)&&this.contents.equals(rhs.contents))))&&((this.hashes == rhs.hashes)||((this.hashes!= null)&&this.hashes.equals(rhs.hashes))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.sourceLanguage == rhs.sourceLanguage)||((this.sourceLanguage!= null)&&this.sourceLanguage.equals(rhs.sourceLanguage))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactChange.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactChange.java new file mode 100644 index 0000000..7964ba7 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactChange.java @@ -0,0 +1,144 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * A change to a single artifact. + * + */ +public class ArtifactChange { + + /** + * Specifies the location of an artifact. + * (Required) + * + */ + private ArtifactLocation artifactLocation; + /** + * An array of replacement objects, each of which represents the replacement of a single region in a single artifact specified by 'artifactLocation'. + * (Required) + * + */ + private List replacements = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Specifies the location of an artifact. + * (Required) + * + */ + public ArtifactLocation getArtifactLocation() { + return artifactLocation; + } + + /** + * Specifies the location of an artifact. + * (Required) + * + */ + public void setArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + } + + public ArtifactChange withArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + return this; + } + + /** + * An array of replacement objects, each of which represents the replacement of a single region in a single artifact specified by 'artifactLocation'. + * (Required) + * + */ + public List getReplacements() { + return replacements; + } + + /** + * An array of replacement objects, each of which represents the replacement of a single region in a single artifact specified by 'artifactLocation'. + * (Required) + * + */ + public void setReplacements(List replacements) { + this.replacements = replacements; + } + + public ArtifactChange withReplacements(List replacements) { + this.replacements = replacements; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ArtifactChange withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ArtifactChange.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("artifactLocation"); + sb.append('='); + sb.append(((this.artifactLocation == null)?"":this.artifactLocation)); + sb.append(','); + sb.append("replacements"); + sb.append('='); + sb.append(((this.replacements == null)?"":this.replacements)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.replacements == null)? 0 :this.replacements.hashCode())); + result = ((result* 31)+((this.artifactLocation == null)? 0 :this.artifactLocation.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ArtifactChange) == false) { + return false; + } + ArtifactChange rhs = ((ArtifactChange) other); + return ((((this.replacements == rhs.replacements)||((this.replacements!= null)&&this.replacements.equals(rhs.replacements)))&&((this.artifactLocation == rhs.artifactLocation)||((this.artifactLocation!= null)&&this.artifactLocation.equals(rhs.artifactLocation))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactContent.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactContent.java new file mode 100644 index 0000000..83ad895 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactContent.java @@ -0,0 +1,167 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Represents the contents of an artifact. + * + */ +public class ArtifactContent { + + /** + * UTF-8-encoded content from a text artifact. + * + */ + private String text; + /** + * MIME Base64-encoded content from a binary artifact, or from a text artifact in its original encoding. + * + */ + private String binary; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString rendered; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * UTF-8-encoded content from a text artifact. + * + */ + public String getText() { + return text; + } + + /** + * UTF-8-encoded content from a text artifact. + * + */ + public void setText(String text) { + this.text = text; + } + + public ArtifactContent withText(String text) { + this.text = text; + return this; + } + + /** + * MIME Base64-encoded content from a binary artifact, or from a text artifact in its original encoding. + * + */ + public String getBinary() { + return binary; + } + + /** + * MIME Base64-encoded content from a binary artifact, or from a text artifact in its original encoding. + * + */ + public void setBinary(String binary) { + this.binary = binary; + } + + public ArtifactContent withBinary(String binary) { + this.binary = binary; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getRendered() { + return rendered; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setRendered(MultiformatMessageString rendered) { + this.rendered = rendered; + } + + public ArtifactContent withRendered(MultiformatMessageString rendered) { + this.rendered = rendered; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ArtifactContent withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ArtifactContent.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("text"); + sb.append('='); + sb.append(((this.text == null)?"":this.text)); + sb.append(','); + sb.append("binary"); + sb.append('='); + sb.append(((this.binary == null)?"":this.binary)); + sb.append(','); + sb.append("rendered"); + sb.append('='); + sb.append(((this.rendered == null)?"":this.rendered)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); + result = ((result* 31)+((this.rendered == null)? 0 :this.rendered.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.binary == null)? 0 :this.binary.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ArtifactContent) == false) { + return false; + } + ArtifactContent rhs = ((ArtifactContent) other); + return (((((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text)))&&((this.rendered == rhs.rendered)||((this.rendered!= null)&&this.rendered.equals(rhs.rendered))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.binary == rhs.binary)||((this.binary!= null)&&this.binary.equals(rhs.binary)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactLocation.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactLocation.java new file mode 100644 index 0000000..ad613e0 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ArtifactLocation.java @@ -0,0 +1,198 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Specifies the location of an artifact. + * + */ +public class ArtifactLocation { + + /** + * A string containing a valid relative or absolute URI. + * + */ + private String uri; + /** + * A string which indirectly specifies the absolute URI with respect to which a relative URI in the "uri" property is interpreted. + * + */ + private String uriBaseId; + /** + * The index within the run artifacts array of the artifact object associated with the artifact location. + * + */ + private Integer index = -1; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A string containing a valid relative or absolute URI. + * + */ + public String getUri() { + return uri; + } + + /** + * A string containing a valid relative or absolute URI. + * + */ + public void setUri(String uri) { + this.uri = uri; + } + + public ArtifactLocation withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * A string which indirectly specifies the absolute URI with respect to which a relative URI in the "uri" property is interpreted. + * + */ + public String getUriBaseId() { + return uriBaseId; + } + + /** + * A string which indirectly specifies the absolute URI with respect to which a relative URI in the "uri" property is interpreted. + * + */ + public void setUriBaseId(String uriBaseId) { + this.uriBaseId = uriBaseId; + } + + public ArtifactLocation withUriBaseId(String uriBaseId) { + this.uriBaseId = uriBaseId; + return this; + } + + /** + * The index within the run artifacts array of the artifact object associated with the artifact location. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within the run artifacts array of the artifact object associated with the artifact location. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public ArtifactLocation withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public ArtifactLocation withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ArtifactLocation withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ArtifactLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("uri"); + sb.append('='); + sb.append(((this.uri == null)?"":this.uri)); + sb.append(','); + sb.append("uriBaseId"); + sb.append('='); + sb.append(((this.uriBaseId == null)?"":this.uriBaseId)); + sb.append(','); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.uri == null)? 0 :this.uri.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.uriBaseId == null)? 0 :this.uriBaseId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ArtifactLocation) == false) { + return false; + } + ArtifactLocation rhs = ((ArtifactLocation) other); + return ((((((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.uri == rhs.uri)||((this.uri!= null)&&this.uri.equals(rhs.uri))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.uriBaseId == rhs.uriBaseId)||((this.uriBaseId!= null)&&this.uriBaseId.equals(rhs.uriBaseId)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Attachment.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Attachment.java new file mode 100644 index 0000000..9b12f58 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Attachment.java @@ -0,0 +1,203 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * An artifact relevant to a result. + * + */ +public class Attachment { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Specifies the location of an artifact. + * (Required) + * + */ + private ArtifactLocation artifactLocation; + /** + * An array of regions of interest within the attachment. + * + */ + private Set regions = new LinkedHashSet(); + /** + * An array of rectangles specifying areas of interest within the image. + * + */ + private Set rectangles = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public Attachment withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Specifies the location of an artifact. + * (Required) + * + */ + public ArtifactLocation getArtifactLocation() { + return artifactLocation; + } + + /** + * Specifies the location of an artifact. + * (Required) + * + */ + public void setArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + } + + public Attachment withArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + return this; + } + + /** + * An array of regions of interest within the attachment. + * + */ + public Set getRegions() { + return regions; + } + + /** + * An array of regions of interest within the attachment. + * + */ + public void setRegions(Set regions) { + this.regions = regions; + } + + public Attachment withRegions(Set regions) { + this.regions = regions; + return this; + } + + /** + * An array of rectangles specifying areas of interest within the image. + * + */ + public Set getRectangles() { + return rectangles; + } + + /** + * An array of rectangles specifying areas of interest within the image. + * + */ + public void setRectangles(Set rectangles) { + this.rectangles = rectangles; + } + + public Attachment withRectangles(Set rectangles) { + this.rectangles = rectangles; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Attachment withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Attachment.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("artifactLocation"); + sb.append('='); + sb.append(((this.artifactLocation == null)?"":this.artifactLocation)); + sb.append(','); + sb.append("regions"); + sb.append('='); + sb.append(((this.regions == null)?"":this.regions)); + sb.append(','); + sb.append("rectangles"); + sb.append('='); + sb.append(((this.rectangles == null)?"":this.rectangles)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.regions == null)? 0 :this.regions.hashCode())); + result = ((result* 31)+((this.rectangles == null)? 0 :this.rectangles.hashCode())); + result = ((result* 31)+((this.artifactLocation == null)? 0 :this.artifactLocation.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Attachment) == false) { + return false; + } + Attachment rhs = ((Attachment) other); + return ((((((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description)))&&((this.regions == rhs.regions)||((this.regions!= null)&&this.regions.equals(rhs.regions))))&&((this.rectangles == rhs.rectangles)||((this.rectangles!= null)&&this.rectangles.equals(rhs.rectangles))))&&((this.artifactLocation == rhs.artifactLocation)||((this.artifactLocation!= null)&&this.artifactLocation.equals(rhs.artifactLocation))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/CodeFlow.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/CodeFlow.java new file mode 100644 index 0000000..07fab25 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/CodeFlow.java @@ -0,0 +1,141 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * A set of threadFlows which together describe a pattern of code execution relevant to detecting a result. + * + */ +public class CodeFlow { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * An array of one or more unique threadFlow objects, each of which describes the progress of a program through a thread of execution. + * (Required) + * + */ + private List threadFlows = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public CodeFlow withMessage(Message message) { + this.message = message; + return this; + } + + /** + * An array of one or more unique threadFlow objects, each of which describes the progress of a program through a thread of execution. + * (Required) + * + */ + public List getThreadFlows() { + return threadFlows; + } + + /** + * An array of one or more unique threadFlow objects, each of which describes the progress of a program through a thread of execution. + * (Required) + * + */ + public void setThreadFlows(List threadFlows) { + this.threadFlows = threadFlows; + } + + public CodeFlow withThreadFlows(List threadFlows) { + this.threadFlows = threadFlows; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public CodeFlow withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CodeFlow.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("threadFlows"); + sb.append('='); + sb.append(((this.threadFlows == null)?"":this.threadFlows)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.threadFlows == null)? 0 :this.threadFlows.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CodeFlow) == false) { + return false; + } + CodeFlow rhs = ((CodeFlow) other); + return ((((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))&&((this.threadFlows == rhs.threadFlows)||((this.threadFlows!= null)&&this.threadFlows.equals(rhs.threadFlows))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ConfigurationOverride.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ConfigurationOverride.java new file mode 100644 index 0000000..c3b9597 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ConfigurationOverride.java @@ -0,0 +1,142 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Information about how a specific rule or notification was reconfigured at runtime. + * + */ +public class ConfigurationOverride { + + /** + * Information about a rule or notification that can be configured at runtime. + * (Required) + * + */ + private ReportingConfiguration configuration; + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + private ReportingDescriptorReference descriptor; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Information about a rule or notification that can be configured at runtime. + * (Required) + * + */ + public ReportingConfiguration getConfiguration() { + return configuration; + } + + /** + * Information about a rule or notification that can be configured at runtime. + * (Required) + * + */ + public void setConfiguration(ReportingConfiguration configuration) { + this.configuration = configuration; + } + + public ConfigurationOverride withConfiguration(ReportingConfiguration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + public ReportingDescriptorReference getDescriptor() { + return descriptor; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + public void setDescriptor(ReportingDescriptorReference descriptor) { + this.descriptor = descriptor; + } + + public ConfigurationOverride withDescriptor(ReportingDescriptorReference descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ConfigurationOverride withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ConfigurationOverride.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("configuration"); + sb.append('='); + sb.append(((this.configuration == null)?"":this.configuration)); + sb.append(','); + sb.append("descriptor"); + sb.append('='); + sb.append(((this.descriptor == null)?"":this.descriptor)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.descriptor == null)? 0 :this.descriptor.hashCode())); + result = ((result* 31)+((this.configuration == null)? 0 :this.configuration.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ConfigurationOverride) == false) { + return false; + } + ConfigurationOverride rhs = ((ConfigurationOverride) other); + return ((((this.descriptor == rhs.descriptor)||((this.descriptor!= null)&&this.descriptor.equals(rhs.descriptor)))&&((this.configuration == rhs.configuration)||((this.configuration!= null)&&this.configuration.equals(rhs.configuration))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Conversion.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Conversion.java new file mode 100644 index 0000000..18e5d19 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Conversion.java @@ -0,0 +1,172 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ +public class Conversion { + + /** + * The analysis tool that was run. + * (Required) + * + */ + private Tool tool; + /** + * The runtime environment of the analysis tool run. + * + */ + private Invocation invocation; + /** + * The locations of the analysis tool's per-run log files. + * + */ + private Set analysisToolLogFiles = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The analysis tool that was run. + * (Required) + * + */ + public Tool getTool() { + return tool; + } + + /** + * The analysis tool that was run. + * (Required) + * + */ + public void setTool(Tool tool) { + this.tool = tool; + } + + public Conversion withTool(Tool tool) { + this.tool = tool; + return this; + } + + /** + * The runtime environment of the analysis tool run. + * + */ + public Invocation getInvocation() { + return invocation; + } + + /** + * The runtime environment of the analysis tool run. + * + */ + public void setInvocation(Invocation invocation) { + this.invocation = invocation; + } + + public Conversion withInvocation(Invocation invocation) { + this.invocation = invocation; + return this; + } + + /** + * The locations of the analysis tool's per-run log files. + * + */ + public Set getAnalysisToolLogFiles() { + return analysisToolLogFiles; + } + + /** + * The locations of the analysis tool's per-run log files. + * + */ + public void setAnalysisToolLogFiles(Set analysisToolLogFiles) { + this.analysisToolLogFiles = analysisToolLogFiles; + } + + public Conversion withAnalysisToolLogFiles(Set analysisToolLogFiles) { + this.analysisToolLogFiles = analysisToolLogFiles; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Conversion withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Conversion.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("tool"); + sb.append('='); + sb.append(((this.tool == null)?"":this.tool)); + sb.append(','); + sb.append("invocation"); + sb.append('='); + sb.append(((this.invocation == null)?"":this.invocation)); + sb.append(','); + sb.append("analysisToolLogFiles"); + sb.append('='); + sb.append(((this.analysisToolLogFiles == null)?"":this.analysisToolLogFiles)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.invocation == null)? 0 :this.invocation.hashCode())); + result = ((result* 31)+((this.analysisToolLogFiles == null)? 0 :this.analysisToolLogFiles.hashCode())); + result = ((result* 31)+((this.tool == null)? 0 :this.tool.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Conversion) == false) { + return false; + } + Conversion rhs = ((Conversion) other); + return (((((this.invocation == rhs.invocation)||((this.invocation!= null)&&this.invocation.equals(rhs.invocation)))&&((this.analysisToolLogFiles == rhs.analysisToolLogFiles)||((this.analysisToolLogFiles!= null)&&this.analysisToolLogFiles.equals(rhs.analysisToolLogFiles))))&&((this.tool == rhs.tool)||((this.tool!= null)&&this.tool.equals(rhs.tool))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Edge.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Edge.java new file mode 100644 index 0000000..5bf42b4 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Edge.java @@ -0,0 +1,207 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Represents a directed edge in a graph. + * + */ +public class Edge { + + /** + * A string that uniquely identifies the edge within its graph. + * (Required) + * + */ + private String id; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message label; + /** + * Identifies the source node (the node at which the edge starts). + * (Required) + * + */ + private String sourceNodeId; + /** + * Identifies the target node (the node at which the edge ends). + * (Required) + * + */ + private String targetNodeId; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A string that uniquely identifies the edge within its graph. + * (Required) + * + */ + public String getId() { + return id; + } + + /** + * A string that uniquely identifies the edge within its graph. + * (Required) + * + */ + public void setId(String id) { + this.id = id; + } + + public Edge withId(String id) { + this.id = id; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getLabel() { + return label; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setLabel(Message label) { + this.label = label; + } + + public Edge withLabel(Message label) { + this.label = label; + return this; + } + + /** + * Identifies the source node (the node at which the edge starts). + * (Required) + * + */ + public String getSourceNodeId() { + return sourceNodeId; + } + + /** + * Identifies the source node (the node at which the edge starts). + * (Required) + * + */ + public void setSourceNodeId(String sourceNodeId) { + this.sourceNodeId = sourceNodeId; + } + + public Edge withSourceNodeId(String sourceNodeId) { + this.sourceNodeId = sourceNodeId; + return this; + } + + /** + * Identifies the target node (the node at which the edge ends). + * (Required) + * + */ + public String getTargetNodeId() { + return targetNodeId; + } + + /** + * Identifies the target node (the node at which the edge ends). + * (Required) + * + */ + public void setTargetNodeId(String targetNodeId) { + this.targetNodeId = targetNodeId; + } + + public Edge withTargetNodeId(String targetNodeId) { + this.targetNodeId = targetNodeId; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Edge withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Edge.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("sourceNodeId"); + sb.append('='); + sb.append(((this.sourceNodeId == null)?"":this.sourceNodeId)); + sb.append(','); + sb.append("targetNodeId"); + sb.append('='); + sb.append(((this.targetNodeId == null)?"":this.targetNodeId)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.targetNodeId == null)? 0 :this.targetNodeId.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.sourceNodeId == null)? 0 :this.sourceNodeId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Edge) == false) { + return false; + } + Edge rhs = ((Edge) other); + return ((((((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id)))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.targetNodeId == rhs.targetNodeId)||((this.targetNodeId!= null)&&this.targetNodeId.equals(rhs.targetNodeId))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.sourceNodeId == rhs.sourceNodeId)||((this.sourceNodeId!= null)&&this.sourceNodeId.equals(rhs.sourceNodeId)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EdgeTraversal.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EdgeTraversal.java new file mode 100644 index 0000000..a9c2f29 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EdgeTraversal.java @@ -0,0 +1,201 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Represents the traversal of a single edge during a graph traversal. + * + */ +public class EdgeTraversal { + + /** + * Identifies the edge being traversed. + * (Required) + * + */ + private String edgeId; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * The values of relevant expressions after the edge has been traversed. + * + */ + private FinalState finalState; + /** + * The number of edge traversals necessary to return from a nested graph. + * + */ + private Integer stepOverEdgeCount; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Identifies the edge being traversed. + * (Required) + * + */ + public String getEdgeId() { + return edgeId; + } + + /** + * Identifies the edge being traversed. + * (Required) + * + */ + public void setEdgeId(String edgeId) { + this.edgeId = edgeId; + } + + public EdgeTraversal withEdgeId(String edgeId) { + this.edgeId = edgeId; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public EdgeTraversal withMessage(Message message) { + this.message = message; + return this; + } + + /** + * The values of relevant expressions after the edge has been traversed. + * + */ + public FinalState getFinalState() { + return finalState; + } + + /** + * The values of relevant expressions after the edge has been traversed. + * + */ + public void setFinalState(FinalState finalState) { + this.finalState = finalState; + } + + public EdgeTraversal withFinalState(FinalState finalState) { + this.finalState = finalState; + return this; + } + + /** + * The number of edge traversals necessary to return from a nested graph. + * + */ + public Integer getStepOverEdgeCount() { + return stepOverEdgeCount; + } + + /** + * The number of edge traversals necessary to return from a nested graph. + * + */ + public void setStepOverEdgeCount(Integer stepOverEdgeCount) { + this.stepOverEdgeCount = stepOverEdgeCount; + } + + public EdgeTraversal withStepOverEdgeCount(Integer stepOverEdgeCount) { + this.stepOverEdgeCount = stepOverEdgeCount; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public EdgeTraversal withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(EdgeTraversal.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("edgeId"); + sb.append('='); + sb.append(((this.edgeId == null)?"":this.edgeId)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("finalState"); + sb.append('='); + sb.append(((this.finalState == null)?"":this.finalState)); + sb.append(','); + sb.append("stepOverEdgeCount"); + sb.append('='); + sb.append(((this.stepOverEdgeCount == null)?"":this.stepOverEdgeCount)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.edgeId == null)? 0 :this.edgeId.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.stepOverEdgeCount == null)? 0 :this.stepOverEdgeCount.hashCode())); + result = ((result* 31)+((this.finalState == null)? 0 :this.finalState.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof EdgeTraversal) == false) { + return false; + } + EdgeTraversal rhs = ((EdgeTraversal) other); + return ((((((this.edgeId == rhs.edgeId)||((this.edgeId!= null)&&this.edgeId.equals(rhs.edgeId)))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.stepOverEdgeCount == rhs.stepOverEdgeCount)||((this.stepOverEdgeCount!= null)&&this.stepOverEdgeCount.equals(rhs.stepOverEdgeCount))))&&((this.finalState == rhs.finalState)||((this.finalState!= null)&&this.finalState.equals(rhs.finalState))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EnvironmentVariables.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EnvironmentVariables.java new file mode 100644 index 0000000..1b92c3e --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/EnvironmentVariables.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The environment variables associated with the analysis tool process, expressed as key/value pairs. + * + */ +public class EnvironmentVariables { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public EnvironmentVariables withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(EnvironmentVariables.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof EnvironmentVariables) == false) { + return false; + } + EnvironmentVariables rhs = ((EnvironmentVariables) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Exception.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Exception.java new file mode 100644 index 0000000..bed1e3b --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Exception.java @@ -0,0 +1,200 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Describes a runtime exception encountered during the execution of an analysis tool. + * + */ +public class Exception { + + /** + * A string that identifies the kind of exception, for example, the fully qualified type name of an object that was thrown, or the symbolic name of a signal. + * + */ + private String kind; + /** + * A message that describes the exception. + * + */ + private String message; + /** + * A call stack that is relevant to a result. + * + */ + private Stack stack; + /** + * An array of exception objects each of which is considered a cause of this exception. + * + */ + private List innerExceptions = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A string that identifies the kind of exception, for example, the fully qualified type name of an object that was thrown, or the symbolic name of a signal. + * + */ + public String getKind() { + return kind; + } + + /** + * A string that identifies the kind of exception, for example, the fully qualified type name of an object that was thrown, or the symbolic name of a signal. + * + */ + public void setKind(String kind) { + this.kind = kind; + } + + public Exception withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * A message that describes the exception. + * + */ + public String getMessage() { + return message; + } + + /** + * A message that describes the exception. + * + */ + public void setMessage(String message) { + this.message = message; + } + + public Exception withMessage(String message) { + this.message = message; + return this; + } + + /** + * A call stack that is relevant to a result. + * + */ + public Stack getStack() { + return stack; + } + + /** + * A call stack that is relevant to a result. + * + */ + public void setStack(Stack stack) { + this.stack = stack; + } + + public Exception withStack(Stack stack) { + this.stack = stack; + return this; + } + + /** + * An array of exception objects each of which is considered a cause of this exception. + * + */ + public List getInnerExceptions() { + return innerExceptions; + } + + /** + * An array of exception objects each of which is considered a cause of this exception. + * + */ + public void setInnerExceptions(List innerExceptions) { + this.innerExceptions = innerExceptions; + } + + public Exception withInnerExceptions(List innerExceptions) { + this.innerExceptions = innerExceptions; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Exception withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Exception.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("stack"); + sb.append('='); + sb.append(((this.stack == null)?"":this.stack)); + sb.append(','); + sb.append("innerExceptions"); + sb.append('='); + sb.append(((this.innerExceptions == null)?"":this.innerExceptions)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.stack == null)? 0 :this.stack.hashCode())); + result = ((result* 31)+((this.innerExceptions == null)? 0 :this.innerExceptions.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Exception) == false) { + return false; + } + Exception rhs = ((Exception) other); + return ((((((this.stack == rhs.stack)||((this.stack!= null)&&this.stack.equals(rhs.stack)))&&((this.innerExceptions == rhs.innerExceptions)||((this.innerExceptions!= null)&&this.innerExceptions.equals(rhs.innerExceptions))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalProperties.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalProperties.java new file mode 100644 index 0000000..12c47dd --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalProperties.java @@ -0,0 +1,742 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * The top-level element of an external property file. + * + */ +public class ExternalProperties { + + /** + * The URI of the JSON schema corresponding to the version of the external property file format. + * + */ + private URI schema; + /** + * The SARIF format version of this external properties object. + * + */ + private ExternalProperties.Version version; + /** + * A stable, unique identifer for this external properties object, in the form of a GUID. + * + */ + private String guid; + /** + * A stable, unique identifer for the run associated with this external properties object, in the form of a GUID. + * + */ + private String runGuid; + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + private Conversion conversion; + /** + * An array of graph objects that will be merged with a separate run. + * + */ + private Set graphs = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag externalizedProperties; + /** + * An array of artifact objects that will be merged with a separate run. + * + */ + private Set artifacts = new LinkedHashSet(); + /** + * Describes the invocation of the analysis tool that will be merged with a separate run. + * + */ + private List invocations = new ArrayList(); + /** + * An array of logical locations such as namespaces, types or functions that will be merged with a separate run. + * + */ + private Set logicalLocations = new LinkedHashSet(); + /** + * An array of threadFlowLocation objects that will be merged with a separate run. + * + */ + private Set threadFlowLocations = new LinkedHashSet(); + /** + * An array of result objects that will be merged with a separate run. + * + */ + private List results = new ArrayList(); + /** + * Tool taxonomies that will be merged with a separate run. + * + */ + private Set taxonomies = new LinkedHashSet(); + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * + */ + private ToolComponent driver; + /** + * Tool extensions that will be merged with a separate run. + * + */ + private Set extensions = new LinkedHashSet(); + /** + * Tool policies that will be merged with a separate run. + * + */ + private Set policies = new LinkedHashSet(); + /** + * Tool translations that will be merged with a separate run. + * + */ + private Set translations = new LinkedHashSet(); + /** + * Addresses that will be merged with a separate run. + * + */ + private List
addresses = new ArrayList
(); + /** + * Requests that will be merged with a separate run. + * + */ + private Set webRequests = new LinkedHashSet(); + /** + * Responses that will be merged with a separate run. + * + */ + private Set webResponses = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The URI of the JSON schema corresponding to the version of the external property file format. + * + */ + public URI getSchema() { + return schema; + } + + /** + * The URI of the JSON schema corresponding to the version of the external property file format. + * + */ + public void setSchema(URI schema) { + this.schema = schema; + } + + public ExternalProperties withSchema(URI schema) { + this.schema = schema; + return this; + } + + /** + * The SARIF format version of this external properties object. + * + */ + public ExternalProperties.Version getVersion() { + return version; + } + + /** + * The SARIF format version of this external properties object. + * + */ + public void setVersion(ExternalProperties.Version version) { + this.version = version; + } + + public ExternalProperties withVersion(ExternalProperties.Version version) { + this.version = version; + return this; + } + + /** + * A stable, unique identifer for this external properties object, in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A stable, unique identifer for this external properties object, in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ExternalProperties withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * A stable, unique identifer for the run associated with this external properties object, in the form of a GUID. + * + */ + public String getRunGuid() { + return runGuid; + } + + /** + * A stable, unique identifer for the run associated with this external properties object, in the form of a GUID. + * + */ + public void setRunGuid(String runGuid) { + this.runGuid = runGuid; + } + + public ExternalProperties withRunGuid(String runGuid) { + this.runGuid = runGuid; + return this; + } + + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + public Conversion getConversion() { + return conversion; + } + + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + public void setConversion(Conversion conversion) { + this.conversion = conversion; + } + + public ExternalProperties withConversion(Conversion conversion) { + this.conversion = conversion; + return this; + } + + /** + * An array of graph objects that will be merged with a separate run. + * + */ + public Set getGraphs() { + return graphs; + } + + /** + * An array of graph objects that will be merged with a separate run. + * + */ + public void setGraphs(Set graphs) { + this.graphs = graphs; + } + + public ExternalProperties withGraphs(Set graphs) { + this.graphs = graphs; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getExternalizedProperties() { + return externalizedProperties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setExternalizedProperties(PropertyBag externalizedProperties) { + this.externalizedProperties = externalizedProperties; + } + + public ExternalProperties withExternalizedProperties(PropertyBag externalizedProperties) { + this.externalizedProperties = externalizedProperties; + return this; + } + + /** + * An array of artifact objects that will be merged with a separate run. + * + */ + public Set getArtifacts() { + return artifacts; + } + + /** + * An array of artifact objects that will be merged with a separate run. + * + */ + public void setArtifacts(Set artifacts) { + this.artifacts = artifacts; + } + + public ExternalProperties withArtifacts(Set artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * Describes the invocation of the analysis tool that will be merged with a separate run. + * + */ + public List getInvocations() { + return invocations; + } + + /** + * Describes the invocation of the analysis tool that will be merged with a separate run. + * + */ + public void setInvocations(List invocations) { + this.invocations = invocations; + } + + public ExternalProperties withInvocations(List invocations) { + this.invocations = invocations; + return this; + } + + /** + * An array of logical locations such as namespaces, types or functions that will be merged with a separate run. + * + */ + public Set getLogicalLocations() { + return logicalLocations; + } + + /** + * An array of logical locations such as namespaces, types or functions that will be merged with a separate run. + * + */ + public void setLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + } + + public ExternalProperties withLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + return this; + } + + /** + * An array of threadFlowLocation objects that will be merged with a separate run. + * + */ + public Set getThreadFlowLocations() { + return threadFlowLocations; + } + + /** + * An array of threadFlowLocation objects that will be merged with a separate run. + * + */ + public void setThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + } + + public ExternalProperties withThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + return this; + } + + /** + * An array of result objects that will be merged with a separate run. + * + */ + public List getResults() { + return results; + } + + /** + * An array of result objects that will be merged with a separate run. + * + */ + public void setResults(List results) { + this.results = results; + } + + public ExternalProperties withResults(List results) { + this.results = results; + return this; + } + + /** + * Tool taxonomies that will be merged with a separate run. + * + */ + public Set getTaxonomies() { + return taxonomies; + } + + /** + * Tool taxonomies that will be merged with a separate run. + * + */ + public void setTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + } + + public ExternalProperties withTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + return this; + } + + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * + */ + public ToolComponent getDriver() { + return driver; + } + + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * + */ + public void setDriver(ToolComponent driver) { + this.driver = driver; + } + + public ExternalProperties withDriver(ToolComponent driver) { + this.driver = driver; + return this; + } + + /** + * Tool extensions that will be merged with a separate run. + * + */ + public Set getExtensions() { + return extensions; + } + + /** + * Tool extensions that will be merged with a separate run. + * + */ + public void setExtensions(Set extensions) { + this.extensions = extensions; + } + + public ExternalProperties withExtensions(Set extensions) { + this.extensions = extensions; + return this; + } + + /** + * Tool policies that will be merged with a separate run. + * + */ + public Set getPolicies() { + return policies; + } + + /** + * Tool policies that will be merged with a separate run. + * + */ + public void setPolicies(Set policies) { + this.policies = policies; + } + + public ExternalProperties withPolicies(Set policies) { + this.policies = policies; + return this; + } + + /** + * Tool translations that will be merged with a separate run. + * + */ + public Set getTranslations() { + return translations; + } + + /** + * Tool translations that will be merged with a separate run. + * + */ + public void setTranslations(Set translations) { + this.translations = translations; + } + + public ExternalProperties withTranslations(Set translations) { + this.translations = translations; + return this; + } + + /** + * Addresses that will be merged with a separate run. + * + */ + public List
getAddresses() { + return addresses; + } + + /** + * Addresses that will be merged with a separate run. + * + */ + public void setAddresses(List
addresses) { + this.addresses = addresses; + } + + public ExternalProperties withAddresses(List
addresses) { + this.addresses = addresses; + return this; + } + + /** + * Requests that will be merged with a separate run. + * + */ + public Set getWebRequests() { + return webRequests; + } + + /** + * Requests that will be merged with a separate run. + * + */ + public void setWebRequests(Set webRequests) { + this.webRequests = webRequests; + } + + public ExternalProperties withWebRequests(Set webRequests) { + this.webRequests = webRequests; + return this; + } + + /** + * Responses that will be merged with a separate run. + * + */ + public Set getWebResponses() { + return webResponses; + } + + /** + * Responses that will be merged with a separate run. + * + */ + public void setWebResponses(Set webResponses) { + this.webResponses = webResponses; + } + + public ExternalProperties withWebResponses(Set webResponses) { + this.webResponses = webResponses; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ExternalProperties withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExternalProperties.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("schema"); + sb.append('='); + sb.append(((this.schema == null)?"":this.schema)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("runGuid"); + sb.append('='); + sb.append(((this.runGuid == null)?"":this.runGuid)); + sb.append(','); + sb.append("conversion"); + sb.append('='); + sb.append(((this.conversion == null)?"":this.conversion)); + sb.append(','); + sb.append("graphs"); + sb.append('='); + sb.append(((this.graphs == null)?"":this.graphs)); + sb.append(','); + sb.append("externalizedProperties"); + sb.append('='); + sb.append(((this.externalizedProperties == null)?"":this.externalizedProperties)); + sb.append(','); + sb.append("artifacts"); + sb.append('='); + sb.append(((this.artifacts == null)?"":this.artifacts)); + sb.append(','); + sb.append("invocations"); + sb.append('='); + sb.append(((this.invocations == null)?"":this.invocations)); + sb.append(','); + sb.append("logicalLocations"); + sb.append('='); + sb.append(((this.logicalLocations == null)?"":this.logicalLocations)); + sb.append(','); + sb.append("threadFlowLocations"); + sb.append('='); + sb.append(((this.threadFlowLocations == null)?"":this.threadFlowLocations)); + sb.append(','); + sb.append("results"); + sb.append('='); + sb.append(((this.results == null)?"":this.results)); + sb.append(','); + sb.append("taxonomies"); + sb.append('='); + sb.append(((this.taxonomies == null)?"":this.taxonomies)); + sb.append(','); + sb.append("driver"); + sb.append('='); + sb.append(((this.driver == null)?"":this.driver)); + sb.append(','); + sb.append("extensions"); + sb.append('='); + sb.append(((this.extensions == null)?"":this.extensions)); + sb.append(','); + sb.append("policies"); + sb.append('='); + sb.append(((this.policies == null)?"":this.policies)); + sb.append(','); + sb.append("translations"); + sb.append('='); + sb.append(((this.translations == null)?"":this.translations)); + sb.append(','); + sb.append("addresses"); + sb.append('='); + sb.append(((this.addresses == null)?"":this.addresses)); + sb.append(','); + sb.append("webRequests"); + sb.append('='); + sb.append(((this.webRequests == null)?"":this.webRequests)); + sb.append(','); + sb.append("webResponses"); + sb.append('='); + sb.append(((this.webResponses == null)?"":this.webResponses)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.schema == null)? 0 :this.schema.hashCode())); + result = ((result* 31)+((this.addresses == null)? 0 :this.addresses.hashCode())); + result = ((result* 31)+((this.logicalLocations == null)? 0 :this.logicalLocations.hashCode())); + result = ((result* 31)+((this.policies == null)? 0 :this.policies.hashCode())); + result = ((result* 31)+((this.runGuid == null)? 0 :this.runGuid.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.externalizedProperties == null)? 0 :this.externalizedProperties.hashCode())); + result = ((result* 31)+((this.invocations == null)? 0 :this.invocations.hashCode())); + result = ((result* 31)+((this.graphs == null)? 0 :this.graphs.hashCode())); + result = ((result* 31)+((this.extensions == null)? 0 :this.extensions.hashCode())); + result = ((result* 31)+((this.driver == null)? 0 :this.driver.hashCode())); + result = ((result* 31)+((this.taxonomies == null)? 0 :this.taxonomies.hashCode())); + result = ((result* 31)+((this.translations == null)? 0 :this.translations.hashCode())); + result = ((result* 31)+((this.webResponses == null)? 0 :this.webResponses.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.webRequests == null)? 0 :this.webRequests.hashCode())); + result = ((result* 31)+((this.results == null)? 0 :this.results.hashCode())); + result = ((result* 31)+((this.threadFlowLocations == null)? 0 :this.threadFlowLocations.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.conversion == null)? 0 :this.conversion.hashCode())); + result = ((result* 31)+((this.artifacts == null)? 0 :this.artifacts.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExternalProperties) == false) { + return false; + } + ExternalProperties rhs = ((ExternalProperties) other); + return ((((((((((((((((((((((this.schema == rhs.schema)||((this.schema!= null)&&this.schema.equals(rhs.schema)))&&((this.addresses == rhs.addresses)||((this.addresses!= null)&&this.addresses.equals(rhs.addresses))))&&((this.logicalLocations == rhs.logicalLocations)||((this.logicalLocations!= null)&&this.logicalLocations.equals(rhs.logicalLocations))))&&((this.policies == rhs.policies)||((this.policies!= null)&&this.policies.equals(rhs.policies))))&&((this.runGuid == rhs.runGuid)||((this.runGuid!= null)&&this.runGuid.equals(rhs.runGuid))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.externalizedProperties == rhs.externalizedProperties)||((this.externalizedProperties!= null)&&this.externalizedProperties.equals(rhs.externalizedProperties))))&&((this.invocations == rhs.invocations)||((this.invocations!= null)&&this.invocations.equals(rhs.invocations))))&&((this.graphs == rhs.graphs)||((this.graphs!= null)&&this.graphs.equals(rhs.graphs))))&&((this.extensions == rhs.extensions)||((this.extensions!= null)&&this.extensions.equals(rhs.extensions))))&&((this.driver == rhs.driver)||((this.driver!= null)&&this.driver.equals(rhs.driver))))&&((this.taxonomies == rhs.taxonomies)||((this.taxonomies!= null)&&this.taxonomies.equals(rhs.taxonomies))))&&((this.translations == rhs.translations)||((this.translations!= null)&&this.translations.equals(rhs.translations))))&&((this.webResponses == rhs.webResponses)||((this.webResponses!= null)&&this.webResponses.equals(rhs.webResponses))))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.webRequests == rhs.webRequests)||((this.webRequests!= null)&&this.webRequests.equals(rhs.webRequests))))&&((this.results == rhs.results)||((this.results!= null)&&this.results.equals(rhs.results))))&&((this.threadFlowLocations == rhs.threadFlowLocations)||((this.threadFlowLocations!= null)&&this.threadFlowLocations.equals(rhs.threadFlowLocations))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.conversion == rhs.conversion)||((this.conversion!= null)&&this.conversion.equals(rhs.conversion))))&&((this.artifacts == rhs.artifacts)||((this.artifacts!= null)&&this.artifacts.equals(rhs.artifacts)))); + } + + + /** + * The SARIF format version of this external properties object. + * + */ + public enum Version { + + _2_1_0("2.1.0"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (ExternalProperties.Version c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Version(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static ExternalProperties.Version fromValue(String value) { + ExternalProperties.Version constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReference.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReference.java new file mode 100644 index 0000000..b0c56c8 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReference.java @@ -0,0 +1,167 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ +public class ExternalPropertyFileReference { + + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation location; + /** + * A stable, unique identifer for the external property file in the form of a GUID. + * + */ + private String guid; + /** + * A non-negative integer specifying the number of items contained in the external property file. + * + */ + private Integer itemCount = -1; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getLocation() { + return location; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setLocation(ArtifactLocation location) { + this.location = location; + } + + public ExternalPropertyFileReference withLocation(ArtifactLocation location) { + this.location = location; + return this; + } + + /** + * A stable, unique identifer for the external property file in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A stable, unique identifer for the external property file in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ExternalPropertyFileReference withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * A non-negative integer specifying the number of items contained in the external property file. + * + */ + public Integer getItemCount() { + return itemCount; + } + + /** + * A non-negative integer specifying the number of items contained in the external property file. + * + */ + public void setItemCount(Integer itemCount) { + this.itemCount = itemCount; + } + + public ExternalPropertyFileReference withItemCount(Integer itemCount) { + this.itemCount = itemCount; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ExternalPropertyFileReference withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExternalPropertyFileReference.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("itemCount"); + sb.append('='); + sb.append(((this.itemCount == null)?"":this.itemCount)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.itemCount == null)? 0 :this.itemCount.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExternalPropertyFileReference) == false) { + return false; + } + ExternalPropertyFileReference rhs = ((ExternalPropertyFileReference) other); + return (((((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid)))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.itemCount == rhs.itemCount)||((this.itemCount!= null)&&this.itemCount.equals(rhs.itemCount)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReferences.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReferences.java new file mode 100644 index 0000000..fbe7270 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ExternalPropertyFileReferences.java @@ -0,0 +1,572 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * References to external property files that should be inlined with the content of a root log file. + * + */ +public class ExternalPropertyFileReferences { + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + private ExternalPropertyFileReference conversion; + /** + * An array of external property files containing a run.graphs object to be merged with the root log file. + * + */ + private Set graphs = new LinkedHashSet(); + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + private ExternalPropertyFileReference externalizedProperties; + /** + * An array of external property files containing run.artifacts arrays to be merged with the root log file. + * + */ + private Set artifacts = new LinkedHashSet(); + /** + * An array of external property files containing run.invocations arrays to be merged with the root log file. + * + */ + private Set invocations = new LinkedHashSet(); + /** + * An array of external property files containing run.logicalLocations arrays to be merged with the root log file. + * + */ + private Set logicalLocations = new LinkedHashSet(); + /** + * An array of external property files containing run.threadFlowLocations arrays to be merged with the root log file. + * + */ + private Set threadFlowLocations = new LinkedHashSet(); + /** + * An array of external property files containing run.results arrays to be merged with the root log file. + * + */ + private Set results = new LinkedHashSet(); + /** + * An array of external property files containing run.taxonomies arrays to be merged with the root log file. + * + */ + private Set taxonomies = new LinkedHashSet(); + /** + * An array of external property files containing run.addresses arrays to be merged with the root log file. + * + */ + private Set addresses = new LinkedHashSet(); + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + private ExternalPropertyFileReference driver; + /** + * An array of external property files containing run.extensions arrays to be merged with the root log file. + * + */ + private Set extensions = new LinkedHashSet(); + /** + * An array of external property files containing run.policies arrays to be merged with the root log file. + * + */ + private Set policies = new LinkedHashSet(); + /** + * An array of external property files containing run.translations arrays to be merged with the root log file. + * + */ + private Set translations = new LinkedHashSet(); + /** + * An array of external property files containing run.requests arrays to be merged with the root log file. + * + */ + private Set webRequests = new LinkedHashSet(); + /** + * An array of external property files containing run.responses arrays to be merged with the root log file. + * + */ + private Set webResponses = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public ExternalPropertyFileReference getConversion() { + return conversion; + } + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public void setConversion(ExternalPropertyFileReference conversion) { + this.conversion = conversion; + } + + public ExternalPropertyFileReferences withConversion(ExternalPropertyFileReference conversion) { + this.conversion = conversion; + return this; + } + + /** + * An array of external property files containing a run.graphs object to be merged with the root log file. + * + */ + public Set getGraphs() { + return graphs; + } + + /** + * An array of external property files containing a run.graphs object to be merged with the root log file. + * + */ + public void setGraphs(Set graphs) { + this.graphs = graphs; + } + + public ExternalPropertyFileReferences withGraphs(Set graphs) { + this.graphs = graphs; + return this; + } + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public ExternalPropertyFileReference getExternalizedProperties() { + return externalizedProperties; + } + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public void setExternalizedProperties(ExternalPropertyFileReference externalizedProperties) { + this.externalizedProperties = externalizedProperties; + } + + public ExternalPropertyFileReferences withExternalizedProperties(ExternalPropertyFileReference externalizedProperties) { + this.externalizedProperties = externalizedProperties; + return this; + } + + /** + * An array of external property files containing run.artifacts arrays to be merged with the root log file. + * + */ + public Set getArtifacts() { + return artifacts; + } + + /** + * An array of external property files containing run.artifacts arrays to be merged with the root log file. + * + */ + public void setArtifacts(Set artifacts) { + this.artifacts = artifacts; + } + + public ExternalPropertyFileReferences withArtifacts(Set artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * An array of external property files containing run.invocations arrays to be merged with the root log file. + * + */ + public Set getInvocations() { + return invocations; + } + + /** + * An array of external property files containing run.invocations arrays to be merged with the root log file. + * + */ + public void setInvocations(Set invocations) { + this.invocations = invocations; + } + + public ExternalPropertyFileReferences withInvocations(Set invocations) { + this.invocations = invocations; + return this; + } + + /** + * An array of external property files containing run.logicalLocations arrays to be merged with the root log file. + * + */ + public Set getLogicalLocations() { + return logicalLocations; + } + + /** + * An array of external property files containing run.logicalLocations arrays to be merged with the root log file. + * + */ + public void setLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + } + + public ExternalPropertyFileReferences withLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + return this; + } + + /** + * An array of external property files containing run.threadFlowLocations arrays to be merged with the root log file. + * + */ + public Set getThreadFlowLocations() { + return threadFlowLocations; + } + + /** + * An array of external property files containing run.threadFlowLocations arrays to be merged with the root log file. + * + */ + public void setThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + } + + public ExternalPropertyFileReferences withThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + return this; + } + + /** + * An array of external property files containing run.results arrays to be merged with the root log file. + * + */ + public Set getResults() { + return results; + } + + /** + * An array of external property files containing run.results arrays to be merged with the root log file. + * + */ + public void setResults(Set results) { + this.results = results; + } + + public ExternalPropertyFileReferences withResults(Set results) { + this.results = results; + return this; + } + + /** + * An array of external property files containing run.taxonomies arrays to be merged with the root log file. + * + */ + public Set getTaxonomies() { + return taxonomies; + } + + /** + * An array of external property files containing run.taxonomies arrays to be merged with the root log file. + * + */ + public void setTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + } + + public ExternalPropertyFileReferences withTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + return this; + } + + /** + * An array of external property files containing run.addresses arrays to be merged with the root log file. + * + */ + public Set getAddresses() { + return addresses; + } + + /** + * An array of external property files containing run.addresses arrays to be merged with the root log file. + * + */ + public void setAddresses(Set addresses) { + this.addresses = addresses; + } + + public ExternalPropertyFileReferences withAddresses(Set addresses) { + this.addresses = addresses; + return this; + } + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public ExternalPropertyFileReference getDriver() { + return driver; + } + + /** + * Contains information that enables a SARIF consumer to locate the external property file that contains the value of an externalized property associated with the run. + * + */ + public void setDriver(ExternalPropertyFileReference driver) { + this.driver = driver; + } + + public ExternalPropertyFileReferences withDriver(ExternalPropertyFileReference driver) { + this.driver = driver; + return this; + } + + /** + * An array of external property files containing run.extensions arrays to be merged with the root log file. + * + */ + public Set getExtensions() { + return extensions; + } + + /** + * An array of external property files containing run.extensions arrays to be merged with the root log file. + * + */ + public void setExtensions(Set extensions) { + this.extensions = extensions; + } + + public ExternalPropertyFileReferences withExtensions(Set extensions) { + this.extensions = extensions; + return this; + } + + /** + * An array of external property files containing run.policies arrays to be merged with the root log file. + * + */ + public Set getPolicies() { + return policies; + } + + /** + * An array of external property files containing run.policies arrays to be merged with the root log file. + * + */ + public void setPolicies(Set policies) { + this.policies = policies; + } + + public ExternalPropertyFileReferences withPolicies(Set policies) { + this.policies = policies; + return this; + } + + /** + * An array of external property files containing run.translations arrays to be merged with the root log file. + * + */ + public Set getTranslations() { + return translations; + } + + /** + * An array of external property files containing run.translations arrays to be merged with the root log file. + * + */ + public void setTranslations(Set translations) { + this.translations = translations; + } + + public ExternalPropertyFileReferences withTranslations(Set translations) { + this.translations = translations; + return this; + } + + /** + * An array of external property files containing run.requests arrays to be merged with the root log file. + * + */ + public Set getWebRequests() { + return webRequests; + } + + /** + * An array of external property files containing run.requests arrays to be merged with the root log file. + * + */ + public void setWebRequests(Set webRequests) { + this.webRequests = webRequests; + } + + public ExternalPropertyFileReferences withWebRequests(Set webRequests) { + this.webRequests = webRequests; + return this; + } + + /** + * An array of external property files containing run.responses arrays to be merged with the root log file. + * + */ + public Set getWebResponses() { + return webResponses; + } + + /** + * An array of external property files containing run.responses arrays to be merged with the root log file. + * + */ + public void setWebResponses(Set webResponses) { + this.webResponses = webResponses; + } + + public ExternalPropertyFileReferences withWebResponses(Set webResponses) { + this.webResponses = webResponses; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ExternalPropertyFileReferences withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExternalPropertyFileReferences.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("conversion"); + sb.append('='); + sb.append(((this.conversion == null)?"":this.conversion)); + sb.append(','); + sb.append("graphs"); + sb.append('='); + sb.append(((this.graphs == null)?"":this.graphs)); + sb.append(','); + sb.append("externalizedProperties"); + sb.append('='); + sb.append(((this.externalizedProperties == null)?"":this.externalizedProperties)); + sb.append(','); + sb.append("artifacts"); + sb.append('='); + sb.append(((this.artifacts == null)?"":this.artifacts)); + sb.append(','); + sb.append("invocations"); + sb.append('='); + sb.append(((this.invocations == null)?"":this.invocations)); + sb.append(','); + sb.append("logicalLocations"); + sb.append('='); + sb.append(((this.logicalLocations == null)?"":this.logicalLocations)); + sb.append(','); + sb.append("threadFlowLocations"); + sb.append('='); + sb.append(((this.threadFlowLocations == null)?"":this.threadFlowLocations)); + sb.append(','); + sb.append("results"); + sb.append('='); + sb.append(((this.results == null)?"":this.results)); + sb.append(','); + sb.append("taxonomies"); + sb.append('='); + sb.append(((this.taxonomies == null)?"":this.taxonomies)); + sb.append(','); + sb.append("addresses"); + sb.append('='); + sb.append(((this.addresses == null)?"":this.addresses)); + sb.append(','); + sb.append("driver"); + sb.append('='); + sb.append(((this.driver == null)?"":this.driver)); + sb.append(','); + sb.append("extensions"); + sb.append('='); + sb.append(((this.extensions == null)?"":this.extensions)); + sb.append(','); + sb.append("policies"); + sb.append('='); + sb.append(((this.policies == null)?"":this.policies)); + sb.append(','); + sb.append("translations"); + sb.append('='); + sb.append(((this.translations == null)?"":this.translations)); + sb.append(','); + sb.append("webRequests"); + sb.append('='); + sb.append(((this.webRequests == null)?"":this.webRequests)); + sb.append(','); + sb.append("webResponses"); + sb.append('='); + sb.append(((this.webResponses == null)?"":this.webResponses)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.addresses == null)? 0 :this.addresses.hashCode())); + result = ((result* 31)+((this.logicalLocations == null)? 0 :this.logicalLocations.hashCode())); + result = ((result* 31)+((this.policies == null)? 0 :this.policies.hashCode())); + result = ((result* 31)+((this.externalizedProperties == null)? 0 :this.externalizedProperties.hashCode())); + result = ((result* 31)+((this.invocations == null)? 0 :this.invocations.hashCode())); + result = ((result* 31)+((this.graphs == null)? 0 :this.graphs.hashCode())); + result = ((result* 31)+((this.extensions == null)? 0 :this.extensions.hashCode())); + result = ((result* 31)+((this.driver == null)? 0 :this.driver.hashCode())); + result = ((result* 31)+((this.taxonomies == null)? 0 :this.taxonomies.hashCode())); + result = ((result* 31)+((this.translations == null)? 0 :this.translations.hashCode())); + result = ((result* 31)+((this.webResponses == null)? 0 :this.webResponses.hashCode())); + result = ((result* 31)+((this.webRequests == null)? 0 :this.webRequests.hashCode())); + result = ((result* 31)+((this.results == null)? 0 :this.results.hashCode())); + result = ((result* 31)+((this.threadFlowLocations == null)? 0 :this.threadFlowLocations.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.conversion == null)? 0 :this.conversion.hashCode())); + result = ((result* 31)+((this.artifacts == null)? 0 :this.artifacts.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExternalPropertyFileReferences) == false) { + return false; + } + ExternalPropertyFileReferences rhs = ((ExternalPropertyFileReferences) other); + return ((((((((((((((((((this.addresses == rhs.addresses)||((this.addresses!= null)&&this.addresses.equals(rhs.addresses)))&&((this.logicalLocations == rhs.logicalLocations)||((this.logicalLocations!= null)&&this.logicalLocations.equals(rhs.logicalLocations))))&&((this.policies == rhs.policies)||((this.policies!= null)&&this.policies.equals(rhs.policies))))&&((this.externalizedProperties == rhs.externalizedProperties)||((this.externalizedProperties!= null)&&this.externalizedProperties.equals(rhs.externalizedProperties))))&&((this.invocations == rhs.invocations)||((this.invocations!= null)&&this.invocations.equals(rhs.invocations))))&&((this.graphs == rhs.graphs)||((this.graphs!= null)&&this.graphs.equals(rhs.graphs))))&&((this.extensions == rhs.extensions)||((this.extensions!= null)&&this.extensions.equals(rhs.extensions))))&&((this.driver == rhs.driver)||((this.driver!= null)&&this.driver.equals(rhs.driver))))&&((this.taxonomies == rhs.taxonomies)||((this.taxonomies!= null)&&this.taxonomies.equals(rhs.taxonomies))))&&((this.translations == rhs.translations)||((this.translations!= null)&&this.translations.equals(rhs.translations))))&&((this.webResponses == rhs.webResponses)||((this.webResponses!= null)&&this.webResponses.equals(rhs.webResponses))))&&((this.webRequests == rhs.webRequests)||((this.webRequests!= null)&&this.webRequests.equals(rhs.webRequests))))&&((this.results == rhs.results)||((this.results!= null)&&this.results.equals(rhs.results))))&&((this.threadFlowLocations == rhs.threadFlowLocations)||((this.threadFlowLocations!= null)&&this.threadFlowLocations.equals(rhs.threadFlowLocations))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.conversion == rhs.conversion)||((this.conversion!= null)&&this.conversion.equals(rhs.conversion))))&&((this.artifacts == rhs.artifacts)||((this.artifacts!= null)&&this.artifacts.equals(rhs.artifacts)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/FinalState.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/FinalState.java new file mode 100644 index 0000000..8ab4359 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/FinalState.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The values of relevant expressions after the edge has been traversed. + * + */ +public class FinalState { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public FinalState withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(FinalState.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof FinalState) == false) { + return false; + } + FinalState rhs = ((FinalState) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fingerprints.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fingerprints.java new file mode 100644 index 0000000..0d6936e --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fingerprints.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A set of strings each of which individually defines a stable, unique identity for the result. + * + */ +public class Fingerprints { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public Fingerprints withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Fingerprints.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Fingerprints) == false) { + return false; + } + Fingerprints rhs = ((Fingerprints) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fix.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fix.java new file mode 100644 index 0000000..67f85a6 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Fix.java @@ -0,0 +1,141 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * A proposed fix for the problem represented by a result object. A fix specifies a set of artifacts to modify. For each artifact, it specifies a set of bytes to remove, and provides a set of new bytes to replace them. + * + */ +public class Fix { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * One or more artifact changes that comprise a fix for a result. + * (Required) + * + */ + private Set artifactChanges = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public Fix withDescription(Message description) { + this.description = description; + return this; + } + + /** + * One or more artifact changes that comprise a fix for a result. + * (Required) + * + */ + public Set getArtifactChanges() { + return artifactChanges; + } + + /** + * One or more artifact changes that comprise a fix for a result. + * (Required) + * + */ + public void setArtifactChanges(Set artifactChanges) { + this.artifactChanges = artifactChanges; + } + + public Fix withArtifactChanges(Set artifactChanges) { + this.artifactChanges = artifactChanges; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Fix withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Fix.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("artifactChanges"); + sb.append('='); + sb.append(((this.artifactChanges == null)?"":this.artifactChanges)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.artifactChanges == null)? 0 :this.artifactChanges.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Fix) == false) { + return false; + } + Fix rhs = ((Fix) other); + return ((((this.artifactChanges == rhs.artifactChanges)||((this.artifactChanges!= null)&&this.artifactChanges.equals(rhs.artifactChanges)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GlobalMessageStrings.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GlobalMessageStrings.java new file mode 100644 index 0000000..e1b16d5 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GlobalMessageStrings.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A dictionary, each of whose keys is a resource identifier and each of whose values is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ +public class GlobalMessageStrings { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public GlobalMessageStrings withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GlobalMessageStrings.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GlobalMessageStrings) == false) { + return false; + } + GlobalMessageStrings rhs = ((GlobalMessageStrings) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Graph.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Graph.java new file mode 100644 index 0000000..ef78543 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Graph.java @@ -0,0 +1,169 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * A network of nodes and directed edges that describes some aspect of the structure of the code (for example, a call graph). + * + */ +public class Graph { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * An array of node objects representing the nodes of the graph. + * + */ + private Set nodes = new LinkedHashSet(); + /** + * An array of edge objects representing the edges of the graph. + * + */ + private Set edges = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public Graph withDescription(Message description) { + this.description = description; + return this; + } + + /** + * An array of node objects representing the nodes of the graph. + * + */ + public Set getNodes() { + return nodes; + } + + /** + * An array of node objects representing the nodes of the graph. + * + */ + public void setNodes(Set nodes) { + this.nodes = nodes; + } + + public Graph withNodes(Set nodes) { + this.nodes = nodes; + return this; + } + + /** + * An array of edge objects representing the edges of the graph. + * + */ + public Set getEdges() { + return edges; + } + + /** + * An array of edge objects representing the edges of the graph. + * + */ + public void setEdges(Set edges) { + this.edges = edges; + } + + public Graph withEdges(Set edges) { + this.edges = edges; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Graph withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Graph.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("nodes"); + sb.append('='); + sb.append(((this.nodes == null)?"":this.nodes)); + sb.append(','); + sb.append("edges"); + sb.append('='); + sb.append(((this.edges == null)?"":this.edges)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.edges == null)? 0 :this.edges.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.nodes == null)? 0 :this.nodes.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Graph) == false) { + return false; + } + Graph rhs = ((Graph) other); + return (((((this.edges == rhs.edges)||((this.edges!= null)&&this.edges.equals(rhs.edges)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.nodes == rhs.nodes)||((this.nodes!= null)&&this.nodes.equals(rhs.nodes))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GraphTraversal.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GraphTraversal.java new file mode 100644 index 0000000..b8162ee --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/GraphTraversal.java @@ -0,0 +1,262 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Represents a path through a graph. + * + */ +public class GraphTraversal { + + /** + * The index within the run.graphs to be associated with the result. + * + */ + private Integer runGraphIndex = -1; + /** + * The index within the result.graphs to be associated with the result. + * + */ + private Integer resultGraphIndex = -1; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Values of relevant expressions at the start of the graph traversal that may change during graph traversal. + * + */ + private InitialState__1 initialState; + /** + * Values of relevant expressions at the start of the graph traversal that remain constant for the graph traversal. + * + */ + private ImmutableState__1 immutableState; + /** + * The sequences of edges traversed by this graph traversal. + * + */ + private List edgeTraversals = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The index within the run.graphs to be associated with the result. + * + */ + public Integer getRunGraphIndex() { + return runGraphIndex; + } + + /** + * The index within the run.graphs to be associated with the result. + * + */ + public void setRunGraphIndex(Integer runGraphIndex) { + this.runGraphIndex = runGraphIndex; + } + + public GraphTraversal withRunGraphIndex(Integer runGraphIndex) { + this.runGraphIndex = runGraphIndex; + return this; + } + + /** + * The index within the result.graphs to be associated with the result. + * + */ + public Integer getResultGraphIndex() { + return resultGraphIndex; + } + + /** + * The index within the result.graphs to be associated with the result. + * + */ + public void setResultGraphIndex(Integer resultGraphIndex) { + this.resultGraphIndex = resultGraphIndex; + } + + public GraphTraversal withResultGraphIndex(Integer resultGraphIndex) { + this.resultGraphIndex = resultGraphIndex; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public GraphTraversal withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Values of relevant expressions at the start of the graph traversal that may change during graph traversal. + * + */ + public InitialState__1 getInitialState() { + return initialState; + } + + /** + * Values of relevant expressions at the start of the graph traversal that may change during graph traversal. + * + */ + public void setInitialState(InitialState__1 initialState) { + this.initialState = initialState; + } + + public GraphTraversal withInitialState(InitialState__1 initialState) { + this.initialState = initialState; + return this; + } + + /** + * Values of relevant expressions at the start of the graph traversal that remain constant for the graph traversal. + * + */ + public ImmutableState__1 getImmutableState() { + return immutableState; + } + + /** + * Values of relevant expressions at the start of the graph traversal that remain constant for the graph traversal. + * + */ + public void setImmutableState(ImmutableState__1 immutableState) { + this.immutableState = immutableState; + } + + public GraphTraversal withImmutableState(ImmutableState__1 immutableState) { + this.immutableState = immutableState; + return this; + } + + /** + * The sequences of edges traversed by this graph traversal. + * + */ + public List getEdgeTraversals() { + return edgeTraversals; + } + + /** + * The sequences of edges traversed by this graph traversal. + * + */ + public void setEdgeTraversals(List edgeTraversals) { + this.edgeTraversals = edgeTraversals; + } + + public GraphTraversal withEdgeTraversals(List edgeTraversals) { + this.edgeTraversals = edgeTraversals; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public GraphTraversal withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GraphTraversal.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("runGraphIndex"); + sb.append('='); + sb.append(((this.runGraphIndex == null)?"":this.runGraphIndex)); + sb.append(','); + sb.append("resultGraphIndex"); + sb.append('='); + sb.append(((this.resultGraphIndex == null)?"":this.resultGraphIndex)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("initialState"); + sb.append('='); + sb.append(((this.initialState == null)?"":this.initialState)); + sb.append(','); + sb.append("immutableState"); + sb.append('='); + sb.append(((this.immutableState == null)?"":this.immutableState)); + sb.append(','); + sb.append("edgeTraversals"); + sb.append('='); + sb.append(((this.edgeTraversals == null)?"":this.edgeTraversals)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.initialState == null)? 0 :this.initialState.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.immutableState == null)? 0 :this.immutableState.hashCode())); + result = ((result* 31)+((this.runGraphIndex == null)? 0 :this.runGraphIndex.hashCode())); + result = ((result* 31)+((this.resultGraphIndex == null)? 0 :this.resultGraphIndex.hashCode())); + result = ((result* 31)+((this.edgeTraversals == null)? 0 :this.edgeTraversals.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GraphTraversal) == false) { + return false; + } + GraphTraversal rhs = ((GraphTraversal) other); + return ((((((((this.initialState == rhs.initialState)||((this.initialState!= null)&&this.initialState.equals(rhs.initialState)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.immutableState == rhs.immutableState)||((this.immutableState!= null)&&this.immutableState.equals(rhs.immutableState))))&&((this.runGraphIndex == rhs.runGraphIndex)||((this.runGraphIndex!= null)&&this.runGraphIndex.equals(rhs.runGraphIndex))))&&((this.resultGraphIndex == rhs.resultGraphIndex)||((this.resultGraphIndex!= null)&&this.resultGraphIndex.equals(rhs.resultGraphIndex))))&&((this.edgeTraversals == rhs.edgeTraversals)||((this.edgeTraversals!= null)&&this.edgeTraversals.equals(rhs.edgeTraversals))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Hashes.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Hashes.java new file mode 100644 index 0000000..b9c14b1 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Hashes.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function. + * + */ +public class Hashes { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public Hashes withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Hashes.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Hashes) == false) { + return false; + } + Hashes rhs = ((Hashes) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers.java new file mode 100644 index 0000000..e2dc69d --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The request headers. + * + */ +public class Headers { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public Headers withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Headers.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Headers) == false) { + return false; + } + Headers rhs = ((Headers) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers__1.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers__1.java new file mode 100644 index 0000000..8c9c63b --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Headers__1.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The response headers. + * + */ +public class Headers__1 { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public Headers__1 withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Headers__1 .class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Headers__1) == false) { + return false; + } + Headers__1 rhs = ((Headers__1) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState.java new file mode 100644 index 0000000..6faed3b --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * Values of relevant expressions at the start of the thread flow that remain constant. + * + */ +public class ImmutableState { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public ImmutableState withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ImmutableState.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ImmutableState) == false) { + return false; + } + ImmutableState rhs = ((ImmutableState) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState__1.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState__1.java new file mode 100644 index 0000000..812454c --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ImmutableState__1.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * Values of relevant expressions at the start of the graph traversal that remain constant for the graph traversal. + * + */ +public class ImmutableState__1 { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public ImmutableState__1 withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ImmutableState__1 .class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ImmutableState__1) == false) { + return false; + } + ImmutableState__1 rhs = ((ImmutableState__1) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState.java new file mode 100644 index 0000000..8afbe91 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * Values of relevant expressions at the start of the thread flow that may change during thread flow execution. + * + */ +public class InitialState { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public InitialState withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(InitialState.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof InitialState) == false) { + return false; + } + InitialState rhs = ((InitialState) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState__1.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState__1.java new file mode 100644 index 0000000..50ec03f --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/InitialState__1.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * Values of relevant expressions at the start of the graph traversal that may change during graph traversal. + * + */ +public class InitialState__1 { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public InitialState__1 withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(InitialState__1 .class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof InitialState__1) == false) { + return false; + } + InitialState__1 rhs = ((InitialState__1) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Invocation.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Invocation.java new file mode 100644 index 0000000..ff0af25 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Invocation.java @@ -0,0 +1,857 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + + +/** + * The runtime environment of the analysis tool run. + * + */ +public class Invocation { + + /** + * The command line used to invoke the tool. + * + */ + private String commandLine; + /** + * An array of strings, containing in order the command line arguments passed to the tool from the operating system. + * + */ + private List arguments = new ArrayList(); + /** + * The locations of any response files specified on the tool's command line. + * + */ + private Set responseFiles = new LinkedHashSet(); + /** + * The Coordinated Universal Time (UTC) date and time at which the run started. See "Date/time properties" in the SARIF spec for the required format. + * + */ + private Date startTimeUtc; + /** + * The Coordinated Universal Time (UTC) date and time at which the run ended. See "Date/time properties" in the SARIF spec for the required format. + * + */ + private Date endTimeUtc; + /** + * The process exit code. + * + */ + private Integer exitCode; + /** + * An array of configurationOverride objects that describe rules related runtime overrides. + * + */ + private Set ruleConfigurationOverrides = new LinkedHashSet(); + /** + * An array of configurationOverride objects that describe notifications related runtime overrides. + * + */ + private Set notificationConfigurationOverrides = new LinkedHashSet(); + /** + * A list of runtime conditions detected by the tool during the analysis. + * + */ + private List toolExecutionNotifications = new ArrayList(); + /** + * A list of conditions detected by the tool that are relevant to the tool's configuration. + * + */ + private List toolConfigurationNotifications = new ArrayList(); + /** + * The reason for the process exit. + * + */ + private String exitCodeDescription; + /** + * The name of the signal that caused the process to exit. + * + */ + private String exitSignalName; + /** + * The numeric value of the signal that caused the process to exit. + * + */ + private Integer exitSignalNumber; + /** + * The reason given by the operating system that the process failed to start. + * + */ + private String processStartFailureMessage; + /** + * Specifies whether the tool's execution completed successfully. + * (Required) + * + */ + private Boolean executionSuccessful; + /** + * The machine that hosted the analysis tool run. + * + */ + private String machine; + /** + * The account that ran the analysis tool. + * + */ + private String account; + /** + * The process id for the analysis tool run. + * + */ + private Integer processId; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation executableLocation; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation workingDirectory; + /** + * The environment variables associated with the analysis tool process, expressed as key/value pairs. + * + */ + private EnvironmentVariables environmentVariables; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation stdin; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation stdout; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation stderr; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation stdoutStderr; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The command line used to invoke the tool. + * + */ + public String getCommandLine() { + return commandLine; + } + + /** + * The command line used to invoke the tool. + * + */ + public void setCommandLine(String commandLine) { + this.commandLine = commandLine; + } + + public Invocation withCommandLine(String commandLine) { + this.commandLine = commandLine; + return this; + } + + /** + * An array of strings, containing in order the command line arguments passed to the tool from the operating system. + * + */ + public List getArguments() { + return arguments; + } + + /** + * An array of strings, containing in order the command line arguments passed to the tool from the operating system. + * + */ + public void setArguments(List arguments) { + this.arguments = arguments; + } + + public Invocation withArguments(List arguments) { + this.arguments = arguments; + return this; + } + + /** + * The locations of any response files specified on the tool's command line. + * + */ + public Set getResponseFiles() { + return responseFiles; + } + + /** + * The locations of any response files specified on the tool's command line. + * + */ + public void setResponseFiles(Set responseFiles) { + this.responseFiles = responseFiles; + } + + public Invocation withResponseFiles(Set responseFiles) { + this.responseFiles = responseFiles; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the run started. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public Date getStartTimeUtc() { + return startTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the run started. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public void setStartTimeUtc(Date startTimeUtc) { + this.startTimeUtc = startTimeUtc; + } + + public Invocation withStartTimeUtc(Date startTimeUtc) { + this.startTimeUtc = startTimeUtc; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the run ended. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public Date getEndTimeUtc() { + return endTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the run ended. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public void setEndTimeUtc(Date endTimeUtc) { + this.endTimeUtc = endTimeUtc; + } + + public Invocation withEndTimeUtc(Date endTimeUtc) { + this.endTimeUtc = endTimeUtc; + return this; + } + + /** + * The process exit code. + * + */ + public Integer getExitCode() { + return exitCode; + } + + /** + * The process exit code. + * + */ + public void setExitCode(Integer exitCode) { + this.exitCode = exitCode; + } + + public Invocation withExitCode(Integer exitCode) { + this.exitCode = exitCode; + return this; + } + + /** + * An array of configurationOverride objects that describe rules related runtime overrides. + * + */ + public Set getRuleConfigurationOverrides() { + return ruleConfigurationOverrides; + } + + /** + * An array of configurationOverride objects that describe rules related runtime overrides. + * + */ + public void setRuleConfigurationOverrides(Set ruleConfigurationOverrides) { + this.ruleConfigurationOverrides = ruleConfigurationOverrides; + } + + public Invocation withRuleConfigurationOverrides(Set ruleConfigurationOverrides) { + this.ruleConfigurationOverrides = ruleConfigurationOverrides; + return this; + } + + /** + * An array of configurationOverride objects that describe notifications related runtime overrides. + * + */ + public Set getNotificationConfigurationOverrides() { + return notificationConfigurationOverrides; + } + + /** + * An array of configurationOverride objects that describe notifications related runtime overrides. + * + */ + public void setNotificationConfigurationOverrides(Set notificationConfigurationOverrides) { + this.notificationConfigurationOverrides = notificationConfigurationOverrides; + } + + public Invocation withNotificationConfigurationOverrides(Set notificationConfigurationOverrides) { + this.notificationConfigurationOverrides = notificationConfigurationOverrides; + return this; + } + + /** + * A list of runtime conditions detected by the tool during the analysis. + * + */ + public List getToolExecutionNotifications() { + return toolExecutionNotifications; + } + + /** + * A list of runtime conditions detected by the tool during the analysis. + * + */ + public void setToolExecutionNotifications(List toolExecutionNotifications) { + this.toolExecutionNotifications = toolExecutionNotifications; + } + + public Invocation withToolExecutionNotifications(List toolExecutionNotifications) { + this.toolExecutionNotifications = toolExecutionNotifications; + return this; + } + + /** + * A list of conditions detected by the tool that are relevant to the tool's configuration. + * + */ + public List getToolConfigurationNotifications() { + return toolConfigurationNotifications; + } + + /** + * A list of conditions detected by the tool that are relevant to the tool's configuration. + * + */ + public void setToolConfigurationNotifications(List toolConfigurationNotifications) { + this.toolConfigurationNotifications = toolConfigurationNotifications; + } + + public Invocation withToolConfigurationNotifications(List toolConfigurationNotifications) { + this.toolConfigurationNotifications = toolConfigurationNotifications; + return this; + } + + /** + * The reason for the process exit. + * + */ + public String getExitCodeDescription() { + return exitCodeDescription; + } + + /** + * The reason for the process exit. + * + */ + public void setExitCodeDescription(String exitCodeDescription) { + this.exitCodeDescription = exitCodeDescription; + } + + public Invocation withExitCodeDescription(String exitCodeDescription) { + this.exitCodeDescription = exitCodeDescription; + return this; + } + + /** + * The name of the signal that caused the process to exit. + * + */ + public String getExitSignalName() { + return exitSignalName; + } + + /** + * The name of the signal that caused the process to exit. + * + */ + public void setExitSignalName(String exitSignalName) { + this.exitSignalName = exitSignalName; + } + + public Invocation withExitSignalName(String exitSignalName) { + this.exitSignalName = exitSignalName; + return this; + } + + /** + * The numeric value of the signal that caused the process to exit. + * + */ + public Integer getExitSignalNumber() { + return exitSignalNumber; + } + + /** + * The numeric value of the signal that caused the process to exit. + * + */ + public void setExitSignalNumber(Integer exitSignalNumber) { + this.exitSignalNumber = exitSignalNumber; + } + + public Invocation withExitSignalNumber(Integer exitSignalNumber) { + this.exitSignalNumber = exitSignalNumber; + return this; + } + + /** + * The reason given by the operating system that the process failed to start. + * + */ + public String getProcessStartFailureMessage() { + return processStartFailureMessage; + } + + /** + * The reason given by the operating system that the process failed to start. + * + */ + public void setProcessStartFailureMessage(String processStartFailureMessage) { + this.processStartFailureMessage = processStartFailureMessage; + } + + public Invocation withProcessStartFailureMessage(String processStartFailureMessage) { + this.processStartFailureMessage = processStartFailureMessage; + return this; + } + + /** + * Specifies whether the tool's execution completed successfully. + * (Required) + * + */ + public Boolean getExecutionSuccessful() { + return executionSuccessful; + } + + /** + * Specifies whether the tool's execution completed successfully. + * (Required) + * + */ + public void setExecutionSuccessful(Boolean executionSuccessful) { + this.executionSuccessful = executionSuccessful; + } + + public Invocation withExecutionSuccessful(Boolean executionSuccessful) { + this.executionSuccessful = executionSuccessful; + return this; + } + + /** + * The machine that hosted the analysis tool run. + * + */ + public String getMachine() { + return machine; + } + + /** + * The machine that hosted the analysis tool run. + * + */ + public void setMachine(String machine) { + this.machine = machine; + } + + public Invocation withMachine(String machine) { + this.machine = machine; + return this; + } + + /** + * The account that ran the analysis tool. + * + */ + public String getAccount() { + return account; + } + + /** + * The account that ran the analysis tool. + * + */ + public void setAccount(String account) { + this.account = account; + } + + public Invocation withAccount(String account) { + this.account = account; + return this; + } + + /** + * The process id for the analysis tool run. + * + */ + public Integer getProcessId() { + return processId; + } + + /** + * The process id for the analysis tool run. + * + */ + public void setProcessId(Integer processId) { + this.processId = processId; + } + + public Invocation withProcessId(Integer processId) { + this.processId = processId; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getExecutableLocation() { + return executableLocation; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setExecutableLocation(ArtifactLocation executableLocation) { + this.executableLocation = executableLocation; + } + + public Invocation withExecutableLocation(ArtifactLocation executableLocation) { + this.executableLocation = executableLocation; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getWorkingDirectory() { + return workingDirectory; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setWorkingDirectory(ArtifactLocation workingDirectory) { + this.workingDirectory = workingDirectory; + } + + public Invocation withWorkingDirectory(ArtifactLocation workingDirectory) { + this.workingDirectory = workingDirectory; + return this; + } + + /** + * The environment variables associated with the analysis tool process, expressed as key/value pairs. + * + */ + public EnvironmentVariables getEnvironmentVariables() { + return environmentVariables; + } + + /** + * The environment variables associated with the analysis tool process, expressed as key/value pairs. + * + */ + public void setEnvironmentVariables(EnvironmentVariables environmentVariables) { + this.environmentVariables = environmentVariables; + } + + public Invocation withEnvironmentVariables(EnvironmentVariables environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getStdin() { + return stdin; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setStdin(ArtifactLocation stdin) { + this.stdin = stdin; + } + + public Invocation withStdin(ArtifactLocation stdin) { + this.stdin = stdin; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getStdout() { + return stdout; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setStdout(ArtifactLocation stdout) { + this.stdout = stdout; + } + + public Invocation withStdout(ArtifactLocation stdout) { + this.stdout = stdout; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getStderr() { + return stderr; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setStderr(ArtifactLocation stderr) { + this.stderr = stderr; + } + + public Invocation withStderr(ArtifactLocation stderr) { + this.stderr = stderr; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getStdoutStderr() { + return stdoutStderr; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setStdoutStderr(ArtifactLocation stdoutStderr) { + this.stdoutStderr = stdoutStderr; + } + + public Invocation withStdoutStderr(ArtifactLocation stdoutStderr) { + this.stdoutStderr = stdoutStderr; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Invocation withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Invocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("commandLine"); + sb.append('='); + sb.append(((this.commandLine == null)?"":this.commandLine)); + sb.append(','); + sb.append("arguments"); + sb.append('='); + sb.append(((this.arguments == null)?"":this.arguments)); + sb.append(','); + sb.append("responseFiles"); + sb.append('='); + sb.append(((this.responseFiles == null)?"":this.responseFiles)); + sb.append(','); + sb.append("startTimeUtc"); + sb.append('='); + sb.append(((this.startTimeUtc == null)?"":this.startTimeUtc)); + sb.append(','); + sb.append("endTimeUtc"); + sb.append('='); + sb.append(((this.endTimeUtc == null)?"":this.endTimeUtc)); + sb.append(','); + sb.append("exitCode"); + sb.append('='); + sb.append(((this.exitCode == null)?"":this.exitCode)); + sb.append(','); + sb.append("ruleConfigurationOverrides"); + sb.append('='); + sb.append(((this.ruleConfigurationOverrides == null)?"":this.ruleConfigurationOverrides)); + sb.append(','); + sb.append("notificationConfigurationOverrides"); + sb.append('='); + sb.append(((this.notificationConfigurationOverrides == null)?"":this.notificationConfigurationOverrides)); + sb.append(','); + sb.append("toolExecutionNotifications"); + sb.append('='); + sb.append(((this.toolExecutionNotifications == null)?"":this.toolExecutionNotifications)); + sb.append(','); + sb.append("toolConfigurationNotifications"); + sb.append('='); + sb.append(((this.toolConfigurationNotifications == null)?"":this.toolConfigurationNotifications)); + sb.append(','); + sb.append("exitCodeDescription"); + sb.append('='); + sb.append(((this.exitCodeDescription == null)?"":this.exitCodeDescription)); + sb.append(','); + sb.append("exitSignalName"); + sb.append('='); + sb.append(((this.exitSignalName == null)?"":this.exitSignalName)); + sb.append(','); + sb.append("exitSignalNumber"); + sb.append('='); + sb.append(((this.exitSignalNumber == null)?"":this.exitSignalNumber)); + sb.append(','); + sb.append("processStartFailureMessage"); + sb.append('='); + sb.append(((this.processStartFailureMessage == null)?"":this.processStartFailureMessage)); + sb.append(','); + sb.append("executionSuccessful"); + sb.append('='); + sb.append(((this.executionSuccessful == null)?"":this.executionSuccessful)); + sb.append(','); + sb.append("machine"); + sb.append('='); + sb.append(((this.machine == null)?"":this.machine)); + sb.append(','); + sb.append("account"); + sb.append('='); + sb.append(((this.account == null)?"":this.account)); + sb.append(','); + sb.append("processId"); + sb.append('='); + sb.append(((this.processId == null)?"":this.processId)); + sb.append(','); + sb.append("executableLocation"); + sb.append('='); + sb.append(((this.executableLocation == null)?"":this.executableLocation)); + sb.append(','); + sb.append("workingDirectory"); + sb.append('='); + sb.append(((this.workingDirectory == null)?"":this.workingDirectory)); + sb.append(','); + sb.append("environmentVariables"); + sb.append('='); + sb.append(((this.environmentVariables == null)?"":this.environmentVariables)); + sb.append(','); + sb.append("stdin"); + sb.append('='); + sb.append(((this.stdin == null)?"":this.stdin)); + sb.append(','); + sb.append("stdout"); + sb.append('='); + sb.append(((this.stdout == null)?"":this.stdout)); + sb.append(','); + sb.append("stderr"); + sb.append('='); + sb.append(((this.stderr == null)?"":this.stderr)); + sb.append(','); + sb.append("stdoutStderr"); + sb.append('='); + sb.append(((this.stdoutStderr == null)?"":this.stdoutStderr)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endTimeUtc == null)? 0 :this.endTimeUtc.hashCode())); + result = ((result* 31)+((this.stdin == null)? 0 :this.stdin.hashCode())); + result = ((result* 31)+((this.stdout == null)? 0 :this.stdout.hashCode())); + result = ((result* 31)+((this.workingDirectory == null)? 0 :this.workingDirectory.hashCode())); + result = ((result* 31)+((this.exitSignalNumber == null)? 0 :this.exitSignalNumber.hashCode())); + result = ((result* 31)+((this.exitCodeDescription == null)? 0 :this.exitCodeDescription.hashCode())); + result = ((result* 31)+((this.executableLocation == null)? 0 :this.executableLocation.hashCode())); + result = ((result* 31)+((this.processId == null)? 0 :this.processId.hashCode())); + result = ((result* 31)+((this.exitCode == null)? 0 :this.exitCode.hashCode())); + result = ((result* 31)+((this.toolConfigurationNotifications == null)? 0 :this.toolConfigurationNotifications.hashCode())); + result = ((result* 31)+((this.notificationConfigurationOverrides == null)? 0 :this.notificationConfigurationOverrides.hashCode())); + result = ((result* 31)+((this.processStartFailureMessage == null)? 0 :this.processStartFailureMessage.hashCode())); + result = ((result* 31)+((this.stderr == null)? 0 :this.stderr.hashCode())); + result = ((result* 31)+((this.ruleConfigurationOverrides == null)? 0 :this.ruleConfigurationOverrides.hashCode())); + result = ((result* 31)+((this.toolExecutionNotifications == null)? 0 :this.toolExecutionNotifications.hashCode())); + result = ((result* 31)+((this.machine == null)? 0 :this.machine.hashCode())); + result = ((result* 31)+((this.environmentVariables == null)? 0 :this.environmentVariables.hashCode())); + result = ((result* 31)+((this.stdoutStderr == null)? 0 :this.stdoutStderr.hashCode())); + result = ((result* 31)+((this.arguments == null)? 0 :this.arguments.hashCode())); + result = ((result* 31)+((this.responseFiles == null)? 0 :this.responseFiles.hashCode())); + result = ((result* 31)+((this.commandLine == null)? 0 :this.commandLine.hashCode())); + result = ((result* 31)+((this.executionSuccessful == null)? 0 :this.executionSuccessful.hashCode())); + result = ((result* 31)+((this.startTimeUtc == null)? 0 :this.startTimeUtc.hashCode())); + result = ((result* 31)+((this.account == null)? 0 :this.account.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.exitSignalName == null)? 0 :this.exitSignalName.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Invocation) == false) { + return false; + } + Invocation rhs = ((Invocation) other); + return (((((((((((((((((((((((((((this.endTimeUtc == rhs.endTimeUtc)||((this.endTimeUtc!= null)&&this.endTimeUtc.equals(rhs.endTimeUtc)))&&((this.stdin == rhs.stdin)||((this.stdin!= null)&&this.stdin.equals(rhs.stdin))))&&((this.stdout == rhs.stdout)||((this.stdout!= null)&&this.stdout.equals(rhs.stdout))))&&((this.workingDirectory == rhs.workingDirectory)||((this.workingDirectory!= null)&&this.workingDirectory.equals(rhs.workingDirectory))))&&((this.exitSignalNumber == rhs.exitSignalNumber)||((this.exitSignalNumber!= null)&&this.exitSignalNumber.equals(rhs.exitSignalNumber))))&&((this.exitCodeDescription == rhs.exitCodeDescription)||((this.exitCodeDescription!= null)&&this.exitCodeDescription.equals(rhs.exitCodeDescription))))&&((this.executableLocation == rhs.executableLocation)||((this.executableLocation!= null)&&this.executableLocation.equals(rhs.executableLocation))))&&((this.processId == rhs.processId)||((this.processId!= null)&&this.processId.equals(rhs.processId))))&&((this.exitCode == rhs.exitCode)||((this.exitCode!= null)&&this.exitCode.equals(rhs.exitCode))))&&((this.toolConfigurationNotifications == rhs.toolConfigurationNotifications)||((this.toolConfigurationNotifications!= null)&&this.toolConfigurationNotifications.equals(rhs.toolConfigurationNotifications))))&&((this.notificationConfigurationOverrides == rhs.notificationConfigurationOverrides)||((this.notificationConfigurationOverrides!= null)&&this.notificationConfigurationOverrides.equals(rhs.notificationConfigurationOverrides))))&&((this.processStartFailureMessage == rhs.processStartFailureMessage)||((this.processStartFailureMessage!= null)&&this.processStartFailureMessage.equals(rhs.processStartFailureMessage))))&&((this.stderr == rhs.stderr)||((this.stderr!= null)&&this.stderr.equals(rhs.stderr))))&&((this.ruleConfigurationOverrides == rhs.ruleConfigurationOverrides)||((this.ruleConfigurationOverrides!= null)&&this.ruleConfigurationOverrides.equals(rhs.ruleConfigurationOverrides))))&&((this.toolExecutionNotifications == rhs.toolExecutionNotifications)||((this.toolExecutionNotifications!= null)&&this.toolExecutionNotifications.equals(rhs.toolExecutionNotifications))))&&((this.machine == rhs.machine)||((this.machine!= null)&&this.machine.equals(rhs.machine))))&&((this.environmentVariables == rhs.environmentVariables)||((this.environmentVariables!= null)&&this.environmentVariables.equals(rhs.environmentVariables))))&&((this.stdoutStderr == rhs.stdoutStderr)||((this.stdoutStderr!= null)&&this.stdoutStderr.equals(rhs.stdoutStderr))))&&((this.arguments == rhs.arguments)||((this.arguments!= null)&&this.arguments.equals(rhs.arguments))))&&((this.responseFiles == rhs.responseFiles)||((this.responseFiles!= null)&&this.responseFiles.equals(rhs.responseFiles))))&&((this.commandLine == rhs.commandLine)||((this.commandLine!= null)&&this.commandLine.equals(rhs.commandLine))))&&((this.executionSuccessful == rhs.executionSuccessful)||((this.executionSuccessful!= null)&&this.executionSuccessful.equals(rhs.executionSuccessful))))&&((this.startTimeUtc == rhs.startTimeUtc)||((this.startTimeUtc!= null)&&this.startTimeUtc.equals(rhs.startTimeUtc))))&&((this.account == rhs.account)||((this.account!= null)&&this.account.equals(rhs.account))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.exitSignalName == rhs.exitSignalName)||((this.exitSignalName!= null)&&this.exitSignalName.equals(rhs.exitSignalName)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Location.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Location.java new file mode 100644 index 0000000..924d20b --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Location.java @@ -0,0 +1,262 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * A location within a programming artifact. + * + */ +public class Location { + + /** + * Value that distinguishes this location from all other locations within a single result object. + * + */ + private Integer id = -1; + /** + * A physical location relevant to a result. Specifies a reference to a programming artifact together with a range of bytes or characters within that artifact. + * + */ + private PhysicalLocation physicalLocation; + /** + * The logical locations associated with the result. + * + */ + private Set logicalLocations = new LinkedHashSet(); + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * A set of regions relevant to the location. + * + */ + private Set annotations = new LinkedHashSet(); + /** + * An array of objects that describe relationships between this location and others. + * + */ + private Set relationships = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Value that distinguishes this location from all other locations within a single result object. + * + */ + public Integer getId() { + return id; + } + + /** + * Value that distinguishes this location from all other locations within a single result object. + * + */ + public void setId(Integer id) { + this.id = id; + } + + public Location withId(Integer id) { + this.id = id; + return this; + } + + /** + * A physical location relevant to a result. Specifies a reference to a programming artifact together with a range of bytes or characters within that artifact. + * + */ + public PhysicalLocation getPhysicalLocation() { + return physicalLocation; + } + + /** + * A physical location relevant to a result. Specifies a reference to a programming artifact together with a range of bytes or characters within that artifact. + * + */ + public void setPhysicalLocation(PhysicalLocation physicalLocation) { + this.physicalLocation = physicalLocation; + } + + public Location withPhysicalLocation(PhysicalLocation physicalLocation) { + this.physicalLocation = physicalLocation; + return this; + } + + /** + * The logical locations associated with the result. + * + */ + public Set getLogicalLocations() { + return logicalLocations; + } + + /** + * The logical locations associated with the result. + * + */ + public void setLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + } + + public Location withLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Location withMessage(Message message) { + this.message = message; + return this; + } + + /** + * A set of regions relevant to the location. + * + */ + public Set getAnnotations() { + return annotations; + } + + /** + * A set of regions relevant to the location. + * + */ + public void setAnnotations(Set annotations) { + this.annotations = annotations; + } + + public Location withAnnotations(Set annotations) { + this.annotations = annotations; + return this; + } + + /** + * An array of objects that describe relationships between this location and others. + * + */ + public Set getRelationships() { + return relationships; + } + + /** + * An array of objects that describe relationships between this location and others. + * + */ + public void setRelationships(Set relationships) { + this.relationships = relationships; + } + + public Location withRelationships(Set relationships) { + this.relationships = relationships; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Location withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Location.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("physicalLocation"); + sb.append('='); + sb.append(((this.physicalLocation == null)?"":this.physicalLocation)); + sb.append(','); + sb.append("logicalLocations"); + sb.append('='); + sb.append(((this.logicalLocations == null)?"":this.logicalLocations)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("annotations"); + sb.append('='); + sb.append(((this.annotations == null)?"":this.annotations)); + sb.append(','); + sb.append("relationships"); + sb.append('='); + sb.append(((this.relationships == null)?"":this.relationships)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.relationships == null)? 0 :this.relationships.hashCode())); + result = ((result* 31)+((this.physicalLocation == null)? 0 :this.physicalLocation.hashCode())); + result = ((result* 31)+((this.logicalLocations == null)? 0 :this.logicalLocations.hashCode())); + result = ((result* 31)+((this.annotations == null)? 0 :this.annotations.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Location) == false) { + return false; + } + Location rhs = ((Location) other); + return ((((((((this.relationships == rhs.relationships)||((this.relationships!= null)&&this.relationships.equals(rhs.relationships)))&&((this.physicalLocation == rhs.physicalLocation)||((this.physicalLocation!= null)&&this.physicalLocation.equals(rhs.physicalLocation))))&&((this.logicalLocations == rhs.logicalLocations)||((this.logicalLocations!= null)&&this.logicalLocations.equals(rhs.logicalLocations))))&&((this.annotations == rhs.annotations)||((this.annotations!= null)&&this.annotations.equals(rhs.annotations))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LocationRelationship.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LocationRelationship.java new file mode 100644 index 0000000..4f922ed --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LocationRelationship.java @@ -0,0 +1,173 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Information about the relation of one location to another. + * + */ +public class LocationRelationship { + + /** + * A reference to the related location. + * (Required) + * + */ + private Integer target; + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'includes', 'isIncludedBy' and 'relevant'. + * + */ + private Set kinds = new LinkedHashSet(Arrays.asList("relevant")); + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A reference to the related location. + * (Required) + * + */ + public Integer getTarget() { + return target; + } + + /** + * A reference to the related location. + * (Required) + * + */ + public void setTarget(Integer target) { + this.target = target; + } + + public LocationRelationship withTarget(Integer target) { + this.target = target; + return this; + } + + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'includes', 'isIncludedBy' and 'relevant'. + * + */ + public Set getKinds() { + return kinds; + } + + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'includes', 'isIncludedBy' and 'relevant'. + * + */ + public void setKinds(Set kinds) { + this.kinds = kinds; + } + + public LocationRelationship withKinds(Set kinds) { + this.kinds = kinds; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public LocationRelationship withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public LocationRelationship withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LocationRelationship.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("target"); + sb.append('='); + sb.append(((this.target == null)?"":this.target)); + sb.append(','); + sb.append("kinds"); + sb.append('='); + sb.append(((this.kinds == null)?"":this.kinds)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.kinds == null)? 0 :this.kinds.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.target == null)? 0 :this.target.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LocationRelationship) == false) { + return false; + } + LocationRelationship rhs = ((LocationRelationship) other); + return (((((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description)))&&((this.kinds == rhs.kinds)||((this.kinds!= null)&&this.kinds.equals(rhs.kinds))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.target == rhs.target)||((this.target!= null)&&this.target.equals(rhs.target)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LogicalLocation.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LogicalLocation.java new file mode 100644 index 0000000..d175ffa --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/LogicalLocation.java @@ -0,0 +1,260 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * A logical location of a construct that produced a result. + * + */ +public class LogicalLocation { + + /** + * Identifies the construct in which the result occurred. For example, this property might contain the name of a class or a method. + * + */ + private String name; + /** + * The index within the logical locations array. + * + */ + private Integer index = -1; + /** + * The human-readable fully qualified name of the logical location. + * + */ + private String fullyQualifiedName; + /** + * The machine-readable name for the logical location, such as a mangled function name provided by a C++ compiler that encodes calling convention, return type and other details along with the function name. + * + */ + private String decoratedName; + /** + * Identifies the index of the immediate parent of the construct in which the result was detected. For example, this property might point to a logical location that represents the namespace that holds a type. + * + */ + private Integer parentIndex = -1; + /** + * The type of construct this logical location component refers to. Should be one of 'function', 'member', 'module', 'namespace', 'parameter', 'resource', 'returnType', 'type', 'variable', 'object', 'array', 'property', 'value', 'element', 'text', 'attribute', 'comment', 'declaration', 'dtd' or 'processingInstruction', if any of those accurately describe the construct. + * + */ + private String kind; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Identifies the construct in which the result occurred. For example, this property might contain the name of a class or a method. + * + */ + public String getName() { + return name; + } + + /** + * Identifies the construct in which the result occurred. For example, this property might contain the name of a class or a method. + * + */ + public void setName(String name) { + this.name = name; + } + + public LogicalLocation withName(String name) { + this.name = name; + return this; + } + + /** + * The index within the logical locations array. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within the logical locations array. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public LogicalLocation withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * The human-readable fully qualified name of the logical location. + * + */ + public String getFullyQualifiedName() { + return fullyQualifiedName; + } + + /** + * The human-readable fully qualified name of the logical location. + * + */ + public void setFullyQualifiedName(String fullyQualifiedName) { + this.fullyQualifiedName = fullyQualifiedName; + } + + public LogicalLocation withFullyQualifiedName(String fullyQualifiedName) { + this.fullyQualifiedName = fullyQualifiedName; + return this; + } + + /** + * The machine-readable name for the logical location, such as a mangled function name provided by a C++ compiler that encodes calling convention, return type and other details along with the function name. + * + */ + public String getDecoratedName() { + return decoratedName; + } + + /** + * The machine-readable name for the logical location, such as a mangled function name provided by a C++ compiler that encodes calling convention, return type and other details along with the function name. + * + */ + public void setDecoratedName(String decoratedName) { + this.decoratedName = decoratedName; + } + + public LogicalLocation withDecoratedName(String decoratedName) { + this.decoratedName = decoratedName; + return this; + } + + /** + * Identifies the index of the immediate parent of the construct in which the result was detected. For example, this property might point to a logical location that represents the namespace that holds a type. + * + */ + public Integer getParentIndex() { + return parentIndex; + } + + /** + * Identifies the index of the immediate parent of the construct in which the result was detected. For example, this property might point to a logical location that represents the namespace that holds a type. + * + */ + public void setParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + } + + public LogicalLocation withParentIndex(Integer parentIndex) { + this.parentIndex = parentIndex; + return this; + } + + /** + * The type of construct this logical location component refers to. Should be one of 'function', 'member', 'module', 'namespace', 'parameter', 'resource', 'returnType', 'type', 'variable', 'object', 'array', 'property', 'value', 'element', 'text', 'attribute', 'comment', 'declaration', 'dtd' or 'processingInstruction', if any of those accurately describe the construct. + * + */ + public String getKind() { + return kind; + } + + /** + * The type of construct this logical location component refers to. Should be one of 'function', 'member', 'module', 'namespace', 'parameter', 'resource', 'returnType', 'type', 'variable', 'object', 'array', 'property', 'value', 'element', 'text', 'attribute', 'comment', 'declaration', 'dtd' or 'processingInstruction', if any of those accurately describe the construct. + * + */ + public void setKind(String kind) { + this.kind = kind; + } + + public LogicalLocation withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public LogicalLocation withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogicalLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("fullyQualifiedName"); + sb.append('='); + sb.append(((this.fullyQualifiedName == null)?"":this.fullyQualifiedName)); + sb.append(','); + sb.append("decoratedName"); + sb.append('='); + sb.append(((this.decoratedName == null)?"":this.decoratedName)); + sb.append(','); + sb.append("parentIndex"); + sb.append('='); + sb.append(((this.parentIndex == null)?"":this.parentIndex)); + sb.append(','); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.parentIndex == null)? 0 :this.parentIndex.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.decoratedName == null)? 0 :this.decoratedName.hashCode())); + result = ((result* 31)+((this.fullyQualifiedName == null)? 0 :this.fullyQualifiedName.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogicalLocation) == false) { + return false; + } + LogicalLocation rhs = ((LogicalLocation) other); + return ((((((((this.parentIndex == rhs.parentIndex)||((this.parentIndex!= null)&&this.parentIndex.equals(rhs.parentIndex)))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.decoratedName == rhs.decoratedName)||((this.decoratedName!= null)&&this.decoratedName.equals(rhs.decoratedName))))&&((this.fullyQualifiedName == rhs.fullyQualifiedName)||((this.fullyQualifiedName!= null)&&this.fullyQualifiedName.equals(rhs.fullyQualifiedName))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Message.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Message.java new file mode 100644 index 0000000..5a0c493 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Message.java @@ -0,0 +1,200 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Encapsulates a message intended to be read by the end user. + * + */ +public class Message { + + /** + * A plain text message string. + * + */ + private String text; + /** + * A Markdown message string. + * + */ + private String markdown; + /** + * The identifier for this message. + * + */ + private String id; + /** + * An array of strings to substitute into the message string. + * + */ + private List arguments = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A plain text message string. + * + */ + public String getText() { + return text; + } + + /** + * A plain text message string. + * + */ + public void setText(String text) { + this.text = text; + } + + public Message withText(String text) { + this.text = text; + return this; + } + + /** + * A Markdown message string. + * + */ + public String getMarkdown() { + return markdown; + } + + /** + * A Markdown message string. + * + */ + public void setMarkdown(String markdown) { + this.markdown = markdown; + } + + public Message withMarkdown(String markdown) { + this.markdown = markdown; + return this; + } + + /** + * The identifier for this message. + * + */ + public String getId() { + return id; + } + + /** + * The identifier for this message. + * + */ + public void setId(String id) { + this.id = id; + } + + public Message withId(String id) { + this.id = id; + return this; + } + + /** + * An array of strings to substitute into the message string. + * + */ + public List getArguments() { + return arguments; + } + + /** + * An array of strings to substitute into the message string. + * + */ + public void setArguments(List arguments) { + this.arguments = arguments; + } + + public Message withArguments(List arguments) { + this.arguments = arguments; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Message withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Message.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("text"); + sb.append('='); + sb.append(((this.text == null)?"":this.text)); + sb.append(','); + sb.append("markdown"); + sb.append('='); + sb.append(((this.markdown == null)?"":this.markdown)); + sb.append(','); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("arguments"); + sb.append('='); + sb.append(((this.arguments == null)?"":this.arguments)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.markdown == null)? 0 :this.markdown.hashCode())); + result = ((result* 31)+((this.arguments == null)? 0 :this.arguments.hashCode())); + result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Message) == false) { + return false; + } + Message rhs = ((Message) other); + return ((((((this.markdown == rhs.markdown)||((this.markdown!= null)&&this.markdown.equals(rhs.markdown)))&&((this.arguments == rhs.arguments)||((this.arguments!= null)&&this.arguments.equals(rhs.arguments))))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MessageStrings.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MessageStrings.java new file mode 100644 index 0000000..99809e5 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MessageStrings.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A set of name/value pairs with arbitrary names. Each value is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ +public class MessageStrings { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public MessageStrings withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MessageStrings.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MessageStrings) == false) { + return false; + } + MessageStrings rhs = ((MessageStrings) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MultiformatMessageString.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MultiformatMessageString.java new file mode 100644 index 0000000..f0061b6 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/MultiformatMessageString.java @@ -0,0 +1,139 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * A message string or message format string rendered in multiple formats. + * + */ +public class MultiformatMessageString { + + /** + * A plain text message string or format string. + * (Required) + * + */ + private String text; + /** + * A Markdown message string or format string. + * + */ + private String markdown; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A plain text message string or format string. + * (Required) + * + */ + public String getText() { + return text; + } + + /** + * A plain text message string or format string. + * (Required) + * + */ + public void setText(String text) { + this.text = text; + } + + public MultiformatMessageString withText(String text) { + this.text = text; + return this; + } + + /** + * A Markdown message string or format string. + * + */ + public String getMarkdown() { + return markdown; + } + + /** + * A Markdown message string or format string. + * + */ + public void setMarkdown(String markdown) { + this.markdown = markdown; + } + + public MultiformatMessageString withMarkdown(String markdown) { + this.markdown = markdown; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public MultiformatMessageString withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MultiformatMessageString.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("text"); + sb.append('='); + sb.append(((this.text == null)?"":this.text)); + sb.append(','); + sb.append("markdown"); + sb.append('='); + sb.append(((this.markdown == null)?"":this.markdown)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.markdown == null)? 0 :this.markdown.hashCode())); + result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MultiformatMessageString) == false) { + return false; + } + MultiformatMessageString rhs = ((MultiformatMessageString) other); + return ((((this.markdown == rhs.markdown)||((this.markdown!= null)&&this.markdown.equals(rhs.markdown)))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Node.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Node.java new file mode 100644 index 0000000..5a2c47c --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Node.java @@ -0,0 +1,203 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Represents a node in a graph. + * + */ +public class Node { + + /** + * A string that uniquely identifies the node within its graph. + * (Required) + * + */ + private String id; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message label; + /** + * A location within a programming artifact. + * + */ + private Location location; + /** + * Array of child nodes. + * + */ + private Set children = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A string that uniquely identifies the node within its graph. + * (Required) + * + */ + public String getId() { + return id; + } + + /** + * A string that uniquely identifies the node within its graph. + * (Required) + * + */ + public void setId(String id) { + this.id = id; + } + + public Node withId(String id) { + this.id = id; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getLabel() { + return label; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setLabel(Message label) { + this.label = label; + } + + public Node withLabel(Message label) { + this.label = label; + return this; + } + + /** + * A location within a programming artifact. + * + */ + public Location getLocation() { + return location; + } + + /** + * A location within a programming artifact. + * + */ + public void setLocation(Location location) { + this.location = location; + } + + public Node withLocation(Location location) { + this.location = location; + return this; + } + + /** + * Array of child nodes. + * + */ + public Set getChildren() { + return children; + } + + /** + * Array of child nodes. + * + */ + public void setChildren(Set children) { + this.children = children; + } + + public Node withChildren(Set children) { + this.children = children; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Node withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Node.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("children"); + sb.append('='); + sb.append(((this.children == null)?"":this.children)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.children == null)? 0 :this.children.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Node) == false) { + return false; + } + Node rhs = ((Node) other); + return ((((((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location)))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.children == rhs.children)||((this.children!= null)&&this.children.equals(rhs.children))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Notification.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Notification.java new file mode 100644 index 0000000..a98da7f --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Notification.java @@ -0,0 +1,374 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + + +/** + * Describes a condition relevant to the tool itself, as opposed to being relevant to a target being analyzed by the tool. + * + */ +public class Notification { + + /** + * The locations relevant to this notification. + * + */ + private Set locations = new LinkedHashSet(); + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + private Message message; + /** + * A value specifying the severity level of the notification. + * + */ + private Notification.Level level = Notification.Level.fromValue("warning"); + /** + * The thread identifier of the code that generated the notification. + * + */ + private Integer threadId; + /** + * The Coordinated Universal Time (UTC) date and time at which the analysis tool generated the notification. + * + */ + private Date timeUtc; + /** + * Describes a runtime exception encountered during the execution of an analysis tool. + * + */ + private Exception exception; + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + private ReportingDescriptorReference descriptor; + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + private ReportingDescriptorReference associatedRule; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The locations relevant to this notification. + * + */ + public Set getLocations() { + return locations; + } + + /** + * The locations relevant to this notification. + * + */ + public void setLocations(Set locations) { + this.locations = locations; + } + + public Notification withLocations(Set locations) { + this.locations = locations; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Notification withMessage(Message message) { + this.message = message; + return this; + } + + /** + * A value specifying the severity level of the notification. + * + */ + public Notification.Level getLevel() { + return level; + } + + /** + * A value specifying the severity level of the notification. + * + */ + public void setLevel(Notification.Level level) { + this.level = level; + } + + public Notification withLevel(Notification.Level level) { + this.level = level; + return this; + } + + /** + * The thread identifier of the code that generated the notification. + * + */ + public Integer getThreadId() { + return threadId; + } + + /** + * The thread identifier of the code that generated the notification. + * + */ + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + public Notification withThreadId(Integer threadId) { + this.threadId = threadId; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the analysis tool generated the notification. + * + */ + public Date getTimeUtc() { + return timeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the analysis tool generated the notification. + * + */ + public void setTimeUtc(Date timeUtc) { + this.timeUtc = timeUtc; + } + + public Notification withTimeUtc(Date timeUtc) { + this.timeUtc = timeUtc; + return this; + } + + /** + * Describes a runtime exception encountered during the execution of an analysis tool. + * + */ + public Exception getException() { + return exception; + } + + /** + * Describes a runtime exception encountered during the execution of an analysis tool. + * + */ + public void setException(Exception exception) { + this.exception = exception; + } + + public Notification withException(Exception exception) { + this.exception = exception; + return this; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public ReportingDescriptorReference getDescriptor() { + return descriptor; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public void setDescriptor(ReportingDescriptorReference descriptor) { + this.descriptor = descriptor; + } + + public Notification withDescriptor(ReportingDescriptorReference descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public ReportingDescriptorReference getAssociatedRule() { + return associatedRule; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public void setAssociatedRule(ReportingDescriptorReference associatedRule) { + this.associatedRule = associatedRule; + } + + public Notification withAssociatedRule(ReportingDescriptorReference associatedRule) { + this.associatedRule = associatedRule; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Notification withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Notification.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("locations"); + sb.append('='); + sb.append(((this.locations == null)?"":this.locations)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("level"); + sb.append('='); + sb.append(((this.level == null)?"":this.level)); + sb.append(','); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("timeUtc"); + sb.append('='); + sb.append(((this.timeUtc == null)?"":this.timeUtc)); + sb.append(','); + sb.append("exception"); + sb.append('='); + sb.append(((this.exception == null)?"":this.exception)); + sb.append(','); + sb.append("descriptor"); + sb.append('='); + sb.append(((this.descriptor == null)?"":this.descriptor)); + sb.append(','); + sb.append("associatedRule"); + sb.append('='); + sb.append(((this.associatedRule == null)?"":this.associatedRule)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.exception == null)? 0 :this.exception.hashCode())); + result = ((result* 31)+((this.level == null)? 0 :this.level.hashCode())); + result = ((result* 31)+((this.associatedRule == null)? 0 :this.associatedRule.hashCode())); + result = ((result* 31)+((this.timeUtc == null)? 0 :this.timeUtc.hashCode())); + result = ((result* 31)+((this.locations == null)? 0 :this.locations.hashCode())); + result = ((result* 31)+((this.descriptor == null)? 0 :this.descriptor.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Notification) == false) { + return false; + } + Notification rhs = ((Notification) other); + return ((((((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.exception == rhs.exception)||((this.exception!= null)&&this.exception.equals(rhs.exception))))&&((this.level == rhs.level)||((this.level!= null)&&this.level.equals(rhs.level))))&&((this.associatedRule == rhs.associatedRule)||((this.associatedRule!= null)&&this.associatedRule.equals(rhs.associatedRule))))&&((this.timeUtc == rhs.timeUtc)||((this.timeUtc!= null)&&this.timeUtc.equals(rhs.timeUtc))))&&((this.locations == rhs.locations)||((this.locations!= null)&&this.locations.equals(rhs.locations))))&&((this.descriptor == rhs.descriptor)||((this.descriptor!= null)&&this.descriptor.equals(rhs.descriptor))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * A value specifying the severity level of the notification. + * + */ + public enum Level { + + NONE("none"), + NOTE("note"), + WARNING("warning"), + ERROR("error"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Notification.Level c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Level(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Notification.Level fromValue(String value) { + Notification.Level constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/OriginalUriBaseIds.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/OriginalUriBaseIds.java new file mode 100644 index 0000000..be6c573 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/OriginalUriBaseIds.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The artifact location specified by each uriBaseId symbol on the machine where the tool originally ran. + * + */ +public class OriginalUriBaseIds { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, ArtifactLocation value) { + this.additionalProperties.put(name, value); + } + + public OriginalUriBaseIds withAdditionalProperty(String name, ArtifactLocation value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OriginalUriBaseIds.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OriginalUriBaseIds) == false) { + return false; + } + OriginalUriBaseIds rhs = ((OriginalUriBaseIds) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Parameters.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Parameters.java new file mode 100644 index 0000000..08ff5ff --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Parameters.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * The request parameters. + * + */ +public class Parameters { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public Parameters withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Parameters.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Parameters) == false) { + return false; + } + Parameters rhs = ((Parameters) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PartialFingerprints.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PartialFingerprints.java new file mode 100644 index 0000000..226ef97 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PartialFingerprints.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A set of strings that contribute to the stable, unique identity of the result. + * + */ +public class PartialFingerprints { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public PartialFingerprints withAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PartialFingerprints.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PartialFingerprints) == false) { + return false; + } + PartialFingerprints rhs = ((PartialFingerprints) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PhysicalLocation.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PhysicalLocation.java new file mode 100644 index 0000000..1874b64 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PhysicalLocation.java @@ -0,0 +1,198 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * A physical location relevant to a result. Specifies a reference to a programming artifact together with a range of bytes or characters within that artifact. + * + */ +public class PhysicalLocation { + + /** + * A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file). + * + */ + private Address address; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation artifactLocation; + /** + * A region within an artifact where a result was detected. + * + */ + private Region region; + /** + * A region within an artifact where a result was detected. + * + */ + private Region contextRegion; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file). + * + */ + public Address getAddress() { + return address; + } + + /** + * A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file). + * + */ + public void setAddress(Address address) { + this.address = address; + } + + public PhysicalLocation withAddress(Address address) { + this.address = address; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getArtifactLocation() { + return artifactLocation; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + } + + public PhysicalLocation withArtifactLocation(ArtifactLocation artifactLocation) { + this.artifactLocation = artifactLocation; + return this; + } + + /** + * A region within an artifact where a result was detected. + * + */ + public Region getRegion() { + return region; + } + + /** + * A region within an artifact where a result was detected. + * + */ + public void setRegion(Region region) { + this.region = region; + } + + public PhysicalLocation withRegion(Region region) { + this.region = region; + return this; + } + + /** + * A region within an artifact where a result was detected. + * + */ + public Region getContextRegion() { + return contextRegion; + } + + /** + * A region within an artifact where a result was detected. + * + */ + public void setContextRegion(Region contextRegion) { + this.contextRegion = contextRegion; + } + + public PhysicalLocation withContextRegion(Region contextRegion) { + this.contextRegion = contextRegion; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public PhysicalLocation withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PhysicalLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("address"); + sb.append('='); + sb.append(((this.address == null)?"":this.address)); + sb.append(','); + sb.append("artifactLocation"); + sb.append('='); + sb.append(((this.artifactLocation == null)?"":this.artifactLocation)); + sb.append(','); + sb.append("region"); + sb.append('='); + sb.append(((this.region == null)?"":this.region)); + sb.append(','); + sb.append("contextRegion"); + sb.append('='); + sb.append(((this.contextRegion == null)?"":this.contextRegion)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.contextRegion == null)? 0 :this.contextRegion.hashCode())); + result = ((result* 31)+((this.address == null)? 0 :this.address.hashCode())); + result = ((result* 31)+((this.region == null)? 0 :this.region.hashCode())); + result = ((result* 31)+((this.artifactLocation == null)? 0 :this.artifactLocation.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PhysicalLocation) == false) { + return false; + } + PhysicalLocation rhs = ((PhysicalLocation) other); + return ((((((this.contextRegion == rhs.contextRegion)||((this.contextRegion!= null)&&this.contextRegion.equals(rhs.contextRegion)))&&((this.address == rhs.address)||((this.address!= null)&&this.address.equals(rhs.address))))&&((this.region == rhs.region)||((this.region!= null)&&this.region.equals(rhs.region))))&&((this.artifactLocation == rhs.artifactLocation)||((this.artifactLocation!= null)&&this.artifactLocation.equals(rhs.artifactLocation))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PropertyBag.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PropertyBag.java new file mode 100644 index 0000000..364c749 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/PropertyBag.java @@ -0,0 +1,128 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + + +/** + * Key/value pairs that provide additional information about the object. + * + */ +public class PropertyBag { + + /** + * This is a modification, see: https://github.com/joelittlejohn/jsonschema2pojo/issues/186 + * + */ + private String category; + /** + * A set of distinct strings that provide additional information. + * + */ + private Set tags = new LinkedHashSet(); + private Map additionalProperties = new LinkedHashMap(); + + /** + * This is a modification, see: https://github.com/joelittlejohn/jsonschema2pojo/issues/186 + * + */ + public String getCategory() { + return category; + } + + /** + * This is a modification, see: https://github.com/joelittlejohn/jsonschema2pojo/issues/186 + * + */ + public void setCategory(String category) { + this.category = category; + } + + public PropertyBag withCategory(String category) { + this.category = category; + return this; + } + + /** + * A set of distinct strings that provide additional information. + * + */ + public Set getTags() { + return tags; + } + + /** + * A set of distinct strings that provide additional information. + * + */ + public void setTags(Set tags) { + this.tags = tags; + } + + public PropertyBag withTags(Set tags) { + this.tags = tags; + return this; + } + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public PropertyBag withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PropertyBag.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("category"); + sb.append('='); + sb.append(((this.category == null)?"":this.category)); + sb.append(','); + sb.append("tags"); + sb.append('='); + sb.append(((this.tags == null)?"":this.tags)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.category == null)? 0 :this.category.hashCode())); + result = ((result* 31)+((this.tags == null)? 0 :this.tags.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PropertyBag) == false) { + return false; + } + PropertyBag rhs = ((PropertyBag) other); + return ((((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))&&((this.category == rhs.category)||((this.category!= null)&&this.category.equals(rhs.category))))&&((this.tags == rhs.tags)||((this.tags!= null)&&this.tags.equals(rhs.tags)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Rectangle.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Rectangle.java new file mode 100644 index 0000000..78f58a5 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Rectangle.java @@ -0,0 +1,229 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * An area within an image. + * + */ +public class Rectangle { + + /** + * The Y coordinate of the top edge of the rectangle, measured in the image's natural units. + * + */ + private Double top; + /** + * The X coordinate of the left edge of the rectangle, measured in the image's natural units. + * + */ + private Double left; + /** + * The Y coordinate of the bottom edge of the rectangle, measured in the image's natural units. + * + */ + private Double bottom; + /** + * The X coordinate of the right edge of the rectangle, measured in the image's natural units. + * + */ + private Double right; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The Y coordinate of the top edge of the rectangle, measured in the image's natural units. + * + */ + public Double getTop() { + return top; + } + + /** + * The Y coordinate of the top edge of the rectangle, measured in the image's natural units. + * + */ + public void setTop(Double top) { + this.top = top; + } + + public Rectangle withTop(Double top) { + this.top = top; + return this; + } + + /** + * The X coordinate of the left edge of the rectangle, measured in the image's natural units. + * + */ + public Double getLeft() { + return left; + } + + /** + * The X coordinate of the left edge of the rectangle, measured in the image's natural units. + * + */ + public void setLeft(Double left) { + this.left = left; + } + + public Rectangle withLeft(Double left) { + this.left = left; + return this; + } + + /** + * The Y coordinate of the bottom edge of the rectangle, measured in the image's natural units. + * + */ + public Double getBottom() { + return bottom; + } + + /** + * The Y coordinate of the bottom edge of the rectangle, measured in the image's natural units. + * + */ + public void setBottom(Double bottom) { + this.bottom = bottom; + } + + public Rectangle withBottom(Double bottom) { + this.bottom = bottom; + return this; + } + + /** + * The X coordinate of the right edge of the rectangle, measured in the image's natural units. + * + */ + public Double getRight() { + return right; + } + + /** + * The X coordinate of the right edge of the rectangle, measured in the image's natural units. + * + */ + public void setRight(Double right) { + this.right = right; + } + + public Rectangle withRight(Double right) { + this.right = right; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Rectangle withMessage(Message message) { + this.message = message; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Rectangle withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Rectangle.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("top"); + sb.append('='); + sb.append(((this.top == null)?"":this.top)); + sb.append(','); + sb.append("left"); + sb.append('='); + sb.append(((this.left == null)?"":this.left)); + sb.append(','); + sb.append("bottom"); + sb.append('='); + sb.append(((this.bottom == null)?"":this.bottom)); + sb.append(','); + sb.append("right"); + sb.append('='); + sb.append(((this.right == null)?"":this.right)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.top == null)? 0 :this.top.hashCode())); + result = ((result* 31)+((this.left == null)? 0 :this.left.hashCode())); + result = ((result* 31)+((this.bottom == null)? 0 :this.bottom.hashCode())); + result = ((result* 31)+((this.right == null)? 0 :this.right.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Rectangle) == false) { + return false; + } + Rectangle rhs = ((Rectangle) other); + return (((((((this.top == rhs.top)||((this.top!= null)&&this.top.equals(rhs.top)))&&((this.left == rhs.left)||((this.left!= null)&&this.left.equals(rhs.left))))&&((this.bottom == rhs.bottom)||((this.bottom!= null)&&this.bottom.equals(rhs.bottom))))&&((this.right == rhs.right)||((this.right!= null)&&this.right.equals(rhs.right))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Region.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Region.java new file mode 100644 index 0000000..25f9450 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Region.java @@ -0,0 +1,415 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * A region within an artifact where a result was detected. + * + */ +public class Region { + + /** + * The line number of the first character in the region. + * + */ + private Integer startLine; + /** + * The column number of the first character in the region. + * + */ + private Integer startColumn; + /** + * The line number of the last character in the region. + * + */ + private Integer endLine; + /** + * The column number of the character following the end of the region. + * + */ + private Integer endColumn; + /** + * The zero-based offset from the beginning of the artifact of the first character in the region. + * + */ + private Integer charOffset = -1; + /** + * The length of the region in characters. + * + */ + private Integer charLength; + /** + * The zero-based offset from the beginning of the artifact of the first byte in the region. + * + */ + private Integer byteOffset = -1; + /** + * The length of the region in bytes. + * + */ + private Integer byteLength; + /** + * Represents the contents of an artifact. + * + */ + private ArtifactContent snippet; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * Specifies the source language, if any, of the portion of the artifact specified by the region object. + * + */ + private String sourceLanguage; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The line number of the first character in the region. + * + */ + public Integer getStartLine() { + return startLine; + } + + /** + * The line number of the first character in the region. + * + */ + public void setStartLine(Integer startLine) { + this.startLine = startLine; + } + + public Region withStartLine(Integer startLine) { + this.startLine = startLine; + return this; + } + + /** + * The column number of the first character in the region. + * + */ + public Integer getStartColumn() { + return startColumn; + } + + /** + * The column number of the first character in the region. + * + */ + public void setStartColumn(Integer startColumn) { + this.startColumn = startColumn; + } + + public Region withStartColumn(Integer startColumn) { + this.startColumn = startColumn; + return this; + } + + /** + * The line number of the last character in the region. + * + */ + public Integer getEndLine() { + return endLine; + } + + /** + * The line number of the last character in the region. + * + */ + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + public Region withEndLine(Integer endLine) { + this.endLine = endLine; + return this; + } + + /** + * The column number of the character following the end of the region. + * + */ + public Integer getEndColumn() { + return endColumn; + } + + /** + * The column number of the character following the end of the region. + * + */ + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + public Region withEndColumn(Integer endColumn) { + this.endColumn = endColumn; + return this; + } + + /** + * The zero-based offset from the beginning of the artifact of the first character in the region. + * + */ + public Integer getCharOffset() { + return charOffset; + } + + /** + * The zero-based offset from the beginning of the artifact of the first character in the region. + * + */ + public void setCharOffset(Integer charOffset) { + this.charOffset = charOffset; + } + + public Region withCharOffset(Integer charOffset) { + this.charOffset = charOffset; + return this; + } + + /** + * The length of the region in characters. + * + */ + public Integer getCharLength() { + return charLength; + } + + /** + * The length of the region in characters. + * + */ + public void setCharLength(Integer charLength) { + this.charLength = charLength; + } + + public Region withCharLength(Integer charLength) { + this.charLength = charLength; + return this; + } + + /** + * The zero-based offset from the beginning of the artifact of the first byte in the region. + * + */ + public Integer getByteOffset() { + return byteOffset; + } + + /** + * The zero-based offset from the beginning of the artifact of the first byte in the region. + * + */ + public void setByteOffset(Integer byteOffset) { + this.byteOffset = byteOffset; + } + + public Region withByteOffset(Integer byteOffset) { + this.byteOffset = byteOffset; + return this; + } + + /** + * The length of the region in bytes. + * + */ + public Integer getByteLength() { + return byteLength; + } + + /** + * The length of the region in bytes. + * + */ + public void setByteLength(Integer byteLength) { + this.byteLength = byteLength; + } + + public Region withByteLength(Integer byteLength) { + this.byteLength = byteLength; + return this; + } + + /** + * Represents the contents of an artifact. + * + */ + public ArtifactContent getSnippet() { + return snippet; + } + + /** + * Represents the contents of an artifact. + * + */ + public void setSnippet(ArtifactContent snippet) { + this.snippet = snippet; + } + + public Region withSnippet(ArtifactContent snippet) { + this.snippet = snippet; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Region withMessage(Message message) { + this.message = message; + return this; + } + + /** + * Specifies the source language, if any, of the portion of the artifact specified by the region object. + * + */ + public String getSourceLanguage() { + return sourceLanguage; + } + + /** + * Specifies the source language, if any, of the portion of the artifact specified by the region object. + * + */ + public void setSourceLanguage(String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + } + + public Region withSourceLanguage(String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Region withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Region.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("startLine"); + sb.append('='); + sb.append(((this.startLine == null)?"":this.startLine)); + sb.append(','); + sb.append("startColumn"); + sb.append('='); + sb.append(((this.startColumn == null)?"":this.startColumn)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("charOffset"); + sb.append('='); + sb.append(((this.charOffset == null)?"":this.charOffset)); + sb.append(','); + sb.append("charLength"); + sb.append('='); + sb.append(((this.charLength == null)?"":this.charLength)); + sb.append(','); + sb.append("byteOffset"); + sb.append('='); + sb.append(((this.byteOffset == null)?"":this.byteOffset)); + sb.append(','); + sb.append("byteLength"); + sb.append('='); + sb.append(((this.byteLength == null)?"":this.byteLength)); + sb.append(','); + sb.append("snippet"); + sb.append('='); + sb.append(((this.snippet == null)?"":this.snippet)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("sourceLanguage"); + sb.append('='); + sb.append(((this.sourceLanguage == null)?"":this.sourceLanguage)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.snippet == null)? 0 :this.snippet.hashCode())); + result = ((result* 31)+((this.charOffset == null)? 0 :this.charOffset.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.charLength == null)? 0 :this.charLength.hashCode())); + result = ((result* 31)+((this.startLine == null)? 0 :this.startLine.hashCode())); + result = ((result* 31)+((this.byteLength == null)? 0 :this.byteLength.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.byteOffset == null)? 0 :this.byteOffset.hashCode())); + result = ((result* 31)+((this.startColumn == null)? 0 :this.startColumn.hashCode())); + result = ((result* 31)+((this.sourceLanguage == null)? 0 :this.sourceLanguage.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Region) == false) { + return false; + } + Region rhs = ((Region) other); + return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.snippet == rhs.snippet)||((this.snippet!= null)&&this.snippet.equals(rhs.snippet))))&&((this.charOffset == rhs.charOffset)||((this.charOffset!= null)&&this.charOffset.equals(rhs.charOffset))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.charLength == rhs.charLength)||((this.charLength!= null)&&this.charLength.equals(rhs.charLength))))&&((this.startLine == rhs.startLine)||((this.startLine!= null)&&this.startLine.equals(rhs.startLine))))&&((this.byteLength == rhs.byteLength)||((this.byteLength!= null)&&this.byteLength.equals(rhs.byteLength))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.byteOffset == rhs.byteOffset)||((this.byteOffset!= null)&&this.byteOffset.equals(rhs.byteOffset))))&&((this.startColumn == rhs.startColumn)||((this.startColumn!= null)&&this.startColumn.equals(rhs.startColumn))))&&((this.sourceLanguage == rhs.sourceLanguage)||((this.sourceLanguage!= null)&&this.sourceLanguage.equals(rhs.sourceLanguage))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Replacement.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Replacement.java new file mode 100644 index 0000000..dc5ae85 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Replacement.java @@ -0,0 +1,139 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * The replacement of a single region of an artifact. + * + */ +public class Replacement { + + /** + * A region within an artifact where a result was detected. + * (Required) + * + */ + private Region deletedRegion; + /** + * Represents the contents of an artifact. + * + */ + private ArtifactContent insertedContent; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A region within an artifact where a result was detected. + * (Required) + * + */ + public Region getDeletedRegion() { + return deletedRegion; + } + + /** + * A region within an artifact where a result was detected. + * (Required) + * + */ + public void setDeletedRegion(Region deletedRegion) { + this.deletedRegion = deletedRegion; + } + + public Replacement withDeletedRegion(Region deletedRegion) { + this.deletedRegion = deletedRegion; + return this; + } + + /** + * Represents the contents of an artifact. + * + */ + public ArtifactContent getInsertedContent() { + return insertedContent; + } + + /** + * Represents the contents of an artifact. + * + */ + public void setInsertedContent(ArtifactContent insertedContent) { + this.insertedContent = insertedContent; + } + + public Replacement withInsertedContent(ArtifactContent insertedContent) { + this.insertedContent = insertedContent; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Replacement withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Replacement.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("deletedRegion"); + sb.append('='); + sb.append(((this.deletedRegion == null)?"":this.deletedRegion)); + sb.append(','); + sb.append("insertedContent"); + sb.append('='); + sb.append(((this.insertedContent == null)?"":this.insertedContent)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.insertedContent == null)? 0 :this.insertedContent.hashCode())); + result = ((result* 31)+((this.deletedRegion == null)? 0 :this.deletedRegion.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Replacement) == false) { + return false; + } + Replacement rhs = ((Replacement) other); + return ((((this.insertedContent == rhs.insertedContent)||((this.insertedContent!= null)&&this.insertedContent.equals(rhs.insertedContent)))&&((this.deletedRegion == rhs.deletedRegion)||((this.deletedRegion!= null)&&this.deletedRegion.equals(rhs.deletedRegion))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingConfiguration.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingConfiguration.java new file mode 100644 index 0000000..c668bfe --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingConfiguration.java @@ -0,0 +1,244 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.HashMap; +import java.util.Map; + + +/** + * Information about a rule or notification that can be configured at runtime. + * + */ +public class ReportingConfiguration { + + /** + * Specifies whether the report may be produced during the scan. + * + */ + private Boolean enabled = true; + /** + * Specifies the failure level for the report. + * + */ + private ReportingConfiguration.Level level = ReportingConfiguration.Level.fromValue("warning"); + /** + * Specifies the relative priority of the report. Used for analysis output only. + * + */ + private Double rank = -1.0D; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag parameters; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Specifies whether the report may be produced during the scan. + * + */ + public Boolean getEnabled() { + return enabled; + } + + /** + * Specifies whether the report may be produced during the scan. + * + */ + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ReportingConfiguration withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Specifies the failure level for the report. + * + */ + public ReportingConfiguration.Level getLevel() { + return level; + } + + /** + * Specifies the failure level for the report. + * + */ + public void setLevel(ReportingConfiguration.Level level) { + this.level = level; + } + + public ReportingConfiguration withLevel(ReportingConfiguration.Level level) { + this.level = level; + return this; + } + + /** + * Specifies the relative priority of the report. Used for analysis output only. + * + */ + public Double getRank() { + return rank; + } + + /** + * Specifies the relative priority of the report. Used for analysis output only. + * + */ + public void setRank(Double rank) { + this.rank = rank; + } + + public ReportingConfiguration withRank(Double rank) { + this.rank = rank; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getParameters() { + return parameters; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setParameters(PropertyBag parameters) { + this.parameters = parameters; + } + + public ReportingConfiguration withParameters(PropertyBag parameters) { + this.parameters = parameters; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ReportingConfiguration withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReportingConfiguration.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("enabled"); + sb.append('='); + sb.append(((this.enabled == null)?"":this.enabled)); + sb.append(','); + sb.append("level"); + sb.append('='); + sb.append(((this.level == null)?"":this.level)); + sb.append(','); + sb.append("rank"); + sb.append('='); + sb.append(((this.rank == null)?"":this.rank)); + sb.append(','); + sb.append("parameters"); + sb.append('='); + sb.append(((this.parameters == null)?"":this.parameters)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.rank == null)? 0 :this.rank.hashCode())); + result = ((result* 31)+((this.level == null)? 0 :this.level.hashCode())); + result = ((result* 31)+((this.parameters == null)? 0 :this.parameters.hashCode())); + result = ((result* 31)+((this.enabled == null)? 0 :this.enabled.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReportingConfiguration) == false) { + return false; + } + ReportingConfiguration rhs = ((ReportingConfiguration) other); + return ((((((this.rank == rhs.rank)||((this.rank!= null)&&this.rank.equals(rhs.rank)))&&((this.level == rhs.level)||((this.level!= null)&&this.level.equals(rhs.level))))&&((this.parameters == rhs.parameters)||((this.parameters!= null)&&this.parameters.equals(rhs.parameters))))&&((this.enabled == rhs.enabled)||((this.enabled!= null)&&this.enabled.equals(rhs.enabled))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * Specifies the failure level for the report. + * + */ + public enum Level { + + NONE("none"), + NOTE("note"), + WARNING("warning"), + ERROR("error"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (ReportingConfiguration.Level c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Level(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static ReportingConfiguration.Level fromValue(String value) { + ReportingConfiguration.Level constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptor.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptor.java new file mode 100644 index 0000000..b1aac4d --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptor.java @@ -0,0 +1,483 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Metadata that describes a specific report produced by the tool, as part of the analysis it provides or its runtime reporting. + * + */ +public class ReportingDescriptor { + + /** + * A stable, opaque identifier for the report. + * (Required) + * + */ + private String id; + /** + * An array of stable, opaque identifiers by which this report was known in some previous version of the analysis tool. + * + */ + private Set deprecatedIds = new LinkedHashSet(); + /** + * A unique identifer for the reporting descriptor in the form of a GUID. + * + */ + private String guid; + /** + * An array of unique identifies in the form of a GUID by which this report was known in some previous version of the analysis tool. + * + */ + private Set deprecatedGuids = new LinkedHashSet(); + /** + * A report identifier that is understandable to an end user. + * + */ + private String name; + /** + * An array of readable identifiers by which this report was known in some previous version of the analysis tool. + * + */ + private Set deprecatedNames = new LinkedHashSet(); + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString shortDescription; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString fullDescription; + /** + * A set of name/value pairs with arbitrary names. Each value is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + private MessageStrings messageStrings; + /** + * Information about a rule or notification that can be configured at runtime. + * + */ + private ReportingConfiguration defaultConfiguration; + /** + * A URI where the primary documentation for the report can be found. + * + */ + private URI helpUri; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString help; + /** + * An array of objects that describe relationships between this reporting descriptor and others. + * + */ + private Set relationships = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A stable, opaque identifier for the report. + * (Required) + * + */ + public String getId() { + return id; + } + + /** + * A stable, opaque identifier for the report. + * (Required) + * + */ + public void setId(String id) { + this.id = id; + } + + public ReportingDescriptor withId(String id) { + this.id = id; + return this; + } + + /** + * An array of stable, opaque identifiers by which this report was known in some previous version of the analysis tool. + * + */ + public Set getDeprecatedIds() { + return deprecatedIds; + } + + /** + * An array of stable, opaque identifiers by which this report was known in some previous version of the analysis tool. + * + */ + public void setDeprecatedIds(Set deprecatedIds) { + this.deprecatedIds = deprecatedIds; + } + + public ReportingDescriptor withDeprecatedIds(Set deprecatedIds) { + this.deprecatedIds = deprecatedIds; + return this; + } + + /** + * A unique identifer for the reporting descriptor in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A unique identifer for the reporting descriptor in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ReportingDescriptor withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * An array of unique identifies in the form of a GUID by which this report was known in some previous version of the analysis tool. + * + */ + public Set getDeprecatedGuids() { + return deprecatedGuids; + } + + /** + * An array of unique identifies in the form of a GUID by which this report was known in some previous version of the analysis tool. + * + */ + public void setDeprecatedGuids(Set deprecatedGuids) { + this.deprecatedGuids = deprecatedGuids; + } + + public ReportingDescriptor withDeprecatedGuids(Set deprecatedGuids) { + this.deprecatedGuids = deprecatedGuids; + return this; + } + + /** + * A report identifier that is understandable to an end user. + * + */ + public String getName() { + return name; + } + + /** + * A report identifier that is understandable to an end user. + * + */ + public void setName(String name) { + this.name = name; + } + + public ReportingDescriptor withName(String name) { + this.name = name; + return this; + } + + /** + * An array of readable identifiers by which this report was known in some previous version of the analysis tool. + * + */ + public Set getDeprecatedNames() { + return deprecatedNames; + } + + /** + * An array of readable identifiers by which this report was known in some previous version of the analysis tool. + * + */ + public void setDeprecatedNames(Set deprecatedNames) { + this.deprecatedNames = deprecatedNames; + } + + public ReportingDescriptor withDeprecatedNames(Set deprecatedNames) { + this.deprecatedNames = deprecatedNames; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getShortDescription() { + return shortDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + } + + public ReportingDescriptor withShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getFullDescription() { + return fullDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + } + + public ReportingDescriptor withFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + return this; + } + + /** + * A set of name/value pairs with arbitrary names. Each value is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + public MessageStrings getMessageStrings() { + return messageStrings; + } + + /** + * A set of name/value pairs with arbitrary names. Each value is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + public void setMessageStrings(MessageStrings messageStrings) { + this.messageStrings = messageStrings; + } + + public ReportingDescriptor withMessageStrings(MessageStrings messageStrings) { + this.messageStrings = messageStrings; + return this; + } + + /** + * Information about a rule or notification that can be configured at runtime. + * + */ + public ReportingConfiguration getDefaultConfiguration() { + return defaultConfiguration; + } + + /** + * Information about a rule or notification that can be configured at runtime. + * + */ + public void setDefaultConfiguration(ReportingConfiguration defaultConfiguration) { + this.defaultConfiguration = defaultConfiguration; + } + + public ReportingDescriptor withDefaultConfiguration(ReportingConfiguration defaultConfiguration) { + this.defaultConfiguration = defaultConfiguration; + return this; + } + + /** + * A URI where the primary documentation for the report can be found. + * + */ + public URI getHelpUri() { + return helpUri; + } + + /** + * A URI where the primary documentation for the report can be found. + * + */ + public void setHelpUri(URI helpUri) { + this.helpUri = helpUri; + } + + public ReportingDescriptor withHelpUri(URI helpUri) { + this.helpUri = helpUri; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getHelp() { + return help; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setHelp(MultiformatMessageString help) { + this.help = help; + } + + public ReportingDescriptor withHelp(MultiformatMessageString help) { + this.help = help; + return this; + } + + /** + * An array of objects that describe relationships between this reporting descriptor and others. + * + */ + public Set getRelationships() { + return relationships; + } + + /** + * An array of objects that describe relationships between this reporting descriptor and others. + * + */ + public void setRelationships(Set relationships) { + this.relationships = relationships; + } + + public ReportingDescriptor withRelationships(Set relationships) { + this.relationships = relationships; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ReportingDescriptor withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReportingDescriptor.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("deprecatedIds"); + sb.append('='); + sb.append(((this.deprecatedIds == null)?"":this.deprecatedIds)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("deprecatedGuids"); + sb.append('='); + sb.append(((this.deprecatedGuids == null)?"":this.deprecatedGuids)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("deprecatedNames"); + sb.append('='); + sb.append(((this.deprecatedNames == null)?"":this.deprecatedNames)); + sb.append(','); + sb.append("shortDescription"); + sb.append('='); + sb.append(((this.shortDescription == null)?"":this.shortDescription)); + sb.append(','); + sb.append("fullDescription"); + sb.append('='); + sb.append(((this.fullDescription == null)?"":this.fullDescription)); + sb.append(','); + sb.append("messageStrings"); + sb.append('='); + sb.append(((this.messageStrings == null)?"":this.messageStrings)); + sb.append(','); + sb.append("defaultConfiguration"); + sb.append('='); + sb.append(((this.defaultConfiguration == null)?"":this.defaultConfiguration)); + sb.append(','); + sb.append("helpUri"); + sb.append('='); + sb.append(((this.helpUri == null)?"":this.helpUri)); + sb.append(','); + sb.append("help"); + sb.append('='); + sb.append(((this.help == null)?"":this.help)); + sb.append(','); + sb.append("relationships"); + sb.append('='); + sb.append(((this.relationships == null)?"":this.relationships)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.deprecatedIds == null)? 0 :this.deprecatedIds.hashCode())); + result = ((result* 31)+((this.deprecatedGuids == null)? 0 :this.deprecatedGuids.hashCode())); + result = ((result* 31)+((this.shortDescription == null)? 0 :this.shortDescription.hashCode())); + result = ((result* 31)+((this.fullDescription == null)? 0 :this.fullDescription.hashCode())); + result = ((result* 31)+((this.helpUri == null)? 0 :this.helpUri.hashCode())); + result = ((result* 31)+((this.defaultConfiguration == null)? 0 :this.defaultConfiguration.hashCode())); + result = ((result* 31)+((this.help == null)? 0 :this.help.hashCode())); + result = ((result* 31)+((this.relationships == null)? 0 :this.relationships.hashCode())); + result = ((result* 31)+((this.messageStrings == null)? 0 :this.messageStrings.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.deprecatedNames == null)? 0 :this.deprecatedNames.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReportingDescriptor) == false) { + return false; + } + ReportingDescriptor rhs = ((ReportingDescriptor) other); + return (((((((((((((((this.deprecatedIds == rhs.deprecatedIds)||((this.deprecatedIds!= null)&&this.deprecatedIds.equals(rhs.deprecatedIds)))&&((this.deprecatedGuids == rhs.deprecatedGuids)||((this.deprecatedGuids!= null)&&this.deprecatedGuids.equals(rhs.deprecatedGuids))))&&((this.shortDescription == rhs.shortDescription)||((this.shortDescription!= null)&&this.shortDescription.equals(rhs.shortDescription))))&&((this.fullDescription == rhs.fullDescription)||((this.fullDescription!= null)&&this.fullDescription.equals(rhs.fullDescription))))&&((this.helpUri == rhs.helpUri)||((this.helpUri!= null)&&this.helpUri.equals(rhs.helpUri))))&&((this.defaultConfiguration == rhs.defaultConfiguration)||((this.defaultConfiguration!= null)&&this.defaultConfiguration.equals(rhs.defaultConfiguration))))&&((this.help == rhs.help)||((this.help!= null)&&this.help.equals(rhs.help))))&&((this.relationships == rhs.relationships)||((this.relationships!= null)&&this.relationships.equals(rhs.relationships))))&&((this.messageStrings == rhs.messageStrings)||((this.messageStrings!= null)&&this.messageStrings.equals(rhs.messageStrings))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.deprecatedNames == rhs.deprecatedNames)||((this.deprecatedNames!= null)&&this.deprecatedNames.equals(rhs.deprecatedNames))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorReference.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorReference.java new file mode 100644 index 0000000..9b50d5c --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorReference.java @@ -0,0 +1,198 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Information about how to locate a relevant reporting descriptor. + * + */ +public class ReportingDescriptorReference { + + /** + * The id of the descriptor. + * + */ + private String id; + /** + * The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context. + * + */ + private Integer index = -1; + /** + * A guid that uniquely identifies the descriptor. + * + */ + private String guid; + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + private ToolComponentReference toolComponent; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The id of the descriptor. + * + */ + public String getId() { + return id; + } + + /** + * The id of the descriptor. + * + */ + public void setId(String id) { + this.id = id; + } + + public ReportingDescriptorReference withId(String id) { + this.id = id; + return this; + } + + /** + * The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public ReportingDescriptorReference withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * A guid that uniquely identifies the descriptor. + * + */ + public String getGuid() { + return guid; + } + + /** + * A guid that uniquely identifies the descriptor. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ReportingDescriptorReference withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + public ToolComponentReference getToolComponent() { + return toolComponent; + } + + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + public void setToolComponent(ToolComponentReference toolComponent) { + this.toolComponent = toolComponent; + } + + public ReportingDescriptorReference withToolComponent(ToolComponentReference toolComponent) { + this.toolComponent = toolComponent; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ReportingDescriptorReference withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReportingDescriptorReference.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("toolComponent"); + sb.append('='); + sb.append(((this.toolComponent == null)?"":this.toolComponent)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.toolComponent == null)? 0 :this.toolComponent.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReportingDescriptorReference) == false) { + return false; + } + ReportingDescriptorReference rhs = ((ReportingDescriptorReference) other); + return ((((((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index)))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.toolComponent == rhs.toolComponent)||((this.toolComponent!= null)&&this.toolComponent.equals(rhs.toolComponent))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorRelationship.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorRelationship.java new file mode 100644 index 0000000..a5ecfcf --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ReportingDescriptorRelationship.java @@ -0,0 +1,173 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Information about the relation of one reporting descriptor to another. + * + */ +public class ReportingDescriptorRelationship { + + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + private ReportingDescriptorReference target; + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'canPrecede', 'canFollow', 'willPrecede', 'willFollow', 'superset', 'subset', 'equal', 'disjoint', 'relevant', and 'incomparable'. + * + */ + private Set kinds = new LinkedHashSet(Arrays.asList("relevant")); + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + public ReportingDescriptorReference getTarget() { + return target; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * (Required) + * + */ + public void setTarget(ReportingDescriptorReference target) { + this.target = target; + } + + public ReportingDescriptorRelationship withTarget(ReportingDescriptorReference target) { + this.target = target; + return this; + } + + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'canPrecede', 'canFollow', 'willPrecede', 'willFollow', 'superset', 'subset', 'equal', 'disjoint', 'relevant', and 'incomparable'. + * + */ + public Set getKinds() { + return kinds; + } + + /** + * A set of distinct strings that categorize the relationship. Well-known kinds include 'canPrecede', 'canFollow', 'willPrecede', 'willFollow', 'superset', 'subset', 'equal', 'disjoint', 'relevant', and 'incomparable'. + * + */ + public void setKinds(Set kinds) { + this.kinds = kinds; + } + + public ReportingDescriptorRelationship withKinds(Set kinds) { + this.kinds = kinds; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public ReportingDescriptorRelationship withDescription(Message description) { + this.description = description; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ReportingDescriptorRelationship withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReportingDescriptorRelationship.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("target"); + sb.append('='); + sb.append(((this.target == null)?"":this.target)); + sb.append(','); + sb.append("kinds"); + sb.append('='); + sb.append(((this.kinds == null)?"":this.kinds)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.kinds == null)? 0 :this.kinds.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.target == null)? 0 :this.target.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReportingDescriptorRelationship) == false) { + return false; + } + ReportingDescriptorRelationship rhs = ((ReportingDescriptorRelationship) other); + return (((((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description)))&&((this.kinds == rhs.kinds)||((this.kinds!= null)&&this.kinds.equals(rhs.kinds))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.target == rhs.target)||((this.target!= null)&&this.target.equals(rhs.target)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Result.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Result.java new file mode 100644 index 0000000..528c2ef --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Result.java @@ -0,0 +1,1027 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * A result produced by an analysis tool. + * + */ +public class Result { + + /** + * The stable, unique identifier of the rule, if any, to which this notification is relevant. This member can be used to retrieve rule metadata from the rules dictionary, if it exists. + * + */ + private String ruleId; + /** + * The index within the tool component rules array of the rule object associated with this result. + * + */ + private Integer ruleIndex = -1; + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + private ReportingDescriptorReference rule; + /** + * A value that categorizes results by evaluation state. + * + */ + private Object kind = null; + /** + * A value specifying the severity level of the result. + * + */ + private Object level = null; + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + private Message message; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation analysisTarget; + /** + * The set of locations where the result was detected. Specify only one location unless the problem indicated by the result can only be corrected by making a change at every specified location. + * + */ + private List locations = new ArrayList(); + /** + * A stable, unique identifer for the result in the form of a GUID. + * + */ + private String guid; + /** + * A stable, unique identifier for the equivalence class of logically identical results to which this result belongs, in the form of a GUID. + * + */ + private String correlationGuid; + /** + * A positive integer specifying the number of times this logically unique result was observed in this run. + * + */ + private Integer occurrenceCount; + /** + * A set of strings that contribute to the stable, unique identity of the result. + * + */ + private PartialFingerprints partialFingerprints; + /** + * A set of strings each of which individually defines a stable, unique identity for the result. + * + */ + private Fingerprints fingerprints; + /** + * An array of 'stack' objects relevant to the result. + * + */ + private Set stacks = new LinkedHashSet(); + /** + * An array of 'codeFlow' objects relevant to the result. + * + */ + private List codeFlows = new ArrayList(); + /** + * An array of zero or more unique graph objects associated with the result. + * + */ + private Set graphs = new LinkedHashSet(); + /** + * An array of one or more unique 'graphTraversal' objects. + * + */ + private Set graphTraversals = new LinkedHashSet(); + /** + * A set of locations relevant to this result. + * + */ + private Set relatedLocations = new LinkedHashSet(); + /** + * A set of suppressions relevant to this result. + * + */ + private Set suppressions = new LinkedHashSet(); + /** + * The state of a result relative to a baseline of a previous run. + * + */ + private Result.BaselineState baselineState; + /** + * A number representing the priority or importance of the result. + * + */ + private Double rank = -1.0D; + /** + * A set of artifacts relevant to the result. + * + */ + private Set attachments = new LinkedHashSet(); + /** + * An absolute URI at which the result can be viewed. + * + */ + private URI hostedViewerUri; + /** + * The URIs of the work items associated with this result. + * + */ + private Set workItemUris = new LinkedHashSet(); + /** + * Contains information about how and when a result was detected. + * + */ + private ResultProvenance provenance; + /** + * An array of 'fix' objects, each of which represents a proposed fix to the problem indicated by the result. + * + */ + private Set fixes = new LinkedHashSet(); + /** + * An array of references to taxonomy reporting descriptors that are applicable to the result. + * + */ + private Set taxa = new LinkedHashSet(); + /** + * Describes an HTTP request. + * + */ + private WebRequest webRequest; + /** + * Describes the response to an HTTP request. + * + */ + private WebResponse webResponse; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The stable, unique identifier of the rule, if any, to which this notification is relevant. This member can be used to retrieve rule metadata from the rules dictionary, if it exists. + * + */ + public String getRuleId() { + return ruleId; + } + + /** + * The stable, unique identifier of the rule, if any, to which this notification is relevant. This member can be used to retrieve rule metadata from the rules dictionary, if it exists. + * + */ + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public Result withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * The index within the tool component rules array of the rule object associated with this result. + * + */ + public Integer getRuleIndex() { + return ruleIndex; + } + + /** + * The index within the tool component rules array of the rule object associated with this result. + * + */ + public void setRuleIndex(Integer ruleIndex) { + this.ruleIndex = ruleIndex; + } + + public Result withRuleIndex(Integer ruleIndex) { + this.ruleIndex = ruleIndex; + return this; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public ReportingDescriptorReference getRule() { + return rule; + } + + /** + * Information about how to locate a relevant reporting descriptor. + * + */ + public void setRule(ReportingDescriptorReference rule) { + this.rule = rule; + } + + public Result withRule(ReportingDescriptorReference rule) { + this.rule = rule; + return this; + } + + /** + * A value that categorizes results by evaluation state. + * + */ + public Object getKind() { + return kind; + } + + /** + * A value that categorizes results by evaluation state. + * + */ + public void setKind(Object kind) { + this.kind = kind; + } + + public Result withKind(Object kind) { + this.kind = kind; + return this; + } + + /** + * A value specifying the severity level of the result. + * + */ + public Object getLevel() { + return level; + } + + /** + * A value specifying the severity level of the result. + * + */ + public void setLevel(Object level) { + this.level = level; + } + + public Result withLevel(Object level) { + this.level = level; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * (Required) + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Result withMessage(Message message) { + this.message = message; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getAnalysisTarget() { + return analysisTarget; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setAnalysisTarget(ArtifactLocation analysisTarget) { + this.analysisTarget = analysisTarget; + } + + public Result withAnalysisTarget(ArtifactLocation analysisTarget) { + this.analysisTarget = analysisTarget; + return this; + } + + /** + * The set of locations where the result was detected. Specify only one location unless the problem indicated by the result can only be corrected by making a change at every specified location. + * + */ + public List getLocations() { + return locations; + } + + /** + * The set of locations where the result was detected. Specify only one location unless the problem indicated by the result can only be corrected by making a change at every specified location. + * + */ + public void setLocations(List locations) { + this.locations = locations; + } + + public Result withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * A stable, unique identifer for the result in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A stable, unique identifer for the result in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public Result withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * A stable, unique identifier for the equivalence class of logically identical results to which this result belongs, in the form of a GUID. + * + */ + public String getCorrelationGuid() { + return correlationGuid; + } + + /** + * A stable, unique identifier for the equivalence class of logically identical results to which this result belongs, in the form of a GUID. + * + */ + public void setCorrelationGuid(String correlationGuid) { + this.correlationGuid = correlationGuid; + } + + public Result withCorrelationGuid(String correlationGuid) { + this.correlationGuid = correlationGuid; + return this; + } + + /** + * A positive integer specifying the number of times this logically unique result was observed in this run. + * + */ + public Integer getOccurrenceCount() { + return occurrenceCount; + } + + /** + * A positive integer specifying the number of times this logically unique result was observed in this run. + * + */ + public void setOccurrenceCount(Integer occurrenceCount) { + this.occurrenceCount = occurrenceCount; + } + + public Result withOccurrenceCount(Integer occurrenceCount) { + this.occurrenceCount = occurrenceCount; + return this; + } + + /** + * A set of strings that contribute to the stable, unique identity of the result. + * + */ + public PartialFingerprints getPartialFingerprints() { + return partialFingerprints; + } + + /** + * A set of strings that contribute to the stable, unique identity of the result. + * + */ + public void setPartialFingerprints(PartialFingerprints partialFingerprints) { + this.partialFingerprints = partialFingerprints; + } + + public Result withPartialFingerprints(PartialFingerprints partialFingerprints) { + this.partialFingerprints = partialFingerprints; + return this; + } + + /** + * A set of strings each of which individually defines a stable, unique identity for the result. + * + */ + public Fingerprints getFingerprints() { + return fingerprints; + } + + /** + * A set of strings each of which individually defines a stable, unique identity for the result. + * + */ + public void setFingerprints(Fingerprints fingerprints) { + this.fingerprints = fingerprints; + } + + public Result withFingerprints(Fingerprints fingerprints) { + this.fingerprints = fingerprints; + return this; + } + + /** + * An array of 'stack' objects relevant to the result. + * + */ + public Set getStacks() { + return stacks; + } + + /** + * An array of 'stack' objects relevant to the result. + * + */ + public void setStacks(Set stacks) { + this.stacks = stacks; + } + + public Result withStacks(Set stacks) { + this.stacks = stacks; + return this; + } + + /** + * An array of 'codeFlow' objects relevant to the result. + * + */ + public List getCodeFlows() { + return codeFlows; + } + + /** + * An array of 'codeFlow' objects relevant to the result. + * + */ + public void setCodeFlows(List codeFlows) { + this.codeFlows = codeFlows; + } + + public Result withCodeFlows(List codeFlows) { + this.codeFlows = codeFlows; + return this; + } + + /** + * An array of zero or more unique graph objects associated with the result. + * + */ + public Set getGraphs() { + return graphs; + } + + /** + * An array of zero or more unique graph objects associated with the result. + * + */ + public void setGraphs(Set graphs) { + this.graphs = graphs; + } + + public Result withGraphs(Set graphs) { + this.graphs = graphs; + return this; + } + + /** + * An array of one or more unique 'graphTraversal' objects. + * + */ + public Set getGraphTraversals() { + return graphTraversals; + } + + /** + * An array of one or more unique 'graphTraversal' objects. + * + */ + public void setGraphTraversals(Set graphTraversals) { + this.graphTraversals = graphTraversals; + } + + public Result withGraphTraversals(Set graphTraversals) { + this.graphTraversals = graphTraversals; + return this; + } + + /** + * A set of locations relevant to this result. + * + */ + public Set getRelatedLocations() { + return relatedLocations; + } + + /** + * A set of locations relevant to this result. + * + */ + public void setRelatedLocations(Set relatedLocations) { + this.relatedLocations = relatedLocations; + } + + public Result withRelatedLocations(Set relatedLocations) { + this.relatedLocations = relatedLocations; + return this; + } + + /** + * A set of suppressions relevant to this result. + * + */ + public Set getSuppressions() { + return suppressions; + } + + /** + * A set of suppressions relevant to this result. + * + */ + public void setSuppressions(Set suppressions) { + this.suppressions = suppressions; + } + + public Result withSuppressions(Set suppressions) { + this.suppressions = suppressions; + return this; + } + + /** + * The state of a result relative to a baseline of a previous run. + * + */ + public Result.BaselineState getBaselineState() { + return baselineState; + } + + /** + * The state of a result relative to a baseline of a previous run. + * + */ + public void setBaselineState(Result.BaselineState baselineState) { + this.baselineState = baselineState; + } + + public Result withBaselineState(Result.BaselineState baselineState) { + this.baselineState = baselineState; + return this; + } + + /** + * A number representing the priority or importance of the result. + * + */ + public Double getRank() { + return rank; + } + + /** + * A number representing the priority or importance of the result. + * + */ + public void setRank(Double rank) { + this.rank = rank; + } + + public Result withRank(Double rank) { + this.rank = rank; + return this; + } + + /** + * A set of artifacts relevant to the result. + * + */ + public Set getAttachments() { + return attachments; + } + + /** + * A set of artifacts relevant to the result. + * + */ + public void setAttachments(Set attachments) { + this.attachments = attachments; + } + + public Result withAttachments(Set attachments) { + this.attachments = attachments; + return this; + } + + /** + * An absolute URI at which the result can be viewed. + * + */ + public URI getHostedViewerUri() { + return hostedViewerUri; + } + + /** + * An absolute URI at which the result can be viewed. + * + */ + public void setHostedViewerUri(URI hostedViewerUri) { + this.hostedViewerUri = hostedViewerUri; + } + + public Result withHostedViewerUri(URI hostedViewerUri) { + this.hostedViewerUri = hostedViewerUri; + return this; + } + + /** + * The URIs of the work items associated with this result. + * + */ + public Set getWorkItemUris() { + return workItemUris; + } + + /** + * The URIs of the work items associated with this result. + * + */ + public void setWorkItemUris(Set workItemUris) { + this.workItemUris = workItemUris; + } + + public Result withWorkItemUris(Set workItemUris) { + this.workItemUris = workItemUris; + return this; + } + + /** + * Contains information about how and when a result was detected. + * + */ + public ResultProvenance getProvenance() { + return provenance; + } + + /** + * Contains information about how and when a result was detected. + * + */ + public void setProvenance(ResultProvenance provenance) { + this.provenance = provenance; + } + + public Result withProvenance(ResultProvenance provenance) { + this.provenance = provenance; + return this; + } + + /** + * An array of 'fix' objects, each of which represents a proposed fix to the problem indicated by the result. + * + */ + public Set getFixes() { + return fixes; + } + + /** + * An array of 'fix' objects, each of which represents a proposed fix to the problem indicated by the result. + * + */ + public void setFixes(Set fixes) { + this.fixes = fixes; + } + + public Result withFixes(Set fixes) { + this.fixes = fixes; + return this; + } + + /** + * An array of references to taxonomy reporting descriptors that are applicable to the result. + * + */ + public Set getTaxa() { + return taxa; + } + + /** + * An array of references to taxonomy reporting descriptors that are applicable to the result. + * + */ + public void setTaxa(Set taxa) { + this.taxa = taxa; + } + + public Result withTaxa(Set taxa) { + this.taxa = taxa; + return this; + } + + /** + * Describes an HTTP request. + * + */ + public WebRequest getWebRequest() { + return webRequest; + } + + /** + * Describes an HTTP request. + * + */ + public void setWebRequest(WebRequest webRequest) { + this.webRequest = webRequest; + } + + public Result withWebRequest(WebRequest webRequest) { + this.webRequest = webRequest; + return this; + } + + /** + * Describes the response to an HTTP request. + * + */ + public WebResponse getWebResponse() { + return webResponse; + } + + /** + * Describes the response to an HTTP request. + * + */ + public void setWebResponse(WebResponse webResponse) { + this.webResponse = webResponse; + } + + public Result withWebResponse(WebResponse webResponse) { + this.webResponse = webResponse; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Result withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Result.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("ruleId"); + sb.append('='); + sb.append(((this.ruleId == null)?"":this.ruleId)); + sb.append(','); + sb.append("ruleIndex"); + sb.append('='); + sb.append(((this.ruleIndex == null)?"":this.ruleIndex)); + sb.append(','); + sb.append("rule"); + sb.append('='); + sb.append(((this.rule == null)?"":this.rule)); + sb.append(','); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("level"); + sb.append('='); + sb.append(((this.level == null)?"":this.level)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("analysisTarget"); + sb.append('='); + sb.append(((this.analysisTarget == null)?"":this.analysisTarget)); + sb.append(','); + sb.append("locations"); + sb.append('='); + sb.append(((this.locations == null)?"":this.locations)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("correlationGuid"); + sb.append('='); + sb.append(((this.correlationGuid == null)?"":this.correlationGuid)); + sb.append(','); + sb.append("occurrenceCount"); + sb.append('='); + sb.append(((this.occurrenceCount == null)?"":this.occurrenceCount)); + sb.append(','); + sb.append("partialFingerprints"); + sb.append('='); + sb.append(((this.partialFingerprints == null)?"":this.partialFingerprints)); + sb.append(','); + sb.append("fingerprints"); + sb.append('='); + sb.append(((this.fingerprints == null)?"":this.fingerprints)); + sb.append(','); + sb.append("stacks"); + sb.append('='); + sb.append(((this.stacks == null)?"":this.stacks)); + sb.append(','); + sb.append("codeFlows"); + sb.append('='); + sb.append(((this.codeFlows == null)?"":this.codeFlows)); + sb.append(','); + sb.append("graphs"); + sb.append('='); + sb.append(((this.graphs == null)?"":this.graphs)); + sb.append(','); + sb.append("graphTraversals"); + sb.append('='); + sb.append(((this.graphTraversals == null)?"":this.graphTraversals)); + sb.append(','); + sb.append("relatedLocations"); + sb.append('='); + sb.append(((this.relatedLocations == null)?"":this.relatedLocations)); + sb.append(','); + sb.append("suppressions"); + sb.append('='); + sb.append(((this.suppressions == null)?"":this.suppressions)); + sb.append(','); + sb.append("baselineState"); + sb.append('='); + sb.append(((this.baselineState == null)?"":this.baselineState)); + sb.append(','); + sb.append("rank"); + sb.append('='); + sb.append(((this.rank == null)?"":this.rank)); + sb.append(','); + sb.append("attachments"); + sb.append('='); + sb.append(((this.attachments == null)?"":this.attachments)); + sb.append(','); + sb.append("hostedViewerUri"); + sb.append('='); + sb.append(((this.hostedViewerUri == null)?"":this.hostedViewerUri)); + sb.append(','); + sb.append("workItemUris"); + sb.append('='); + sb.append(((this.workItemUris == null)?"":this.workItemUris)); + sb.append(','); + sb.append("provenance"); + sb.append('='); + sb.append(((this.provenance == null)?"":this.provenance)); + sb.append(','); + sb.append("fixes"); + sb.append('='); + sb.append(((this.fixes == null)?"":this.fixes)); + sb.append(','); + sb.append("taxa"); + sb.append('='); + sb.append(((this.taxa == null)?"":this.taxa)); + sb.append(','); + sb.append("webRequest"); + sb.append('='); + sb.append(((this.webRequest == null)?"":this.webRequest)); + sb.append(','); + sb.append("webResponse"); + sb.append('='); + sb.append(((this.webResponse == null)?"":this.webResponse)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.attachments == null)? 0 :this.attachments.hashCode())); + result = ((result* 31)+((this.correlationGuid == null)? 0 :this.correlationGuid.hashCode())); + result = ((result* 31)+((this.webRequest == null)? 0 :this.webRequest.hashCode())); + result = ((result* 31)+((this.graphTraversals == null)? 0 :this.graphTraversals.hashCode())); + result = ((result* 31)+((this.rule == null)? 0 :this.rule.hashCode())); + result = ((result* 31)+((this.analysisTarget == null)? 0 :this.analysisTarget.hashCode())); + result = ((result* 31)+((this.fixes == null)? 0 :this.fixes.hashCode())); + result = ((result* 31)+((this.relatedLocations == null)? 0 :this.relatedLocations.hashCode())); + result = ((result* 31)+((this.graphs == null)? 0 :this.graphs.hashCode())); + result = ((result* 31)+((this.provenance == null)? 0 :this.provenance.hashCode())); + result = ((result* 31)+((this.rank == null)? 0 :this.rank.hashCode())); + result = ((result* 31)+((this.ruleId == null)? 0 :this.ruleId.hashCode())); + result = ((result* 31)+((this.taxa == null)? 0 :this.taxa.hashCode())); + result = ((result* 31)+((this.ruleIndex == null)? 0 :this.ruleIndex.hashCode())); + result = ((result* 31)+((this.suppressions == null)? 0 :this.suppressions.hashCode())); + result = ((result* 31)+((this.level == null)? 0 :this.level.hashCode())); + result = ((result* 31)+((this.hostedViewerUri == null)? 0 :this.hostedViewerUri.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.stacks == null)? 0 :this.stacks.hashCode())); + result = ((result* 31)+((this.occurrenceCount == null)? 0 :this.occurrenceCount.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.fingerprints == null)? 0 :this.fingerprints.hashCode())); + result = ((result* 31)+((this.codeFlows == null)? 0 :this.codeFlows.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.partialFingerprints == null)? 0 :this.partialFingerprints.hashCode())); + result = ((result* 31)+((this.webResponse == null)? 0 :this.webResponse.hashCode())); + result = ((result* 31)+((this.locations == null)? 0 :this.locations.hashCode())); + result = ((result* 31)+((this.baselineState == null)? 0 :this.baselineState.hashCode())); + result = ((result* 31)+((this.workItemUris == null)? 0 :this.workItemUris.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Result) == false) { + return false; + } + Result rhs = ((Result) other); + return (((((((((((((((((((((((((((((((this.attachments == rhs.attachments)||((this.attachments!= null)&&this.attachments.equals(rhs.attachments)))&&((this.correlationGuid == rhs.correlationGuid)||((this.correlationGuid!= null)&&this.correlationGuid.equals(rhs.correlationGuid))))&&((this.webRequest == rhs.webRequest)||((this.webRequest!= null)&&this.webRequest.equals(rhs.webRequest))))&&((this.graphTraversals == rhs.graphTraversals)||((this.graphTraversals!= null)&&this.graphTraversals.equals(rhs.graphTraversals))))&&((this.rule == rhs.rule)||((this.rule!= null)&&this.rule.equals(rhs.rule))))&&((this.analysisTarget == rhs.analysisTarget)||((this.analysisTarget!= null)&&this.analysisTarget.equals(rhs.analysisTarget))))&&((this.fixes == rhs.fixes)||((this.fixes!= null)&&this.fixes.equals(rhs.fixes))))&&((this.relatedLocations == rhs.relatedLocations)||((this.relatedLocations!= null)&&this.relatedLocations.equals(rhs.relatedLocations))))&&((this.graphs == rhs.graphs)||((this.graphs!= null)&&this.graphs.equals(rhs.graphs))))&&((this.provenance == rhs.provenance)||((this.provenance!= null)&&this.provenance.equals(rhs.provenance))))&&((this.rank == rhs.rank)||((this.rank!= null)&&this.rank.equals(rhs.rank))))&&((this.ruleId == rhs.ruleId)||((this.ruleId!= null)&&this.ruleId.equals(rhs.ruleId))))&&((this.taxa == rhs.taxa)||((this.taxa!= null)&&this.taxa.equals(rhs.taxa))))&&((this.ruleIndex == rhs.ruleIndex)||((this.ruleIndex!= null)&&this.ruleIndex.equals(rhs.ruleIndex))))&&((this.suppressions == rhs.suppressions)||((this.suppressions!= null)&&this.suppressions.equals(rhs.suppressions))))&&((this.level == rhs.level)||((this.level!= null)&&this.level.equals(rhs.level))))&&((this.hostedViewerUri == rhs.hostedViewerUri)||((this.hostedViewerUri!= null)&&this.hostedViewerUri.equals(rhs.hostedViewerUri))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.stacks == rhs.stacks)||((this.stacks!= null)&&this.stacks.equals(rhs.stacks))))&&((this.occurrenceCount == rhs.occurrenceCount)||((this.occurrenceCount!= null)&&this.occurrenceCount.equals(rhs.occurrenceCount))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.fingerprints == rhs.fingerprints)||((this.fingerprints!= null)&&this.fingerprints.equals(rhs.fingerprints))))&&((this.codeFlows == rhs.codeFlows)||((this.codeFlows!= null)&&this.codeFlows.equals(rhs.codeFlows))))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.partialFingerprints == rhs.partialFingerprints)||((this.partialFingerprints!= null)&&this.partialFingerprints.equals(rhs.partialFingerprints))))&&((this.webResponse == rhs.webResponse)||((this.webResponse!= null)&&this.webResponse.equals(rhs.webResponse))))&&((this.locations == rhs.locations)||((this.locations!= null)&&this.locations.equals(rhs.locations))))&&((this.baselineState == rhs.baselineState)||((this.baselineState!= null)&&this.baselineState.equals(rhs.baselineState))))&&((this.workItemUris == rhs.workItemUris)||((this.workItemUris!= null)&&this.workItemUris.equals(rhs.workItemUris))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * The state of a result relative to a baseline of a previous run. + * + */ + public enum BaselineState { + + NEW("new"), + UNCHANGED("unchanged"), + UPDATED("updated"), + ABSENT("absent"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Result.BaselineState c: values()) { + CONSTANTS.put(c.value, c); + } + } + + BaselineState(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Result.BaselineState fromValue(String value) { + Result.BaselineState constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ResultProvenance.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ResultProvenance.java new file mode 100644 index 0000000..633e266 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ResultProvenance.java @@ -0,0 +1,263 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Date; +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * Contains information about how and when a result was detected. + * + */ +public class ResultProvenance { + + /** + * The Coordinated Universal Time (UTC) date and time at which the result was first detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + private Date firstDetectionTimeUtc; + /** + * The Coordinated Universal Time (UTC) date and time at which the result was most recently detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + private Date lastDetectionTimeUtc; + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was first detected. + * + */ + private String firstDetectionRunGuid; + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was most recently detected. + * + */ + private String lastDetectionRunGuid; + /** + * The index within the run.invocations array of the invocation object which describes the tool invocation that detected the result. + * + */ + private Integer invocationIndex = -1; + /** + * An array of physicalLocation objects which specify the portions of an analysis tool's output that a converter transformed into the result. + * + */ + private Set conversionSources = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The Coordinated Universal Time (UTC) date and time at which the result was first detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public Date getFirstDetectionTimeUtc() { + return firstDetectionTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the result was first detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public void setFirstDetectionTimeUtc(Date firstDetectionTimeUtc) { + this.firstDetectionTimeUtc = firstDetectionTimeUtc; + } + + public ResultProvenance withFirstDetectionTimeUtc(Date firstDetectionTimeUtc) { + this.firstDetectionTimeUtc = firstDetectionTimeUtc; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the result was most recently detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public Date getLastDetectionTimeUtc() { + return lastDetectionTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which the result was most recently detected. See "Date/time properties" in the SARIF spec for the required format. + * + */ + public void setLastDetectionTimeUtc(Date lastDetectionTimeUtc) { + this.lastDetectionTimeUtc = lastDetectionTimeUtc; + } + + public ResultProvenance withLastDetectionTimeUtc(Date lastDetectionTimeUtc) { + this.lastDetectionTimeUtc = lastDetectionTimeUtc; + return this; + } + + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was first detected. + * + */ + public String getFirstDetectionRunGuid() { + return firstDetectionRunGuid; + } + + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was first detected. + * + */ + public void setFirstDetectionRunGuid(String firstDetectionRunGuid) { + this.firstDetectionRunGuid = firstDetectionRunGuid; + } + + public ResultProvenance withFirstDetectionRunGuid(String firstDetectionRunGuid) { + this.firstDetectionRunGuid = firstDetectionRunGuid; + return this; + } + + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was most recently detected. + * + */ + public String getLastDetectionRunGuid() { + return lastDetectionRunGuid; + } + + /** + * A GUID-valued string equal to the automationDetails.guid property of the run in which the result was most recently detected. + * + */ + public void setLastDetectionRunGuid(String lastDetectionRunGuid) { + this.lastDetectionRunGuid = lastDetectionRunGuid; + } + + public ResultProvenance withLastDetectionRunGuid(String lastDetectionRunGuid) { + this.lastDetectionRunGuid = lastDetectionRunGuid; + return this; + } + + /** + * The index within the run.invocations array of the invocation object which describes the tool invocation that detected the result. + * + */ + public Integer getInvocationIndex() { + return invocationIndex; + } + + /** + * The index within the run.invocations array of the invocation object which describes the tool invocation that detected the result. + * + */ + public void setInvocationIndex(Integer invocationIndex) { + this.invocationIndex = invocationIndex; + } + + public ResultProvenance withInvocationIndex(Integer invocationIndex) { + this.invocationIndex = invocationIndex; + return this; + } + + /** + * An array of physicalLocation objects which specify the portions of an analysis tool's output that a converter transformed into the result. + * + */ + public Set getConversionSources() { + return conversionSources; + } + + /** + * An array of physicalLocation objects which specify the portions of an analysis tool's output that a converter transformed into the result. + * + */ + public void setConversionSources(Set conversionSources) { + this.conversionSources = conversionSources; + } + + public ResultProvenance withConversionSources(Set conversionSources) { + this.conversionSources = conversionSources; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ResultProvenance withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ResultProvenance.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("firstDetectionTimeUtc"); + sb.append('='); + sb.append(((this.firstDetectionTimeUtc == null)?"":this.firstDetectionTimeUtc)); + sb.append(','); + sb.append("lastDetectionTimeUtc"); + sb.append('='); + sb.append(((this.lastDetectionTimeUtc == null)?"":this.lastDetectionTimeUtc)); + sb.append(','); + sb.append("firstDetectionRunGuid"); + sb.append('='); + sb.append(((this.firstDetectionRunGuid == null)?"":this.firstDetectionRunGuid)); + sb.append(','); + sb.append("lastDetectionRunGuid"); + sb.append('='); + sb.append(((this.lastDetectionRunGuid == null)?"":this.lastDetectionRunGuid)); + sb.append(','); + sb.append("invocationIndex"); + sb.append('='); + sb.append(((this.invocationIndex == null)?"":this.invocationIndex)); + sb.append(','); + sb.append("conversionSources"); + sb.append('='); + sb.append(((this.conversionSources == null)?"":this.conversionSources)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.firstDetectionRunGuid == null)? 0 :this.firstDetectionRunGuid.hashCode())); + result = ((result* 31)+((this.lastDetectionTimeUtc == null)? 0 :this.lastDetectionTimeUtc.hashCode())); + result = ((result* 31)+((this.invocationIndex == null)? 0 :this.invocationIndex.hashCode())); + result = ((result* 31)+((this.lastDetectionRunGuid == null)? 0 :this.lastDetectionRunGuid.hashCode())); + result = ((result* 31)+((this.conversionSources == null)? 0 :this.conversionSources.hashCode())); + result = ((result* 31)+((this.firstDetectionTimeUtc == null)? 0 :this.firstDetectionTimeUtc.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ResultProvenance) == false) { + return false; + } + ResultProvenance rhs = ((ResultProvenance) other); + return ((((((((this.firstDetectionRunGuid == rhs.firstDetectionRunGuid)||((this.firstDetectionRunGuid!= null)&&this.firstDetectionRunGuid.equals(rhs.firstDetectionRunGuid)))&&((this.lastDetectionTimeUtc == rhs.lastDetectionTimeUtc)||((this.lastDetectionTimeUtc!= null)&&this.lastDetectionTimeUtc.equals(rhs.lastDetectionTimeUtc))))&&((this.invocationIndex == rhs.invocationIndex)||((this.invocationIndex!= null)&&this.invocationIndex.equals(rhs.invocationIndex))))&&((this.lastDetectionRunGuid == rhs.lastDetectionRunGuid)||((this.lastDetectionRunGuid!= null)&&this.lastDetectionRunGuid.equals(rhs.lastDetectionRunGuid))))&&((this.conversionSources == rhs.conversionSources)||((this.conversionSources!= null)&&this.conversionSources.equals(rhs.conversionSources))))&&((this.firstDetectionTimeUtc == rhs.firstDetectionTimeUtc)||((this.firstDetectionTimeUtc!= null)&&this.firstDetectionTimeUtc.equals(rhs.firstDetectionTimeUtc))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Role.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Role.java new file mode 100644 index 0000000..40d648a --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Role.java @@ -0,0 +1,63 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.HashMap; +import java.util.Map; + +public enum Role { + + ANALYSIS_TARGET("analysisTarget"), + ATTACHMENT("attachment"), + RESPONSE_FILE("responseFile"), + RESULT_FILE("resultFile"), + STANDARD_STREAM("standardStream"), + TRACED_FILE("tracedFile"), + UNMODIFIED("unmodified"), + MODIFIED("modified"), + ADDED("added"), + DELETED("deleted"), + RENAMED("renamed"), + UNCONTROLLED("uncontrolled"), + DRIVER("driver"), + EXTENSION("extension"), + TRANSLATION("translation"), + TAXONOMY("taxonomy"), + POLICY("policy"), + REFERENCED_ON_COMMAND_LINE("referencedOnCommandLine"), + MEMORY_CONTENTS("memoryContents"), + DIRECTORY("directory"), + USER_SPECIFIED_CONFIGURATION("userSpecifiedConfiguration"), + TOOL_SPECIFIED_CONFIGURATION("toolSpecifiedConfiguration"), + DEBUG_OUTPUT_FILE("debugOutputFile"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Role c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Role(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Role fromValue(String value) { + Role constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Run.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Run.java new file mode 100644 index 0000000..1049f32 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Run.java @@ -0,0 +1,963 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * Describes a single run of an analysis tool, and contains the reported output of that run. + * + */ +public class Run { + + /** + * The analysis tool that was run. + * (Required) + * + */ + private Tool tool; + /** + * Describes the invocation of the analysis tool. + * + */ + private List invocations = new ArrayList(); + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + private Conversion conversion; + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + private String language = "en-US"; + /** + * Specifies the revision in version control of the artifacts that were scanned. + * + */ + private Set versionControlProvenance = new LinkedHashSet(); + /** + * The artifact location specified by each uriBaseId symbol on the machine where the tool originally ran. + * + */ + private OriginalUriBaseIds originalUriBaseIds; + /** + * An array of artifact objects relevant to the run. + * + */ + private Set artifacts = new LinkedHashSet(); + /** + * An array of logical locations such as namespaces, types or functions. + * + */ + private Set logicalLocations = new LinkedHashSet(); + /** + * An array of zero or more unique graph objects associated with the run. + * + */ + private Set graphs = new LinkedHashSet(); + /** + * The set of results contained in an SARIF log. The results array can be omitted when a run is solely exporting rules metadata. It must be present (but may be empty) if a log file represents an actual scan. + * + */ + private List results = new ArrayList(); + /** + * Information that describes a run's identity and role within an engineering system process. + * + */ + private RunAutomationDetails automationDetails; + /** + * Automation details that describe the aggregate of runs to which this run belongs. + * + */ + private Set runAggregates = new LinkedHashSet(); + /** + * The 'guid' property of a previous SARIF 'run' that comprises the baseline that was used to compute result 'baselineState' properties for the run. + * + */ + private String baselineGuid; + /** + * An array of strings used to replace sensitive information in a redaction-aware property. + * + */ + private Set redactionTokens = new LinkedHashSet(); + /** + * Specifies the default encoding for any artifact object that refers to a text file. + * + */ + private String defaultEncoding; + /** + * Specifies the default source language for any artifact object that refers to a text file that contains source code. + * + */ + private String defaultSourceLanguage; + /** + * An ordered list of character sequences that were treated as line breaks when computing region information for the run. + * + */ + private Set newlineSequences = new LinkedHashSet(Arrays.asList("\r\n", "\n")); + /** + * Specifies the unit in which the tool measures columns. + * + */ + private Run.ColumnKind columnKind; + /** + * References to external property files that should be inlined with the content of a root log file. + * + */ + private ExternalPropertyFileReferences externalPropertyFileReferences; + /** + * An array of threadFlowLocation objects cached at run level. + * + */ + private Set threadFlowLocations = new LinkedHashSet(); + /** + * An array of toolComponent objects relevant to a taxonomy in which results are categorized. + * + */ + private Set taxonomies = new LinkedHashSet(); + /** + * Addresses associated with this run instance, if any. + * + */ + private List
addresses = new ArrayList
(); + /** + * The set of available translations of the localized data provided by the tool. + * + */ + private Set translations = new LinkedHashSet(); + /** + * Contains configurations that may potentially override both reportingDescriptor.defaultConfiguration (the tool's default severities) and invocation.configurationOverrides (severities established at run-time from the command line). + * + */ + private Set policies = new LinkedHashSet(); + /** + * An array of request objects cached at run level. + * + */ + private Set webRequests = new LinkedHashSet(); + /** + * An array of response objects cached at run level. + * + */ + private Set webResponses = new LinkedHashSet(); + /** + * Defines locations of special significance to SARIF consumers. + * + */ + private SpecialLocations specialLocations; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The analysis tool that was run. + * (Required) + * + */ + public Tool getTool() { + return tool; + } + + /** + * The analysis tool that was run. + * (Required) + * + */ + public void setTool(Tool tool) { + this.tool = tool; + } + + public Run withTool(Tool tool) { + this.tool = tool; + return this; + } + + /** + * Describes the invocation of the analysis tool. + * + */ + public List getInvocations() { + return invocations; + } + + /** + * Describes the invocation of the analysis tool. + * + */ + public void setInvocations(List invocations) { + this.invocations = invocations; + } + + public Run withInvocations(List invocations) { + this.invocations = invocations; + return this; + } + + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + public Conversion getConversion() { + return conversion; + } + + /** + * Describes how a converter transformed the output of a static analysis tool from the analysis tool's native output format into the SARIF format. + * + */ + public void setConversion(Conversion conversion) { + this.conversion = conversion; + } + + public Run withConversion(Conversion conversion) { + this.conversion = conversion; + return this; + } + + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + public String getLanguage() { + return language; + } + + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + public void setLanguage(String language) { + this.language = language; + } + + public Run withLanguage(String language) { + this.language = language; + return this; + } + + /** + * Specifies the revision in version control of the artifacts that were scanned. + * + */ + public Set getVersionControlProvenance() { + return versionControlProvenance; + } + + /** + * Specifies the revision in version control of the artifacts that were scanned. + * + */ + public void setVersionControlProvenance(Set versionControlProvenance) { + this.versionControlProvenance = versionControlProvenance; + } + + public Run withVersionControlProvenance(Set versionControlProvenance) { + this.versionControlProvenance = versionControlProvenance; + return this; + } + + /** + * The artifact location specified by each uriBaseId symbol on the machine where the tool originally ran. + * + */ + public OriginalUriBaseIds getOriginalUriBaseIds() { + return originalUriBaseIds; + } + + /** + * The artifact location specified by each uriBaseId symbol on the machine where the tool originally ran. + * + */ + public void setOriginalUriBaseIds(OriginalUriBaseIds originalUriBaseIds) { + this.originalUriBaseIds = originalUriBaseIds; + } + + public Run withOriginalUriBaseIds(OriginalUriBaseIds originalUriBaseIds) { + this.originalUriBaseIds = originalUriBaseIds; + return this; + } + + /** + * An array of artifact objects relevant to the run. + * + */ + public Set getArtifacts() { + return artifacts; + } + + /** + * An array of artifact objects relevant to the run. + * + */ + public void setArtifacts(Set artifacts) { + this.artifacts = artifacts; + } + + public Run withArtifacts(Set artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * An array of logical locations such as namespaces, types or functions. + * + */ + public Set getLogicalLocations() { + return logicalLocations; + } + + /** + * An array of logical locations such as namespaces, types or functions. + * + */ + public void setLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + } + + public Run withLogicalLocations(Set logicalLocations) { + this.logicalLocations = logicalLocations; + return this; + } + + /** + * An array of zero or more unique graph objects associated with the run. + * + */ + public Set getGraphs() { + return graphs; + } + + /** + * An array of zero or more unique graph objects associated with the run. + * + */ + public void setGraphs(Set graphs) { + this.graphs = graphs; + } + + public Run withGraphs(Set graphs) { + this.graphs = graphs; + return this; + } + + /** + * The set of results contained in an SARIF log. The results array can be omitted when a run is solely exporting rules metadata. It must be present (but may be empty) if a log file represents an actual scan. + * + */ + public List getResults() { + return results; + } + + /** + * The set of results contained in an SARIF log. The results array can be omitted when a run is solely exporting rules metadata. It must be present (but may be empty) if a log file represents an actual scan. + * + */ + public void setResults(List results) { + this.results = results; + } + + public Run withResults(List results) { + this.results = results; + return this; + } + + /** + * Information that describes a run's identity and role within an engineering system process. + * + */ + public RunAutomationDetails getAutomationDetails() { + return automationDetails; + } + + /** + * Information that describes a run's identity and role within an engineering system process. + * + */ + public void setAutomationDetails(RunAutomationDetails automationDetails) { + this.automationDetails = automationDetails; + } + + public Run withAutomationDetails(RunAutomationDetails automationDetails) { + this.automationDetails = automationDetails; + return this; + } + + /** + * Automation details that describe the aggregate of runs to which this run belongs. + * + */ + public Set getRunAggregates() { + return runAggregates; + } + + /** + * Automation details that describe the aggregate of runs to which this run belongs. + * + */ + public void setRunAggregates(Set runAggregates) { + this.runAggregates = runAggregates; + } + + public Run withRunAggregates(Set runAggregates) { + this.runAggregates = runAggregates; + return this; + } + + /** + * The 'guid' property of a previous SARIF 'run' that comprises the baseline that was used to compute result 'baselineState' properties for the run. + * + */ + public String getBaselineGuid() { + return baselineGuid; + } + + /** + * The 'guid' property of a previous SARIF 'run' that comprises the baseline that was used to compute result 'baselineState' properties for the run. + * + */ + public void setBaselineGuid(String baselineGuid) { + this.baselineGuid = baselineGuid; + } + + public Run withBaselineGuid(String baselineGuid) { + this.baselineGuid = baselineGuid; + return this; + } + + /** + * An array of strings used to replace sensitive information in a redaction-aware property. + * + */ + public Set getRedactionTokens() { + return redactionTokens; + } + + /** + * An array of strings used to replace sensitive information in a redaction-aware property. + * + */ + public void setRedactionTokens(Set redactionTokens) { + this.redactionTokens = redactionTokens; + } + + public Run withRedactionTokens(Set redactionTokens) { + this.redactionTokens = redactionTokens; + return this; + } + + /** + * Specifies the default encoding for any artifact object that refers to a text file. + * + */ + public String getDefaultEncoding() { + return defaultEncoding; + } + + /** + * Specifies the default encoding for any artifact object that refers to a text file. + * + */ + public void setDefaultEncoding(String defaultEncoding) { + this.defaultEncoding = defaultEncoding; + } + + public Run withDefaultEncoding(String defaultEncoding) { + this.defaultEncoding = defaultEncoding; + return this; + } + + /** + * Specifies the default source language for any artifact object that refers to a text file that contains source code. + * + */ + public String getDefaultSourceLanguage() { + return defaultSourceLanguage; + } + + /** + * Specifies the default source language for any artifact object that refers to a text file that contains source code. + * + */ + public void setDefaultSourceLanguage(String defaultSourceLanguage) { + this.defaultSourceLanguage = defaultSourceLanguage; + } + + public Run withDefaultSourceLanguage(String defaultSourceLanguage) { + this.defaultSourceLanguage = defaultSourceLanguage; + return this; + } + + /** + * An ordered list of character sequences that were treated as line breaks when computing region information for the run. + * + */ + public Set getNewlineSequences() { + return newlineSequences; + } + + /** + * An ordered list of character sequences that were treated as line breaks when computing region information for the run. + * + */ + public void setNewlineSequences(Set newlineSequences) { + this.newlineSequences = newlineSequences; + } + + public Run withNewlineSequences(Set newlineSequences) { + this.newlineSequences = newlineSequences; + return this; + } + + /** + * Specifies the unit in which the tool measures columns. + * + */ + public Run.ColumnKind getColumnKind() { + return columnKind; + } + + /** + * Specifies the unit in which the tool measures columns. + * + */ + public void setColumnKind(Run.ColumnKind columnKind) { + this.columnKind = columnKind; + } + + public Run withColumnKind(Run.ColumnKind columnKind) { + this.columnKind = columnKind; + return this; + } + + /** + * References to external property files that should be inlined with the content of a root log file. + * + */ + public ExternalPropertyFileReferences getExternalPropertyFileReferences() { + return externalPropertyFileReferences; + } + + /** + * References to external property files that should be inlined with the content of a root log file. + * + */ + public void setExternalPropertyFileReferences(ExternalPropertyFileReferences externalPropertyFileReferences) { + this.externalPropertyFileReferences = externalPropertyFileReferences; + } + + public Run withExternalPropertyFileReferences(ExternalPropertyFileReferences externalPropertyFileReferences) { + this.externalPropertyFileReferences = externalPropertyFileReferences; + return this; + } + + /** + * An array of threadFlowLocation objects cached at run level. + * + */ + public Set getThreadFlowLocations() { + return threadFlowLocations; + } + + /** + * An array of threadFlowLocation objects cached at run level. + * + */ + public void setThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + } + + public Run withThreadFlowLocations(Set threadFlowLocations) { + this.threadFlowLocations = threadFlowLocations; + return this; + } + + /** + * An array of toolComponent objects relevant to a taxonomy in which results are categorized. + * + */ + public Set getTaxonomies() { + return taxonomies; + } + + /** + * An array of toolComponent objects relevant to a taxonomy in which results are categorized. + * + */ + public void setTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + } + + public Run withTaxonomies(Set taxonomies) { + this.taxonomies = taxonomies; + return this; + } + + /** + * Addresses associated with this run instance, if any. + * + */ + public List
getAddresses() { + return addresses; + } + + /** + * Addresses associated with this run instance, if any. + * + */ + public void setAddresses(List
addresses) { + this.addresses = addresses; + } + + public Run withAddresses(List
addresses) { + this.addresses = addresses; + return this; + } + + /** + * The set of available translations of the localized data provided by the tool. + * + */ + public Set getTranslations() { + return translations; + } + + /** + * The set of available translations of the localized data provided by the tool. + * + */ + public void setTranslations(Set translations) { + this.translations = translations; + } + + public Run withTranslations(Set translations) { + this.translations = translations; + return this; + } + + /** + * Contains configurations that may potentially override both reportingDescriptor.defaultConfiguration (the tool's default severities) and invocation.configurationOverrides (severities established at run-time from the command line). + * + */ + public Set getPolicies() { + return policies; + } + + /** + * Contains configurations that may potentially override both reportingDescriptor.defaultConfiguration (the tool's default severities) and invocation.configurationOverrides (severities established at run-time from the command line). + * + */ + public void setPolicies(Set policies) { + this.policies = policies; + } + + public Run withPolicies(Set policies) { + this.policies = policies; + return this; + } + + /** + * An array of request objects cached at run level. + * + */ + public Set getWebRequests() { + return webRequests; + } + + /** + * An array of request objects cached at run level. + * + */ + public void setWebRequests(Set webRequests) { + this.webRequests = webRequests; + } + + public Run withWebRequests(Set webRequests) { + this.webRequests = webRequests; + return this; + } + + /** + * An array of response objects cached at run level. + * + */ + public Set getWebResponses() { + return webResponses; + } + + /** + * An array of response objects cached at run level. + * + */ + public void setWebResponses(Set webResponses) { + this.webResponses = webResponses; + } + + public Run withWebResponses(Set webResponses) { + this.webResponses = webResponses; + return this; + } + + /** + * Defines locations of special significance to SARIF consumers. + * + */ + public SpecialLocations getSpecialLocations() { + return specialLocations; + } + + /** + * Defines locations of special significance to SARIF consumers. + * + */ + public void setSpecialLocations(SpecialLocations specialLocations) { + this.specialLocations = specialLocations; + } + + public Run withSpecialLocations(SpecialLocations specialLocations) { + this.specialLocations = specialLocations; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Run withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Run.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("tool"); + sb.append('='); + sb.append(((this.tool == null)?"":this.tool)); + sb.append(','); + sb.append("invocations"); + sb.append('='); + sb.append(((this.invocations == null)?"":this.invocations)); + sb.append(','); + sb.append("conversion"); + sb.append('='); + sb.append(((this.conversion == null)?"":this.conversion)); + sb.append(','); + sb.append("language"); + sb.append('='); + sb.append(((this.language == null)?"":this.language)); + sb.append(','); + sb.append("versionControlProvenance"); + sb.append('='); + sb.append(((this.versionControlProvenance == null)?"":this.versionControlProvenance)); + sb.append(','); + sb.append("originalUriBaseIds"); + sb.append('='); + sb.append(((this.originalUriBaseIds == null)?"":this.originalUriBaseIds)); + sb.append(','); + sb.append("artifacts"); + sb.append('='); + sb.append(((this.artifacts == null)?"":this.artifacts)); + sb.append(','); + sb.append("logicalLocations"); + sb.append('='); + sb.append(((this.logicalLocations == null)?"":this.logicalLocations)); + sb.append(','); + sb.append("graphs"); + sb.append('='); + sb.append(((this.graphs == null)?"":this.graphs)); + sb.append(','); + sb.append("results"); + sb.append('='); + sb.append(((this.results == null)?"":this.results)); + sb.append(','); + sb.append("automationDetails"); + sb.append('='); + sb.append(((this.automationDetails == null)?"":this.automationDetails)); + sb.append(','); + sb.append("runAggregates"); + sb.append('='); + sb.append(((this.runAggregates == null)?"":this.runAggregates)); + sb.append(','); + sb.append("baselineGuid"); + sb.append('='); + sb.append(((this.baselineGuid == null)?"":this.baselineGuid)); + sb.append(','); + sb.append("redactionTokens"); + sb.append('='); + sb.append(((this.redactionTokens == null)?"":this.redactionTokens)); + sb.append(','); + sb.append("defaultEncoding"); + sb.append('='); + sb.append(((this.defaultEncoding == null)?"":this.defaultEncoding)); + sb.append(','); + sb.append("defaultSourceLanguage"); + sb.append('='); + sb.append(((this.defaultSourceLanguage == null)?"":this.defaultSourceLanguage)); + sb.append(','); + sb.append("newlineSequences"); + sb.append('='); + sb.append(((this.newlineSequences == null)?"":this.newlineSequences)); + sb.append(','); + sb.append("columnKind"); + sb.append('='); + sb.append(((this.columnKind == null)?"":this.columnKind)); + sb.append(','); + sb.append("externalPropertyFileReferences"); + sb.append('='); + sb.append(((this.externalPropertyFileReferences == null)?"":this.externalPropertyFileReferences)); + sb.append(','); + sb.append("threadFlowLocations"); + sb.append('='); + sb.append(((this.threadFlowLocations == null)?"":this.threadFlowLocations)); + sb.append(','); + sb.append("taxonomies"); + sb.append('='); + sb.append(((this.taxonomies == null)?"":this.taxonomies)); + sb.append(','); + sb.append("addresses"); + sb.append('='); + sb.append(((this.addresses == null)?"":this.addresses)); + sb.append(','); + sb.append("translations"); + sb.append('='); + sb.append(((this.translations == null)?"":this.translations)); + sb.append(','); + sb.append("policies"); + sb.append('='); + sb.append(((this.policies == null)?"":this.policies)); + sb.append(','); + sb.append("webRequests"); + sb.append('='); + sb.append(((this.webRequests == null)?"":this.webRequests)); + sb.append(','); + sb.append("webResponses"); + sb.append('='); + sb.append(((this.webResponses == null)?"":this.webResponses)); + sb.append(','); + sb.append("specialLocations"); + sb.append('='); + sb.append(((this.specialLocations == null)?"":this.specialLocations)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.addresses == null)? 0 :this.addresses.hashCode())); + result = ((result* 31)+((this.logicalLocations == null)? 0 :this.logicalLocations.hashCode())); + result = ((result* 31)+((this.policies == null)? 0 :this.policies.hashCode())); + result = ((result* 31)+((this.language == null)? 0 :this.language.hashCode())); + result = ((result* 31)+((this.invocations == null)? 0 :this.invocations.hashCode())); + result = ((result* 31)+((this.graphs == null)? 0 :this.graphs.hashCode())); + result = ((result* 31)+((this.baselineGuid == null)? 0 :this.baselineGuid.hashCode())); + result = ((result* 31)+((this.translations == null)? 0 :this.translations.hashCode())); + result = ((result* 31)+((this.newlineSequences == null)? 0 :this.newlineSequences.hashCode())); + result = ((result* 31)+((this.webResponses == null)? 0 :this.webResponses.hashCode())); + result = ((result* 31)+((this.externalPropertyFileReferences == null)? 0 :this.externalPropertyFileReferences.hashCode())); + result = ((result* 31)+((this.defaultSourceLanguage == null)? 0 :this.defaultSourceLanguage.hashCode())); + result = ((result* 31)+((this.webRequests == null)? 0 :this.webRequests.hashCode())); + result = ((result* 31)+((this.results == null)? 0 :this.results.hashCode())); + result = ((result* 31)+((this.automationDetails == null)? 0 :this.automationDetails.hashCode())); + result = ((result* 31)+((this.conversion == null)? 0 :this.conversion.hashCode())); + result = ((result* 31)+((this.artifacts == null)? 0 :this.artifacts.hashCode())); + result = ((result* 31)+((this.originalUriBaseIds == null)? 0 :this.originalUriBaseIds.hashCode())); + result = ((result* 31)+((this.specialLocations == null)? 0 :this.specialLocations.hashCode())); + result = ((result* 31)+((this.defaultEncoding == null)? 0 :this.defaultEncoding.hashCode())); + result = ((result* 31)+((this.tool == null)? 0 :this.tool.hashCode())); + result = ((result* 31)+((this.versionControlProvenance == null)? 0 :this.versionControlProvenance.hashCode())); + result = ((result* 31)+((this.runAggregates == null)? 0 :this.runAggregates.hashCode())); + result = ((result* 31)+((this.redactionTokens == null)? 0 :this.redactionTokens.hashCode())); + result = ((result* 31)+((this.taxonomies == null)? 0 :this.taxonomies.hashCode())); + result = ((result* 31)+((this.columnKind == null)? 0 :this.columnKind.hashCode())); + result = ((result* 31)+((this.threadFlowLocations == null)? 0 :this.threadFlowLocations.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Run) == false) { + return false; + } + Run rhs = ((Run) other); + return (((((((((((((((((((((((((((((this.addresses == rhs.addresses)||((this.addresses!= null)&&this.addresses.equals(rhs.addresses)))&&((this.logicalLocations == rhs.logicalLocations)||((this.logicalLocations!= null)&&this.logicalLocations.equals(rhs.logicalLocations))))&&((this.policies == rhs.policies)||((this.policies!= null)&&this.policies.equals(rhs.policies))))&&((this.language == rhs.language)||((this.language!= null)&&this.language.equals(rhs.language))))&&((this.invocations == rhs.invocations)||((this.invocations!= null)&&this.invocations.equals(rhs.invocations))))&&((this.graphs == rhs.graphs)||((this.graphs!= null)&&this.graphs.equals(rhs.graphs))))&&((this.baselineGuid == rhs.baselineGuid)||((this.baselineGuid!= null)&&this.baselineGuid.equals(rhs.baselineGuid))))&&((this.translations == rhs.translations)||((this.translations!= null)&&this.translations.equals(rhs.translations))))&&((this.newlineSequences == rhs.newlineSequences)||((this.newlineSequences!= null)&&this.newlineSequences.equals(rhs.newlineSequences))))&&((this.webResponses == rhs.webResponses)||((this.webResponses!= null)&&this.webResponses.equals(rhs.webResponses))))&&((this.externalPropertyFileReferences == rhs.externalPropertyFileReferences)||((this.externalPropertyFileReferences!= null)&&this.externalPropertyFileReferences.equals(rhs.externalPropertyFileReferences))))&&((this.defaultSourceLanguage == rhs.defaultSourceLanguage)||((this.defaultSourceLanguage!= null)&&this.defaultSourceLanguage.equals(rhs.defaultSourceLanguage))))&&((this.webRequests == rhs.webRequests)||((this.webRequests!= null)&&this.webRequests.equals(rhs.webRequests))))&&((this.results == rhs.results)||((this.results!= null)&&this.results.equals(rhs.results))))&&((this.automationDetails == rhs.automationDetails)||((this.automationDetails!= null)&&this.automationDetails.equals(rhs.automationDetails))))&&((this.conversion == rhs.conversion)||((this.conversion!= null)&&this.conversion.equals(rhs.conversion))))&&((this.artifacts == rhs.artifacts)||((this.artifacts!= null)&&this.artifacts.equals(rhs.artifacts))))&&((this.originalUriBaseIds == rhs.originalUriBaseIds)||((this.originalUriBaseIds!= null)&&this.originalUriBaseIds.equals(rhs.originalUriBaseIds))))&&((this.specialLocations == rhs.specialLocations)||((this.specialLocations!= null)&&this.specialLocations.equals(rhs.specialLocations))))&&((this.defaultEncoding == rhs.defaultEncoding)||((this.defaultEncoding!= null)&&this.defaultEncoding.equals(rhs.defaultEncoding))))&&((this.tool == rhs.tool)||((this.tool!= null)&&this.tool.equals(rhs.tool))))&&((this.versionControlProvenance == rhs.versionControlProvenance)||((this.versionControlProvenance!= null)&&this.versionControlProvenance.equals(rhs.versionControlProvenance))))&&((this.runAggregates == rhs.runAggregates)||((this.runAggregates!= null)&&this.runAggregates.equals(rhs.runAggregates))))&&((this.redactionTokens == rhs.redactionTokens)||((this.redactionTokens!= null)&&this.redactionTokens.equals(rhs.redactionTokens))))&&((this.taxonomies == rhs.taxonomies)||((this.taxonomies!= null)&&this.taxonomies.equals(rhs.taxonomies))))&&((this.columnKind == rhs.columnKind)||((this.columnKind!= null)&&this.columnKind.equals(rhs.columnKind))))&&((this.threadFlowLocations == rhs.threadFlowLocations)||((this.threadFlowLocations!= null)&&this.threadFlowLocations.equals(rhs.threadFlowLocations))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * Specifies the unit in which the tool measures columns. + * + */ + public enum ColumnKind { + + UTF_16_CODE_UNITS("utf16CodeUnits"), + UNICODE_CODE_POINTS("unicodeCodePoints"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Run.ColumnKind c: values()) { + CONSTANTS.put(c.value, c); + } + } + + ColumnKind(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Run.ColumnKind fromValue(String value) { + Run.ColumnKind constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/RunAutomationDetails.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/RunAutomationDetails.java new file mode 100644 index 0000000..39bf163 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/RunAutomationDetails.java @@ -0,0 +1,198 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Information that describes a run's identity and role within an engineering system process. + * + */ +public class RunAutomationDetails { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message description; + /** + * A hierarchical string that uniquely identifies this object's containing run object. + * + */ + private String id; + /** + * A stable, unique identifer for this object's containing run object in the form of a GUID. + * + */ + private String guid; + /** + * A stable, unique identifier for the equivalence class of runs to which this object's containing run object belongs in the form of a GUID. + * + */ + private String correlationGuid; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getDescription() { + return description; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setDescription(Message description) { + this.description = description; + } + + public RunAutomationDetails withDescription(Message description) { + this.description = description; + return this; + } + + /** + * A hierarchical string that uniquely identifies this object's containing run object. + * + */ + public String getId() { + return id; + } + + /** + * A hierarchical string that uniquely identifies this object's containing run object. + * + */ + public void setId(String id) { + this.id = id; + } + + public RunAutomationDetails withId(String id) { + this.id = id; + return this; + } + + /** + * A stable, unique identifer for this object's containing run object in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A stable, unique identifer for this object's containing run object in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public RunAutomationDetails withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * A stable, unique identifier for the equivalence class of runs to which this object's containing run object belongs in the form of a GUID. + * + */ + public String getCorrelationGuid() { + return correlationGuid; + } + + /** + * A stable, unique identifier for the equivalence class of runs to which this object's containing run object belongs in the form of a GUID. + * + */ + public void setCorrelationGuid(String correlationGuid) { + this.correlationGuid = correlationGuid; + } + + public RunAutomationDetails withCorrelationGuid(String correlationGuid) { + this.correlationGuid = correlationGuid; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public RunAutomationDetails withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(RunAutomationDetails.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("correlationGuid"); + sb.append('='); + sb.append(((this.correlationGuid == null)?"":this.correlationGuid)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.correlationGuid == null)? 0 :this.correlationGuid.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RunAutomationDetails) == false) { + return false; + } + RunAutomationDetails rhs = ((RunAutomationDetails) other); + return ((((((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description)))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.correlationGuid == rhs.correlationGuid)||((this.correlationGuid!= null)&&this.correlationGuid.equals(rhs.correlationGuid))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SarifSchema.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SarifSchema.java new file mode 100644 index 0000000..c6f3663 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SarifSchema.java @@ -0,0 +1,211 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + + +/** + * Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema + *

+ * Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema: a standard format for the output of static analysis tools. + * + */ +public class SarifSchema { + + /** + * The URI of the JSON schema corresponding to the version. + * + */ + private URI $schema; + /** + * The SARIF format version of this log file. + * (Required) + * + */ + private Object version; + /** + * The set of runs contained in this log file. + * (Required) + * + */ + private List runs = new ArrayList(); + /** + * References to external property files that share data between runs. + * + */ + private Set inlineExternalProperties = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The URI of the JSON schema corresponding to the version. + * + */ + public URI get$schema() { + return $schema; + } + + /** + * The URI of the JSON schema corresponding to the version. + * + */ + public void set$schema(URI $schema) { + this.$schema = $schema; + } + + public SarifSchema with$schema(URI $schema) { + this.$schema = $schema; + return this; + } + + /** + * The SARIF format version of this log file. + * (Required) + * + */ + public Object getVersion() { + return version; + } + + /** + * The SARIF format version of this log file. + * (Required) + * + */ + public void setVersion(Object version) { + this.version = version; + } + + public SarifSchema withVersion(Object version) { + this.version = version; + return this; + } + + /** + * The set of runs contained in this log file. + * (Required) + * + */ + public List getRuns() { + return runs; + } + + /** + * The set of runs contained in this log file. + * (Required) + * + */ + public void setRuns(List runs) { + this.runs = runs; + } + + public SarifSchema withRuns(List runs) { + this.runs = runs; + return this; + } + + /** + * References to external property files that share data between runs. + * + */ + public Set getInlineExternalProperties() { + return inlineExternalProperties; + } + + /** + * References to external property files that share data between runs. + * + */ + public void setInlineExternalProperties(Set inlineExternalProperties) { + this.inlineExternalProperties = inlineExternalProperties; + } + + public SarifSchema withInlineExternalProperties(Set inlineExternalProperties) { + this.inlineExternalProperties = inlineExternalProperties; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public SarifSchema withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SarifSchema.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("$schema"); + sb.append('='); + sb.append(((this.$schema == null)?"":this.$schema)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("runs"); + sb.append('='); + sb.append(((this.runs == null)?"":this.runs)); + sb.append(','); + sb.append("inlineExternalProperties"); + sb.append('='); + sb.append(((this.inlineExternalProperties == null)?"":this.inlineExternalProperties)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.inlineExternalProperties == null)? 0 :this.inlineExternalProperties.hashCode())); + result = ((result* 31)+((this.$schema == null)? 0 :this.$schema.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.runs == null)? 0 :this.runs.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SarifSchema) == false) { + return false; + } + SarifSchema rhs = ((SarifSchema) other); + return ((((((this.inlineExternalProperties == rhs.inlineExternalProperties)||((this.inlineExternalProperties!= null)&&this.inlineExternalProperties.equals(rhs.inlineExternalProperties)))&&((this.$schema == rhs.$schema)||((this.$schema!= null)&&this.$schema.equals(rhs.$schema))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.runs == rhs.runs)||((this.runs!= null)&&this.runs.equals(rhs.runs))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SpecialLocations.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SpecialLocations.java new file mode 100644 index 0000000..66f92fe --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/SpecialLocations.java @@ -0,0 +1,105 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Defines locations of special significance to SARIF consumers. + * + */ +public class SpecialLocations { + + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation displayBase; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getDisplayBase() { + return displayBase; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setDisplayBase(ArtifactLocation displayBase) { + this.displayBase = displayBase; + } + + public SpecialLocations withDisplayBase(ArtifactLocation displayBase) { + this.displayBase = displayBase; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public SpecialLocations withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpecialLocations.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("displayBase"); + sb.append('='); + sb.append(((this.displayBase == null)?"":this.displayBase)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.displayBase == null)? 0 :this.displayBase.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpecialLocations) == false) { + return false; + } + SpecialLocations rhs = ((SpecialLocations) other); + return (((this.displayBase == rhs.displayBase)||((this.displayBase!= null)&&this.displayBase.equals(rhs.displayBase)))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Stack.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Stack.java new file mode 100644 index 0000000..df25123 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Stack.java @@ -0,0 +1,141 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * A call stack that is relevant to a result. + * + */ +public class Stack { + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * An array of stack frames that represents a sequence of calls, rendered in reverse chronological order, that comprise the call stack. + * (Required) + * + */ + private List frames = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public Stack withMessage(Message message) { + this.message = message; + return this; + } + + /** + * An array of stack frames that represents a sequence of calls, rendered in reverse chronological order, that comprise the call stack. + * (Required) + * + */ + public List getFrames() { + return frames; + } + + /** + * An array of stack frames that represents a sequence of calls, rendered in reverse chronological order, that comprise the call stack. + * (Required) + * + */ + public void setFrames(List frames) { + this.frames = frames; + } + + public Stack withFrames(List frames) { + this.frames = frames; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Stack withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Stack.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("frames"); + sb.append('='); + sb.append(((this.frames == null)?"":this.frames)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.frames == null)? 0 :this.frames.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Stack) == false) { + return false; + } + Stack rhs = ((Stack) other); + return ((((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))&&((this.frames == rhs.frames)||((this.frames!= null)&&this.frames.equals(rhs.frames))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/StackFrame.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/StackFrame.java new file mode 100644 index 0000000..11ee9ad --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/StackFrame.java @@ -0,0 +1,200 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * A function call within a stack trace. + * + */ +public class StackFrame { + + /** + * A location within a programming artifact. + * + */ + private Location location; + /** + * The name of the module that contains the code of this stack frame. + * + */ + private String module; + /** + * The thread identifier of the stack frame. + * + */ + private Integer threadId; + /** + * The parameters of the call that is executing. + * + */ + private List parameters = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A location within a programming artifact. + * + */ + public Location getLocation() { + return location; + } + + /** + * A location within a programming artifact. + * + */ + public void setLocation(Location location) { + this.location = location; + } + + public StackFrame withLocation(Location location) { + this.location = location; + return this; + } + + /** + * The name of the module that contains the code of this stack frame. + * + */ + public String getModule() { + return module; + } + + /** + * The name of the module that contains the code of this stack frame. + * + */ + public void setModule(String module) { + this.module = module; + } + + public StackFrame withModule(String module) { + this.module = module; + return this; + } + + /** + * The thread identifier of the stack frame. + * + */ + public Integer getThreadId() { + return threadId; + } + + /** + * The thread identifier of the stack frame. + * + */ + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + public StackFrame withThreadId(Integer threadId) { + this.threadId = threadId; + return this; + } + + /** + * The parameters of the call that is executing. + * + */ + public List getParameters() { + return parameters; + } + + /** + * The parameters of the call that is executing. + * + */ + public void setParameters(List parameters) { + this.parameters = parameters; + } + + public StackFrame withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public StackFrame withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StackFrame.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("module"); + sb.append('='); + sb.append(((this.module == null)?"":this.module)); + sb.append(','); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("parameters"); + sb.append('='); + sb.append(((this.parameters == null)?"":this.parameters)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.parameters == null)? 0 :this.parameters.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.module == null)? 0 :this.module.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StackFrame) == false) { + return false; + } + StackFrame rhs = ((StackFrame) other); + return ((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.parameters == rhs.parameters)||((this.parameters!= null)&&this.parameters.equals(rhs.parameters))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.module == rhs.module)||((this.module!= null)&&this.module.equals(rhs.module)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/State.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/State.java new file mode 100644 index 0000000..7d4001e --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/State.java @@ -0,0 +1,64 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * A dictionary, each of whose keys specifies a variable or expression, the associated value of which represents the variable or expression value. For an annotation of kind 'continuation', for example, this dictionary might hold the current assumed values of a set of global variables. + * + */ +public class State { + + private Map additionalProperties = new LinkedHashMap(); + + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + public void setAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + } + + public State withAdditionalProperty(String name, MultiformatMessageString value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(State.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof State) == false) { + return false; + } + State rhs = ((State) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Suppression.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Suppression.java new file mode 100644 index 0000000..3326415 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Suppression.java @@ -0,0 +1,319 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.HashMap; +import java.util.Map; + + +/** + * A suppression that is relevant to a result. + * + */ +public class Suppression { + + /** + * A stable, unique identifer for the suprression in the form of a GUID. + * + */ + private String guid; + /** + * A string that indicates where the suppression is persisted. + * (Required) + * + */ + private Suppression.Kind kind; + /** + * A string that indicates the state of the suppression. + * + */ + private Suppression.State state; + /** + * A string representing the justification for the suppression. + * + */ + private String justification; + /** + * A location within a programming artifact. + * + */ + private Location location; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A stable, unique identifer for the suprression in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A stable, unique identifer for the suprression in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public Suppression withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * A string that indicates where the suppression is persisted. + * (Required) + * + */ + public Suppression.Kind getKind() { + return kind; + } + + /** + * A string that indicates where the suppression is persisted. + * (Required) + * + */ + public void setKind(Suppression.Kind kind) { + this.kind = kind; + } + + public Suppression withKind(Suppression.Kind kind) { + this.kind = kind; + return this; + } + + /** + * A string that indicates the state of the suppression. + * + */ + public Suppression.State getState() { + return state; + } + + /** + * A string that indicates the state of the suppression. + * + */ + public void setState(Suppression.State state) { + this.state = state; + } + + public Suppression withState(Suppression.State state) { + this.state = state; + return this; + } + + /** + * A string representing the justification for the suppression. + * + */ + public String getJustification() { + return justification; + } + + /** + * A string representing the justification for the suppression. + * + */ + public void setJustification(String justification) { + this.justification = justification; + } + + public Suppression withJustification(String justification) { + this.justification = justification; + return this; + } + + /** + * A location within a programming artifact. + * + */ + public Location getLocation() { + return location; + } + + /** + * A location within a programming artifact. + * + */ + public void setLocation(Location location) { + this.location = location; + } + + public Suppression withLocation(Location location) { + this.location = location; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Suppression withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Suppression.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("state"); + sb.append('='); + sb.append(((this.state == null)?"":this.state)); + sb.append(','); + sb.append("justification"); + sb.append('='); + sb.append(((this.justification == null)?"":this.justification)); + sb.append(','); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.state == null)? 0 :this.state.hashCode())); + result = ((result* 31)+((this.justification == null)? 0 :this.justification.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Suppression) == false) { + return false; + } + Suppression rhs = ((Suppression) other); + return (((((((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind)))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.state == rhs.state)||((this.state!= null)&&this.state.equals(rhs.state))))&&((this.justification == rhs.justification)||((this.justification!= null)&&this.justification.equals(rhs.justification))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * A string that indicates where the suppression is persisted. + * + */ + public enum Kind { + + IN_SOURCE("inSource"), + EXTERNAL("external"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Suppression.Kind c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Kind(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Suppression.Kind fromValue(String value) { + Suppression.Kind constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + + + /** + * A string that indicates the state of the suppression. + * + */ + public enum State { + + ACCEPTED("accepted"), + UNDER_REVIEW("underReview"), + REJECTED("rejected"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Suppression.State c: values()) { + CONSTANTS.put(c.value, c); + } + } + + State(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static Suppression.State fromValue(String value) { + Suppression.State constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlow.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlow.java new file mode 100644 index 0000000..64ea6bf --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlow.java @@ -0,0 +1,234 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Describes a sequence of code locations that specify a path through a single thread of execution such as an operating system or fiber. + * + */ +public class ThreadFlow { + + /** + * An string that uniquely identifies the threadFlow within the codeFlow in which it occurs. + * + */ + private String id; + /** + * Encapsulates a message intended to be read by the end user. + * + */ + private Message message; + /** + * Values of relevant expressions at the start of the thread flow that may change during thread flow execution. + * + */ + private InitialState initialState; + /** + * Values of relevant expressions at the start of the thread flow that remain constant. + * + */ + private ImmutableState immutableState; + /** + * A temporally ordered array of 'threadFlowLocation' objects, each of which describes a location visited by the tool while producing the result. + * (Required) + * + */ + private List locations = new ArrayList(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * An string that uniquely identifies the threadFlow within the codeFlow in which it occurs. + * + */ + public String getId() { + return id; + } + + /** + * An string that uniquely identifies the threadFlow within the codeFlow in which it occurs. + * + */ + public void setId(String id) { + this.id = id; + } + + public ThreadFlow withId(String id) { + this.id = id; + return this; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public Message getMessage() { + return message; + } + + /** + * Encapsulates a message intended to be read by the end user. + * + */ + public void setMessage(Message message) { + this.message = message; + } + + public ThreadFlow withMessage(Message message) { + this.message = message; + return this; + } + + /** + * Values of relevant expressions at the start of the thread flow that may change during thread flow execution. + * + */ + public InitialState getInitialState() { + return initialState; + } + + /** + * Values of relevant expressions at the start of the thread flow that may change during thread flow execution. + * + */ + public void setInitialState(InitialState initialState) { + this.initialState = initialState; + } + + public ThreadFlow withInitialState(InitialState initialState) { + this.initialState = initialState; + return this; + } + + /** + * Values of relevant expressions at the start of the thread flow that remain constant. + * + */ + public ImmutableState getImmutableState() { + return immutableState; + } + + /** + * Values of relevant expressions at the start of the thread flow that remain constant. + * + */ + public void setImmutableState(ImmutableState immutableState) { + this.immutableState = immutableState; + } + + public ThreadFlow withImmutableState(ImmutableState immutableState) { + this.immutableState = immutableState; + return this; + } + + /** + * A temporally ordered array of 'threadFlowLocation' objects, each of which describes a location visited by the tool while producing the result. + * (Required) + * + */ + public List getLocations() { + return locations; + } + + /** + * A temporally ordered array of 'threadFlowLocation' objects, each of which describes a location visited by the tool while producing the result. + * (Required) + * + */ + public void setLocations(List locations) { + this.locations = locations; + } + + public ThreadFlow withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ThreadFlow withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ThreadFlow.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("initialState"); + sb.append('='); + sb.append(((this.initialState == null)?"":this.initialState)); + sb.append(','); + sb.append("immutableState"); + sb.append('='); + sb.append(((this.immutableState == null)?"":this.immutableState)); + sb.append(','); + sb.append("locations"); + sb.append('='); + sb.append(((this.locations == null)?"":this.locations)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.initialState == null)? 0 :this.initialState.hashCode())); + result = ((result* 31)+((this.immutableState == null)? 0 :this.immutableState.hashCode())); + result = ((result* 31)+((this.locations == null)? 0 :this.locations.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ThreadFlow) == false) { + return false; + } + ThreadFlow rhs = ((ThreadFlow) other); + return (((((((this.initialState == rhs.initialState)||((this.initialState!= null)&&this.initialState.equals(rhs.initialState)))&&((this.immutableState == rhs.immutableState)||((this.immutableState!= null)&&this.immutableState.equals(rhs.immutableState))))&&((this.locations == rhs.locations)||((this.locations!= null)&&this.locations.equals(rhs.locations))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlowLocation.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlowLocation.java new file mode 100644 index 0000000..c051a61 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ThreadFlowLocation.java @@ -0,0 +1,525 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + + +/** + * A location visited by an analysis tool while simulating or monitoring the execution of a program. + * + */ +public class ThreadFlowLocation { + + /** + * The index within the run threadFlowLocations array. + * + */ + private Integer index = -1; + /** + * A location within a programming artifact. + * + */ + private Location location; + /** + * A call stack that is relevant to a result. + * + */ + private Stack stack; + /** + * A set of distinct strings that categorize the thread flow location. Well-known kinds include 'acquire', 'release', 'enter', 'exit', 'call', 'return', 'branch', 'implicit', 'false', 'true', 'caution', 'danger', 'unknown', 'unreachable', 'taint', 'function', 'handler', 'lock', 'memory', 'resource', 'scope' and 'value'. + * + */ + private Set kinds = new LinkedHashSet(); + /** + * An array of references to rule or taxonomy reporting descriptors that are applicable to the thread flow location. + * + */ + private Set taxa = new LinkedHashSet(); + /** + * The name of the module that contains the code that is executing. + * + */ + private String module; + /** + * A dictionary, each of whose keys specifies a variable or expression, the associated value of which represents the variable or expression value. For an annotation of kind 'continuation', for example, this dictionary might hold the current assumed values of a set of global variables. + * + */ + private State state; + /** + * An integer representing a containment hierarchy within the thread flow. + * + */ + private Integer nestingLevel; + /** + * An integer representing the temporal order in which execution reached this location. + * + */ + private Integer executionOrder = -1; + /** + * The Coordinated Universal Time (UTC) date and time at which this location was executed. + * + */ + private Date executionTimeUtc; + /** + * Specifies the importance of this location in understanding the code flow in which it occurs. The order from most to least important is "essential", "important", "unimportant". Default: "important". + * + */ + private ThreadFlowLocation.Importance importance = ThreadFlowLocation.Importance.fromValue("important"); + /** + * Describes an HTTP request. + * + */ + private WebRequest webRequest; + /** + * Describes the response to an HTTP request. + * + */ + private WebResponse webResponse; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The index within the run threadFlowLocations array. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within the run threadFlowLocations array. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public ThreadFlowLocation withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * A location within a programming artifact. + * + */ + public Location getLocation() { + return location; + } + + /** + * A location within a programming artifact. + * + */ + public void setLocation(Location location) { + this.location = location; + } + + public ThreadFlowLocation withLocation(Location location) { + this.location = location; + return this; + } + + /** + * A call stack that is relevant to a result. + * + */ + public Stack getStack() { + return stack; + } + + /** + * A call stack that is relevant to a result. + * + */ + public void setStack(Stack stack) { + this.stack = stack; + } + + public ThreadFlowLocation withStack(Stack stack) { + this.stack = stack; + return this; + } + + /** + * A set of distinct strings that categorize the thread flow location. Well-known kinds include 'acquire', 'release', 'enter', 'exit', 'call', 'return', 'branch', 'implicit', 'false', 'true', 'caution', 'danger', 'unknown', 'unreachable', 'taint', 'function', 'handler', 'lock', 'memory', 'resource', 'scope' and 'value'. + * + */ + public Set getKinds() { + return kinds; + } + + /** + * A set of distinct strings that categorize the thread flow location. Well-known kinds include 'acquire', 'release', 'enter', 'exit', 'call', 'return', 'branch', 'implicit', 'false', 'true', 'caution', 'danger', 'unknown', 'unreachable', 'taint', 'function', 'handler', 'lock', 'memory', 'resource', 'scope' and 'value'. + * + */ + public void setKinds(Set kinds) { + this.kinds = kinds; + } + + public ThreadFlowLocation withKinds(Set kinds) { + this.kinds = kinds; + return this; + } + + /** + * An array of references to rule or taxonomy reporting descriptors that are applicable to the thread flow location. + * + */ + public Set getTaxa() { + return taxa; + } + + /** + * An array of references to rule or taxonomy reporting descriptors that are applicable to the thread flow location. + * + */ + public void setTaxa(Set taxa) { + this.taxa = taxa; + } + + public ThreadFlowLocation withTaxa(Set taxa) { + this.taxa = taxa; + return this; + } + + /** + * The name of the module that contains the code that is executing. + * + */ + public String getModule() { + return module; + } + + /** + * The name of the module that contains the code that is executing. + * + */ + public void setModule(String module) { + this.module = module; + } + + public ThreadFlowLocation withModule(String module) { + this.module = module; + return this; + } + + /** + * A dictionary, each of whose keys specifies a variable or expression, the associated value of which represents the variable or expression value. For an annotation of kind 'continuation', for example, this dictionary might hold the current assumed values of a set of global variables. + * + */ + public State getState() { + return state; + } + + /** + * A dictionary, each of whose keys specifies a variable or expression, the associated value of which represents the variable or expression value. For an annotation of kind 'continuation', for example, this dictionary might hold the current assumed values of a set of global variables. + * + */ + public void setState(State state) { + this.state = state; + } + + public ThreadFlowLocation withState(State state) { + this.state = state; + return this; + } + + /** + * An integer representing a containment hierarchy within the thread flow. + * + */ + public Integer getNestingLevel() { + return nestingLevel; + } + + /** + * An integer representing a containment hierarchy within the thread flow. + * + */ + public void setNestingLevel(Integer nestingLevel) { + this.nestingLevel = nestingLevel; + } + + public ThreadFlowLocation withNestingLevel(Integer nestingLevel) { + this.nestingLevel = nestingLevel; + return this; + } + + /** + * An integer representing the temporal order in which execution reached this location. + * + */ + public Integer getExecutionOrder() { + return executionOrder; + } + + /** + * An integer representing the temporal order in which execution reached this location. + * + */ + public void setExecutionOrder(Integer executionOrder) { + this.executionOrder = executionOrder; + } + + public ThreadFlowLocation withExecutionOrder(Integer executionOrder) { + this.executionOrder = executionOrder; + return this; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which this location was executed. + * + */ + public Date getExecutionTimeUtc() { + return executionTimeUtc; + } + + /** + * The Coordinated Universal Time (UTC) date and time at which this location was executed. + * + */ + public void setExecutionTimeUtc(Date executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + } + + public ThreadFlowLocation withExecutionTimeUtc(Date executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + return this; + } + + /** + * Specifies the importance of this location in understanding the code flow in which it occurs. The order from most to least important is "essential", "important", "unimportant". Default: "important". + * + */ + public ThreadFlowLocation.Importance getImportance() { + return importance; + } + + /** + * Specifies the importance of this location in understanding the code flow in which it occurs. The order from most to least important is "essential", "important", "unimportant". Default: "important". + * + */ + public void setImportance(ThreadFlowLocation.Importance importance) { + this.importance = importance; + } + + public ThreadFlowLocation withImportance(ThreadFlowLocation.Importance importance) { + this.importance = importance; + return this; + } + + /** + * Describes an HTTP request. + * + */ + public WebRequest getWebRequest() { + return webRequest; + } + + /** + * Describes an HTTP request. + * + */ + public void setWebRequest(WebRequest webRequest) { + this.webRequest = webRequest; + } + + public ThreadFlowLocation withWebRequest(WebRequest webRequest) { + this.webRequest = webRequest; + return this; + } + + /** + * Describes the response to an HTTP request. + * + */ + public WebResponse getWebResponse() { + return webResponse; + } + + /** + * Describes the response to an HTTP request. + * + */ + public void setWebResponse(WebResponse webResponse) { + this.webResponse = webResponse; + } + + public ThreadFlowLocation withWebResponse(WebResponse webResponse) { + this.webResponse = webResponse; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ThreadFlowLocation withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ThreadFlowLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("stack"); + sb.append('='); + sb.append(((this.stack == null)?"":this.stack)); + sb.append(','); + sb.append("kinds"); + sb.append('='); + sb.append(((this.kinds == null)?"":this.kinds)); + sb.append(','); + sb.append("taxa"); + sb.append('='); + sb.append(((this.taxa == null)?"":this.taxa)); + sb.append(','); + sb.append("module"); + sb.append('='); + sb.append(((this.module == null)?"":this.module)); + sb.append(','); + sb.append("state"); + sb.append('='); + sb.append(((this.state == null)?"":this.state)); + sb.append(','); + sb.append("nestingLevel"); + sb.append('='); + sb.append(((this.nestingLevel == null)?"":this.nestingLevel)); + sb.append(','); + sb.append("executionOrder"); + sb.append('='); + sb.append(((this.executionOrder == null)?"":this.executionOrder)); + sb.append(','); + sb.append("executionTimeUtc"); + sb.append('='); + sb.append(((this.executionTimeUtc == null)?"":this.executionTimeUtc)); + sb.append(','); + sb.append("importance"); + sb.append('='); + sb.append(((this.importance == null)?"":this.importance)); + sb.append(','); + sb.append("webRequest"); + sb.append('='); + sb.append(((this.webRequest == null)?"":this.webRequest)); + sb.append(','); + sb.append("webResponse"); + sb.append('='); + sb.append(((this.webResponse == null)?"":this.webResponse)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.taxa == null)? 0 :this.taxa.hashCode())); + result = ((result* 31)+((this.nestingLevel == null)? 0 :this.nestingLevel.hashCode())); + result = ((result* 31)+((this.stack == null)? 0 :this.stack.hashCode())); + result = ((result* 31)+((this.webRequest == null)? 0 :this.webRequest.hashCode())); + result = ((result* 31)+((this.importance == null)? 0 :this.importance.hashCode())); + result = ((result* 31)+((this.module == null)? 0 :this.module.hashCode())); + result = ((result* 31)+((this.executionTimeUtc == null)? 0 :this.executionTimeUtc.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.kinds == null)? 0 :this.kinds.hashCode())); + result = ((result* 31)+((this.executionOrder == null)? 0 :this.executionOrder.hashCode())); + result = ((result* 31)+((this.webResponse == null)? 0 :this.webResponse.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.state == null)? 0 :this.state.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ThreadFlowLocation) == false) { + return false; + } + ThreadFlowLocation rhs = ((ThreadFlowLocation) other); + return (((((((((((((((this.taxa == rhs.taxa)||((this.taxa!= null)&&this.taxa.equals(rhs.taxa)))&&((this.nestingLevel == rhs.nestingLevel)||((this.nestingLevel!= null)&&this.nestingLevel.equals(rhs.nestingLevel))))&&((this.stack == rhs.stack)||((this.stack!= null)&&this.stack.equals(rhs.stack))))&&((this.webRequest == rhs.webRequest)||((this.webRequest!= null)&&this.webRequest.equals(rhs.webRequest))))&&((this.importance == rhs.importance)||((this.importance!= null)&&this.importance.equals(rhs.importance))))&&((this.module == rhs.module)||((this.module!= null)&&this.module.equals(rhs.module))))&&((this.executionTimeUtc == rhs.executionTimeUtc)||((this.executionTimeUtc!= null)&&this.executionTimeUtc.equals(rhs.executionTimeUtc))))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.kinds == rhs.kinds)||((this.kinds!= null)&&this.kinds.equals(rhs.kinds))))&&((this.executionOrder == rhs.executionOrder)||((this.executionOrder!= null)&&this.executionOrder.equals(rhs.executionOrder))))&&((this.webResponse == rhs.webResponse)||((this.webResponse!= null)&&this.webResponse.equals(rhs.webResponse))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.state == rhs.state)||((this.state!= null)&&this.state.equals(rhs.state))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + + + /** + * Specifies the importance of this location in understanding the code flow in which it occurs. The order from most to least important is "essential", "important", "unimportant". Default: "important". + * + */ + public enum Importance { + + IMPORTANT("important"), + ESSENTIAL("essential"), + UNIMPORTANT("unimportant"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (ThreadFlowLocation.Importance c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Importance(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + public String value() { + return this.value; + } + + public static ThreadFlowLocation.Importance fromValue(String value) { + ThreadFlowLocation.Importance constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Tool.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Tool.java new file mode 100644 index 0000000..8e66267 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/Tool.java @@ -0,0 +1,141 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.util.LinkedHashSet; +import java.util.Set; + + +/** + * The analysis tool that was run. + * + */ +public class Tool { + + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * (Required) + * + */ + private ToolComponent driver; + /** + * Tool extensions that contributed to or reconfigured the analysis tool that was run. + * + */ + private Set extensions = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * (Required) + * + */ + public ToolComponent getDriver() { + return driver; + } + + /** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * (Required) + * + */ + public void setDriver(ToolComponent driver) { + this.driver = driver; + } + + public Tool withDriver(ToolComponent driver) { + this.driver = driver; + return this; + } + + /** + * Tool extensions that contributed to or reconfigured the analysis tool that was run. + * + */ + public Set getExtensions() { + return extensions; + } + + /** + * Tool extensions that contributed to or reconfigured the analysis tool that was run. + * + */ + public void setExtensions(Set extensions) { + this.extensions = extensions; + } + + public Tool withExtensions(Set extensions) { + this.extensions = extensions; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public Tool withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Tool.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("driver"); + sb.append('='); + sb.append(((this.driver == null)?"":this.driver)); + sb.append(','); + sb.append("extensions"); + sb.append('='); + sb.append(((this.extensions == null)?"":this.extensions)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.extensions == null)? 0 :this.extensions.hashCode())); + result = ((result* 31)+((this.driver == null)? 0 :this.driver.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Tool) == false) { + return false; + } + Tool rhs = ((Tool) other); + return ((((this.extensions == rhs.extensions)||((this.extensions!= null)&&this.extensions.equals(rhs.extensions)))&&((this.driver == rhs.driver)||((this.driver!= null)&&this.driver.equals(rhs.driver))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponent.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponent.java new file mode 100644 index 0000000..835deae --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponent.java @@ -0,0 +1,920 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + + +/** + * A component, such as a plug-in or the driver, of the analysis tool that was run. + * + */ +public class ToolComponent { + + /** + * A unique identifer for the tool component in the form of a GUID. + * + */ + private String guid; + /** + * The name of the tool component. + * (Required) + * + */ + private String name; + /** + * The organization or company that produced the tool component. + * + */ + private String organization; + /** + * A product suite to which the tool component belongs. + * + */ + private String product; + /** + * A localizable string containing the name of the suite of products to which the tool component belongs. + * + */ + private String productSuite; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString shortDescription; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString fullDescription; + /** + * The name of the tool component along with its version and any other useful identifying information, such as its locale. + * + */ + private String fullName; + /** + * The tool component version, in whatever format the component natively provides. + * + */ + private String version; + /** + * The tool component version in the format specified by Semantic Versioning 2.0. + * + */ + private String semanticVersion; + /** + * The binary version of the tool component's primary executable file expressed as four non-negative integers separated by a period (for operating systems that express file versions in this way). + * + */ + private String dottedQuadFileVersion; + /** + * A string specifying the UTC date (and optionally, the time) of the component's release. + * + */ + private String releaseDateUtc; + /** + * The absolute URI from which the tool component can be downloaded. + * + */ + private URI downloadUri; + /** + * The absolute URI at which information about this version of the tool component can be found. + * + */ + private URI informationUri; + /** + * A dictionary, each of whose keys is a resource identifier and each of whose values is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + private GlobalMessageStrings globalMessageStrings; + /** + * An array of reportingDescriptor objects relevant to the notifications related to the configuration and runtime execution of the tool component. + * + */ + private Set notifications = new LinkedHashSet(); + /** + * An array of reportingDescriptor objects relevant to the analysis performed by the tool component. + * + */ + private Set rules = new LinkedHashSet(); + /** + * An array of reportingDescriptor objects relevant to the definitions of both standalone and tool-defined taxonomies. + * + */ + private Set taxa = new LinkedHashSet(); + /** + * An array of the artifactLocation objects associated with the tool component. + * + */ + private List locations = new ArrayList(); + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase language code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + private String language = "en-US"; + /** + * The kinds of data contained in this object. + * + */ + private Set contents = new LinkedHashSet(Arrays.asList(null, null)); + /** + * Specifies whether this object contains a complete definition of the localizable and/or non-localizable data for this component, as opposed to including only data that is relevant to the results persisted to this log file. + * + */ + private Boolean isComprehensive = false; + /** + * The semantic version of the localized strings defined in this component; maintained by components that provide translations. + * + */ + private String localizedDataSemanticVersion; + /** + * The minimum value of localizedDataSemanticVersion required in translations consumed by this component; used by components that consume translations. + * + */ + private String minimumRequiredLocalizedDataSemanticVersion; + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + private ToolComponentReference associatedComponent; + /** + * Provides additional metadata related to translation. + * + */ + private TranslationMetadata translationMetadata; + /** + * An array of toolComponentReference objects to declare the taxonomies supported by the tool component. + * + */ + private Set supportedTaxonomies = new LinkedHashSet(); + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * A unique identifer for the tool component in the form of a GUID. + * + */ + public String getGuid() { + return guid; + } + + /** + * A unique identifer for the tool component in the form of a GUID. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ToolComponent withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * The name of the tool component. + * (Required) + * + */ + public String getName() { + return name; + } + + /** + * The name of the tool component. + * (Required) + * + */ + public void setName(String name) { + this.name = name; + } + + public ToolComponent withName(String name) { + this.name = name; + return this; + } + + /** + * The organization or company that produced the tool component. + * + */ + public String getOrganization() { + return organization; + } + + /** + * The organization or company that produced the tool component. + * + */ + public void setOrganization(String organization) { + this.organization = organization; + } + + public ToolComponent withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * A product suite to which the tool component belongs. + * + */ + public String getProduct() { + return product; + } + + /** + * A product suite to which the tool component belongs. + * + */ + public void setProduct(String product) { + this.product = product; + } + + public ToolComponent withProduct(String product) { + this.product = product; + return this; + } + + /** + * A localizable string containing the name of the suite of products to which the tool component belongs. + * + */ + public String getProductSuite() { + return productSuite; + } + + /** + * A localizable string containing the name of the suite of products to which the tool component belongs. + * + */ + public void setProductSuite(String productSuite) { + this.productSuite = productSuite; + } + + public ToolComponent withProductSuite(String productSuite) { + this.productSuite = productSuite; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getShortDescription() { + return shortDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + } + + public ToolComponent withShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getFullDescription() { + return fullDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + } + + public ToolComponent withFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + return this; + } + + /** + * The name of the tool component along with its version and any other useful identifying information, such as its locale. + * + */ + public String getFullName() { + return fullName; + } + + /** + * The name of the tool component along with its version and any other useful identifying information, such as its locale. + * + */ + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public ToolComponent withFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** + * The tool component version, in whatever format the component natively provides. + * + */ + public String getVersion() { + return version; + } + + /** + * The tool component version, in whatever format the component natively provides. + * + */ + public void setVersion(String version) { + this.version = version; + } + + public ToolComponent withVersion(String version) { + this.version = version; + return this; + } + + /** + * The tool component version in the format specified by Semantic Versioning 2.0. + * + */ + public String getSemanticVersion() { + return semanticVersion; + } + + /** + * The tool component version in the format specified by Semantic Versioning 2.0. + * + */ + public void setSemanticVersion(String semanticVersion) { + this.semanticVersion = semanticVersion; + } + + public ToolComponent withSemanticVersion(String semanticVersion) { + this.semanticVersion = semanticVersion; + return this; + } + + /** + * The binary version of the tool component's primary executable file expressed as four non-negative integers separated by a period (for operating systems that express file versions in this way). + * + */ + public String getDottedQuadFileVersion() { + return dottedQuadFileVersion; + } + + /** + * The binary version of the tool component's primary executable file expressed as four non-negative integers separated by a period (for operating systems that express file versions in this way). + * + */ + public void setDottedQuadFileVersion(String dottedQuadFileVersion) { + this.dottedQuadFileVersion = dottedQuadFileVersion; + } + + public ToolComponent withDottedQuadFileVersion(String dottedQuadFileVersion) { + this.dottedQuadFileVersion = dottedQuadFileVersion; + return this; + } + + /** + * A string specifying the UTC date (and optionally, the time) of the component's release. + * + */ + public String getReleaseDateUtc() { + return releaseDateUtc; + } + + /** + * A string specifying the UTC date (and optionally, the time) of the component's release. + * + */ + public void setReleaseDateUtc(String releaseDateUtc) { + this.releaseDateUtc = releaseDateUtc; + } + + public ToolComponent withReleaseDateUtc(String releaseDateUtc) { + this.releaseDateUtc = releaseDateUtc; + return this; + } + + /** + * The absolute URI from which the tool component can be downloaded. + * + */ + public URI getDownloadUri() { + return downloadUri; + } + + /** + * The absolute URI from which the tool component can be downloaded. + * + */ + public void setDownloadUri(URI downloadUri) { + this.downloadUri = downloadUri; + } + + public ToolComponent withDownloadUri(URI downloadUri) { + this.downloadUri = downloadUri; + return this; + } + + /** + * The absolute URI at which information about this version of the tool component can be found. + * + */ + public URI getInformationUri() { + return informationUri; + } + + /** + * The absolute URI at which information about this version of the tool component can be found. + * + */ + public void setInformationUri(URI informationUri) { + this.informationUri = informationUri; + } + + public ToolComponent withInformationUri(URI informationUri) { + this.informationUri = informationUri; + return this; + } + + /** + * A dictionary, each of whose keys is a resource identifier and each of whose values is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + public GlobalMessageStrings getGlobalMessageStrings() { + return globalMessageStrings; + } + + /** + * A dictionary, each of whose keys is a resource identifier and each of whose values is a multiformatMessageString object, which holds message strings in plain text and (optionally) Markdown format. The strings can include placeholders, which can be used to construct a message in combination with an arbitrary number of additional string arguments. + * + */ + public void setGlobalMessageStrings(GlobalMessageStrings globalMessageStrings) { + this.globalMessageStrings = globalMessageStrings; + } + + public ToolComponent withGlobalMessageStrings(GlobalMessageStrings globalMessageStrings) { + this.globalMessageStrings = globalMessageStrings; + return this; + } + + /** + * An array of reportingDescriptor objects relevant to the notifications related to the configuration and runtime execution of the tool component. + * + */ + public Set getNotifications() { + return notifications; + } + + /** + * An array of reportingDescriptor objects relevant to the notifications related to the configuration and runtime execution of the tool component. + * + */ + public void setNotifications(Set notifications) { + this.notifications = notifications; + } + + public ToolComponent withNotifications(Set notifications) { + this.notifications = notifications; + return this; + } + + /** + * An array of reportingDescriptor objects relevant to the analysis performed by the tool component. + * + */ + public Set getRules() { + return rules; + } + + /** + * An array of reportingDescriptor objects relevant to the analysis performed by the tool component. + * + */ + public void setRules(Set rules) { + this.rules = rules; + } + + public ToolComponent withRules(Set rules) { + this.rules = rules; + return this; + } + + /** + * An array of reportingDescriptor objects relevant to the definitions of both standalone and tool-defined taxonomies. + * + */ + public Set getTaxa() { + return taxa; + } + + /** + * An array of reportingDescriptor objects relevant to the definitions of both standalone and tool-defined taxonomies. + * + */ + public void setTaxa(Set taxa) { + this.taxa = taxa; + } + + public ToolComponent withTaxa(Set taxa) { + this.taxa = taxa; + return this; + } + + /** + * An array of the artifactLocation objects associated with the tool component. + * + */ + public List getLocations() { + return locations; + } + + /** + * An array of the artifactLocation objects associated with the tool component. + * + */ + public void setLocations(List locations) { + this.locations = locations; + } + + public ToolComponent withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase language code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + public String getLanguage() { + return language; + } + + /** + * The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase language code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). + * + */ + public void setLanguage(String language) { + this.language = language; + } + + public ToolComponent withLanguage(String language) { + this.language = language; + return this; + } + + /** + * The kinds of data contained in this object. + * + */ + public Set getContents() { + return contents; + } + + /** + * The kinds of data contained in this object. + * + */ + public void setContents(Set contents) { + this.contents = contents; + } + + public ToolComponent withContents(Set contents) { + this.contents = contents; + return this; + } + + /** + * Specifies whether this object contains a complete definition of the localizable and/or non-localizable data for this component, as opposed to including only data that is relevant to the results persisted to this log file. + * + */ + public Boolean getIsComprehensive() { + return isComprehensive; + } + + /** + * Specifies whether this object contains a complete definition of the localizable and/or non-localizable data for this component, as opposed to including only data that is relevant to the results persisted to this log file. + * + */ + public void setIsComprehensive(Boolean isComprehensive) { + this.isComprehensive = isComprehensive; + } + + public ToolComponent withIsComprehensive(Boolean isComprehensive) { + this.isComprehensive = isComprehensive; + return this; + } + + /** + * The semantic version of the localized strings defined in this component; maintained by components that provide translations. + * + */ + public String getLocalizedDataSemanticVersion() { + return localizedDataSemanticVersion; + } + + /** + * The semantic version of the localized strings defined in this component; maintained by components that provide translations. + * + */ + public void setLocalizedDataSemanticVersion(String localizedDataSemanticVersion) { + this.localizedDataSemanticVersion = localizedDataSemanticVersion; + } + + public ToolComponent withLocalizedDataSemanticVersion(String localizedDataSemanticVersion) { + this.localizedDataSemanticVersion = localizedDataSemanticVersion; + return this; + } + + /** + * The minimum value of localizedDataSemanticVersion required in translations consumed by this component; used by components that consume translations. + * + */ + public String getMinimumRequiredLocalizedDataSemanticVersion() { + return minimumRequiredLocalizedDataSemanticVersion; + } + + /** + * The minimum value of localizedDataSemanticVersion required in translations consumed by this component; used by components that consume translations. + * + */ + public void setMinimumRequiredLocalizedDataSemanticVersion(String minimumRequiredLocalizedDataSemanticVersion) { + this.minimumRequiredLocalizedDataSemanticVersion = minimumRequiredLocalizedDataSemanticVersion; + } + + public ToolComponent withMinimumRequiredLocalizedDataSemanticVersion(String minimumRequiredLocalizedDataSemanticVersion) { + this.minimumRequiredLocalizedDataSemanticVersion = minimumRequiredLocalizedDataSemanticVersion; + return this; + } + + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + public ToolComponentReference getAssociatedComponent() { + return associatedComponent; + } + + /** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ + public void setAssociatedComponent(ToolComponentReference associatedComponent) { + this.associatedComponent = associatedComponent; + } + + public ToolComponent withAssociatedComponent(ToolComponentReference associatedComponent) { + this.associatedComponent = associatedComponent; + return this; + } + + /** + * Provides additional metadata related to translation. + * + */ + public TranslationMetadata getTranslationMetadata() { + return translationMetadata; + } + + /** + * Provides additional metadata related to translation. + * + */ + public void setTranslationMetadata(TranslationMetadata translationMetadata) { + this.translationMetadata = translationMetadata; + } + + public ToolComponent withTranslationMetadata(TranslationMetadata translationMetadata) { + this.translationMetadata = translationMetadata; + return this; + } + + /** + * An array of toolComponentReference objects to declare the taxonomies supported by the tool component. + * + */ + public Set getSupportedTaxonomies() { + return supportedTaxonomies; + } + + /** + * An array of toolComponentReference objects to declare the taxonomies supported by the tool component. + * + */ + public void setSupportedTaxonomies(Set supportedTaxonomies) { + this.supportedTaxonomies = supportedTaxonomies; + } + + public ToolComponent withSupportedTaxonomies(Set supportedTaxonomies) { + this.supportedTaxonomies = supportedTaxonomies; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ToolComponent withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ToolComponent.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("organization"); + sb.append('='); + sb.append(((this.organization == null)?"":this.organization)); + sb.append(','); + sb.append("product"); + sb.append('='); + sb.append(((this.product == null)?"":this.product)); + sb.append(','); + sb.append("productSuite"); + sb.append('='); + sb.append(((this.productSuite == null)?"":this.productSuite)); + sb.append(','); + sb.append("shortDescription"); + sb.append('='); + sb.append(((this.shortDescription == null)?"":this.shortDescription)); + sb.append(','); + sb.append("fullDescription"); + sb.append('='); + sb.append(((this.fullDescription == null)?"":this.fullDescription)); + sb.append(','); + sb.append("fullName"); + sb.append('='); + sb.append(((this.fullName == null)?"":this.fullName)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("semanticVersion"); + sb.append('='); + sb.append(((this.semanticVersion == null)?"":this.semanticVersion)); + sb.append(','); + sb.append("dottedQuadFileVersion"); + sb.append('='); + sb.append(((this.dottedQuadFileVersion == null)?"":this.dottedQuadFileVersion)); + sb.append(','); + sb.append("releaseDateUtc"); + sb.append('='); + sb.append(((this.releaseDateUtc == null)?"":this.releaseDateUtc)); + sb.append(','); + sb.append("downloadUri"); + sb.append('='); + sb.append(((this.downloadUri == null)?"":this.downloadUri)); + sb.append(','); + sb.append("informationUri"); + sb.append('='); + sb.append(((this.informationUri == null)?"":this.informationUri)); + sb.append(','); + sb.append("globalMessageStrings"); + sb.append('='); + sb.append(((this.globalMessageStrings == null)?"":this.globalMessageStrings)); + sb.append(','); + sb.append("notifications"); + sb.append('='); + sb.append(((this.notifications == null)?"":this.notifications)); + sb.append(','); + sb.append("rules"); + sb.append('='); + sb.append(((this.rules == null)?"":this.rules)); + sb.append(','); + sb.append("taxa"); + sb.append('='); + sb.append(((this.taxa == null)?"":this.taxa)); + sb.append(','); + sb.append("locations"); + sb.append('='); + sb.append(((this.locations == null)?"":this.locations)); + sb.append(','); + sb.append("language"); + sb.append('='); + sb.append(((this.language == null)?"":this.language)); + sb.append(','); + sb.append("contents"); + sb.append('='); + sb.append(((this.contents == null)?"":this.contents)); + sb.append(','); + sb.append("isComprehensive"); + sb.append('='); + sb.append(((this.isComprehensive == null)?"":this.isComprehensive)); + sb.append(','); + sb.append("localizedDataSemanticVersion"); + sb.append('='); + sb.append(((this.localizedDataSemanticVersion == null)?"":this.localizedDataSemanticVersion)); + sb.append(','); + sb.append("minimumRequiredLocalizedDataSemanticVersion"); + sb.append('='); + sb.append(((this.minimumRequiredLocalizedDataSemanticVersion == null)?"":this.minimumRequiredLocalizedDataSemanticVersion)); + sb.append(','); + sb.append("associatedComponent"); + sb.append('='); + sb.append(((this.associatedComponent == null)?"":this.associatedComponent)); + sb.append(','); + sb.append("translationMetadata"); + sb.append('='); + sb.append(((this.translationMetadata == null)?"":this.translationMetadata)); + sb.append(','); + sb.append("supportedTaxonomies"); + sb.append('='); + sb.append(((this.supportedTaxonomies == null)?"":this.supportedTaxonomies)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.releaseDateUtc == null)? 0 :this.releaseDateUtc.hashCode())); + result = ((result* 31)+((this.rules == null)? 0 :this.rules.hashCode())); + result = ((result* 31)+((this.language == null)? 0 :this.language.hashCode())); + result = ((result* 31)+((this.downloadUri == null)? 0 :this.downloadUri.hashCode())); + result = ((result* 31)+((this.supportedTaxonomies == null)? 0 :this.supportedTaxonomies.hashCode())); + result = ((result* 31)+((this.fullDescription == null)? 0 :this.fullDescription.hashCode())); + result = ((result* 31)+((this.informationUri == null)? 0 :this.informationUri.hashCode())); + result = ((result* 31)+((this.associatedComponent == null)? 0 :this.associatedComponent.hashCode())); + result = ((result* 31)+((this.translationMetadata == null)? 0 :this.translationMetadata.hashCode())); + result = ((result* 31)+((this.productSuite == null)? 0 :this.productSuite.hashCode())); + result = ((result* 31)+((this.taxa == null)? 0 :this.taxa.hashCode())); + result = ((result* 31)+((this.product == null)? 0 :this.product.hashCode())); + result = ((result* 31)+((this.isComprehensive == null)? 0 :this.isComprehensive.hashCode())); + result = ((result* 31)+((this.minimumRequiredLocalizedDataSemanticVersion == null)? 0 :this.minimumRequiredLocalizedDataSemanticVersion.hashCode())); + result = ((result* 31)+((this.fullName == null)? 0 :this.fullName.hashCode())); + result = ((result* 31)+((this.shortDescription == null)? 0 :this.shortDescription.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.globalMessageStrings == null)? 0 :this.globalMessageStrings.hashCode())); + result = ((result* 31)+((this.localizedDataSemanticVersion == null)? 0 :this.localizedDataSemanticVersion.hashCode())); + result = ((result* 31)+((this.dottedQuadFileVersion == null)? 0 :this.dottedQuadFileVersion.hashCode())); + result = ((result* 31)+((this.contents == null)? 0 :this.contents.hashCode())); + result = ((result* 31)+((this.organization == null)? 0 :this.organization.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.semanticVersion == null)? 0 :this.semanticVersion.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.locations == null)? 0 :this.locations.hashCode())); + result = ((result* 31)+((this.notifications == null)? 0 :this.notifications.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ToolComponent) == false) { + return false; + } + ToolComponent rhs = ((ToolComponent) other); + return (((((((((((((((((((((((((((((this.releaseDateUtc == rhs.releaseDateUtc)||((this.releaseDateUtc!= null)&&this.releaseDateUtc.equals(rhs.releaseDateUtc)))&&((this.rules == rhs.rules)||((this.rules!= null)&&this.rules.equals(rhs.rules))))&&((this.language == rhs.language)||((this.language!= null)&&this.language.equals(rhs.language))))&&((this.downloadUri == rhs.downloadUri)||((this.downloadUri!= null)&&this.downloadUri.equals(rhs.downloadUri))))&&((this.supportedTaxonomies == rhs.supportedTaxonomies)||((this.supportedTaxonomies!= null)&&this.supportedTaxonomies.equals(rhs.supportedTaxonomies))))&&((this.fullDescription == rhs.fullDescription)||((this.fullDescription!= null)&&this.fullDescription.equals(rhs.fullDescription))))&&((this.informationUri == rhs.informationUri)||((this.informationUri!= null)&&this.informationUri.equals(rhs.informationUri))))&&((this.associatedComponent == rhs.associatedComponent)||((this.associatedComponent!= null)&&this.associatedComponent.equals(rhs.associatedComponent))))&&((this.translationMetadata == rhs.translationMetadata)||((this.translationMetadata!= null)&&this.translationMetadata.equals(rhs.translationMetadata))))&&((this.productSuite == rhs.productSuite)||((this.productSuite!= null)&&this.productSuite.equals(rhs.productSuite))))&&((this.taxa == rhs.taxa)||((this.taxa!= null)&&this.taxa.equals(rhs.taxa))))&&((this.product == rhs.product)||((this.product!= null)&&this.product.equals(rhs.product))))&&((this.isComprehensive == rhs.isComprehensive)||((this.isComprehensive!= null)&&this.isComprehensive.equals(rhs.isComprehensive))))&&((this.minimumRequiredLocalizedDataSemanticVersion == rhs.minimumRequiredLocalizedDataSemanticVersion)||((this.minimumRequiredLocalizedDataSemanticVersion!= null)&&this.minimumRequiredLocalizedDataSemanticVersion.equals(rhs.minimumRequiredLocalizedDataSemanticVersion))))&&((this.fullName == rhs.fullName)||((this.fullName!= null)&&this.fullName.equals(rhs.fullName))))&&((this.shortDescription == rhs.shortDescription)||((this.shortDescription!= null)&&this.shortDescription.equals(rhs.shortDescription))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.globalMessageStrings == rhs.globalMessageStrings)||((this.globalMessageStrings!= null)&&this.globalMessageStrings.equals(rhs.globalMessageStrings))))&&((this.localizedDataSemanticVersion == rhs.localizedDataSemanticVersion)||((this.localizedDataSemanticVersion!= null)&&this.localizedDataSemanticVersion.equals(rhs.localizedDataSemanticVersion))))&&((this.dottedQuadFileVersion == rhs.dottedQuadFileVersion)||((this.dottedQuadFileVersion!= null)&&this.dottedQuadFileVersion.equals(rhs.dottedQuadFileVersion))))&&((this.contents == rhs.contents)||((this.contents!= null)&&this.contents.equals(rhs.contents))))&&((this.organization == rhs.organization)||((this.organization!= null)&&this.organization.equals(rhs.organization))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.semanticVersion == rhs.semanticVersion)||((this.semanticVersion!= null)&&this.semanticVersion.equals(rhs.semanticVersion))))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.locations == rhs.locations)||((this.locations!= null)&&this.locations.equals(rhs.locations))))&&((this.notifications == rhs.notifications)||((this.notifications!= null)&&this.notifications.equals(rhs.notifications))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponentReference.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponentReference.java new file mode 100644 index 0000000..41aba87 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/ToolComponentReference.java @@ -0,0 +1,167 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Identifies a particular toolComponent object, either the driver or an extension. + * + */ +public class ToolComponentReference { + + /** + * The 'name' property of the referenced toolComponent. + * + */ + private String name; + /** + * An index into the referenced toolComponent in tool.extensions. + * + */ + private Integer index = -1; + /** + * The 'guid' property of the referenced toolComponent. + * + */ + private String guid; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The 'name' property of the referenced toolComponent. + * + */ + public String getName() { + return name; + } + + /** + * The 'name' property of the referenced toolComponent. + * + */ + public void setName(String name) { + this.name = name; + } + + public ToolComponentReference withName(String name) { + this.name = name; + return this; + } + + /** + * An index into the referenced toolComponent in tool.extensions. + * + */ + public Integer getIndex() { + return index; + } + + /** + * An index into the referenced toolComponent in tool.extensions. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public ToolComponentReference withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * The 'guid' property of the referenced toolComponent. + * + */ + public String getGuid() { + return guid; + } + + /** + * The 'guid' property of the referenced toolComponent. + * + */ + public void setGuid(String guid) { + this.guid = guid; + } + + public ToolComponentReference withGuid(String guid) { + this.guid = guid; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public ToolComponentReference withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ToolComponentReference.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("guid"); + sb.append('='); + sb.append(((this.guid == null)?"":this.guid)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.guid == null)? 0 :this.guid.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ToolComponentReference) == false) { + return false; + } + ToolComponentReference rhs = ((ToolComponentReference) other); + return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.guid == rhs.guid)||((this.guid!= null)&&this.guid.equals(rhs.guid))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/TranslationMetadata.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/TranslationMetadata.java new file mode 100644 index 0000000..fd9eda7 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/TranslationMetadata.java @@ -0,0 +1,264 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; + + +/** + * Provides additional metadata related to translation. + * + */ +public class TranslationMetadata { + + /** + * The name associated with the translation metadata. + * (Required) + * + */ + private String name; + /** + * The full name associated with the translation metadata. + * + */ + private String fullName; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString shortDescription; + /** + * A message string or message format string rendered in multiple formats. + * + */ + private MultiformatMessageString fullDescription; + /** + * The absolute URI from which the translation metadata can be downloaded. + * + */ + private URI downloadUri; + /** + * The absolute URI from which information related to the translation metadata can be downloaded. + * + */ + private URI informationUri; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The name associated with the translation metadata. + * (Required) + * + */ + public String getName() { + return name; + } + + /** + * The name associated with the translation metadata. + * (Required) + * + */ + public void setName(String name) { + this.name = name; + } + + public TranslationMetadata withName(String name) { + this.name = name; + return this; + } + + /** + * The full name associated with the translation metadata. + * + */ + public String getFullName() { + return fullName; + } + + /** + * The full name associated with the translation metadata. + * + */ + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public TranslationMetadata withFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getShortDescription() { + return shortDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + } + + public TranslationMetadata withShortDescription(MultiformatMessageString shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public MultiformatMessageString getFullDescription() { + return fullDescription; + } + + /** + * A message string or message format string rendered in multiple formats. + * + */ + public void setFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + } + + public TranslationMetadata withFullDescription(MultiformatMessageString fullDescription) { + this.fullDescription = fullDescription; + return this; + } + + /** + * The absolute URI from which the translation metadata can be downloaded. + * + */ + public URI getDownloadUri() { + return downloadUri; + } + + /** + * The absolute URI from which the translation metadata can be downloaded. + * + */ + public void setDownloadUri(URI downloadUri) { + this.downloadUri = downloadUri; + } + + public TranslationMetadata withDownloadUri(URI downloadUri) { + this.downloadUri = downloadUri; + return this; + } + + /** + * The absolute URI from which information related to the translation metadata can be downloaded. + * + */ + public URI getInformationUri() { + return informationUri; + } + + /** + * The absolute URI from which information related to the translation metadata can be downloaded. + * + */ + public void setInformationUri(URI informationUri) { + this.informationUri = informationUri; + } + + public TranslationMetadata withInformationUri(URI informationUri) { + this.informationUri = informationUri; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public TranslationMetadata withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TranslationMetadata.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("fullName"); + sb.append('='); + sb.append(((this.fullName == null)?"":this.fullName)); + sb.append(','); + sb.append("shortDescription"); + sb.append('='); + sb.append(((this.shortDescription == null)?"":this.shortDescription)); + sb.append(','); + sb.append("fullDescription"); + sb.append('='); + sb.append(((this.fullDescription == null)?"":this.fullDescription)); + sb.append(','); + sb.append("downloadUri"); + sb.append('='); + sb.append(((this.downloadUri == null)?"":this.downloadUri)); + sb.append(','); + sb.append("informationUri"); + sb.append('='); + sb.append(((this.informationUri == null)?"":this.informationUri)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.fullName == null)? 0 :this.fullName.hashCode())); + result = ((result* 31)+((this.shortDescription == null)? 0 :this.shortDescription.hashCode())); + result = ((result* 31)+((this.downloadUri == null)? 0 :this.downloadUri.hashCode())); + result = ((result* 31)+((this.fullDescription == null)? 0 :this.fullDescription.hashCode())); + result = ((result* 31)+((this.informationUri == null)? 0 :this.informationUri.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TranslationMetadata) == false) { + return false; + } + TranslationMetadata rhs = ((TranslationMetadata) other); + return ((((((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.fullName == rhs.fullName)||((this.fullName!= null)&&this.fullName.equals(rhs.fullName))))&&((this.shortDescription == rhs.shortDescription)||((this.shortDescription!= null)&&this.shortDescription.equals(rhs.shortDescription))))&&((this.downloadUri == rhs.downloadUri)||((this.downloadUri!= null)&&this.downloadUri.equals(rhs.downloadUri))))&&((this.fullDescription == rhs.fullDescription)||((this.fullDescription!= null)&&this.fullDescription.equals(rhs.fullDescription))))&&((this.informationUri == rhs.informationUri)||((this.informationUri!= null)&&this.informationUri.equals(rhs.informationUri))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/VersionControlDetails.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/VersionControlDetails.java new file mode 100644 index 0000000..87d0312 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/VersionControlDetails.java @@ -0,0 +1,265 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + +import java.net.URI; +import java.util.Date; + + +/** + * Specifies the information necessary to retrieve a desired revision from a version control system. + * + */ +public class VersionControlDetails { + + /** + * The absolute URI of the repository. + * (Required) + * + */ + private URI repositoryUri; + /** + * A string that uniquely and permanently identifies the revision within the repository. + * + */ + private String revisionId; + /** + * The name of a branch containing the revision. + * + */ + private String branch; + /** + * A tag that has been applied to the revision. + * + */ + private String revisionTag; + /** + * A Coordinated Universal Time (UTC) date and time that can be used to synchronize an enlistment to the state of the repository at that time. + * + */ + private Date asOfTimeUtc; + /** + * Specifies the location of an artifact. + * + */ + private ArtifactLocation mappedTo; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The absolute URI of the repository. + * (Required) + * + */ + public URI getRepositoryUri() { + return repositoryUri; + } + + /** + * The absolute URI of the repository. + * (Required) + * + */ + public void setRepositoryUri(URI repositoryUri) { + this.repositoryUri = repositoryUri; + } + + public VersionControlDetails withRepositoryUri(URI repositoryUri) { + this.repositoryUri = repositoryUri; + return this; + } + + /** + * A string that uniquely and permanently identifies the revision within the repository. + * + */ + public String getRevisionId() { + return revisionId; + } + + /** + * A string that uniquely and permanently identifies the revision within the repository. + * + */ + public void setRevisionId(String revisionId) { + this.revisionId = revisionId; + } + + public VersionControlDetails withRevisionId(String revisionId) { + this.revisionId = revisionId; + return this; + } + + /** + * The name of a branch containing the revision. + * + */ + public String getBranch() { + return branch; + } + + /** + * The name of a branch containing the revision. + * + */ + public void setBranch(String branch) { + this.branch = branch; + } + + public VersionControlDetails withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * A tag that has been applied to the revision. + * + */ + public String getRevisionTag() { + return revisionTag; + } + + /** + * A tag that has been applied to the revision. + * + */ + public void setRevisionTag(String revisionTag) { + this.revisionTag = revisionTag; + } + + public VersionControlDetails withRevisionTag(String revisionTag) { + this.revisionTag = revisionTag; + return this; + } + + /** + * A Coordinated Universal Time (UTC) date and time that can be used to synchronize an enlistment to the state of the repository at that time. + * + */ + public Date getAsOfTimeUtc() { + return asOfTimeUtc; + } + + /** + * A Coordinated Universal Time (UTC) date and time that can be used to synchronize an enlistment to the state of the repository at that time. + * + */ + public void setAsOfTimeUtc(Date asOfTimeUtc) { + this.asOfTimeUtc = asOfTimeUtc; + } + + public VersionControlDetails withAsOfTimeUtc(Date asOfTimeUtc) { + this.asOfTimeUtc = asOfTimeUtc; + return this; + } + + /** + * Specifies the location of an artifact. + * + */ + public ArtifactLocation getMappedTo() { + return mappedTo; + } + + /** + * Specifies the location of an artifact. + * + */ + public void setMappedTo(ArtifactLocation mappedTo) { + this.mappedTo = mappedTo; + } + + public VersionControlDetails withMappedTo(ArtifactLocation mappedTo) { + this.mappedTo = mappedTo; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public VersionControlDetails withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(VersionControlDetails.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("repositoryUri"); + sb.append('='); + sb.append(((this.repositoryUri == null)?"":this.repositoryUri)); + sb.append(','); + sb.append("revisionId"); + sb.append('='); + sb.append(((this.revisionId == null)?"":this.revisionId)); + sb.append(','); + sb.append("branch"); + sb.append('='); + sb.append(((this.branch == null)?"":this.branch)); + sb.append(','); + sb.append("revisionTag"); + sb.append('='); + sb.append(((this.revisionTag == null)?"":this.revisionTag)); + sb.append(','); + sb.append("asOfTimeUtc"); + sb.append('='); + sb.append(((this.asOfTimeUtc == null)?"":this.asOfTimeUtc)); + sb.append(','); + sb.append("mappedTo"); + sb.append('='); + sb.append(((this.mappedTo == null)?"":this.mappedTo)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.revisionId == null)? 0 :this.revisionId.hashCode())); + result = ((result* 31)+((this.repositoryUri == null)? 0 :this.repositoryUri.hashCode())); + result = ((result* 31)+((this.mappedTo == null)? 0 :this.mappedTo.hashCode())); + result = ((result* 31)+((this.branch == null)? 0 :this.branch.hashCode())); + result = ((result* 31)+((this.asOfTimeUtc == null)? 0 :this.asOfTimeUtc.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.revisionTag == null)? 0 :this.revisionTag.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof VersionControlDetails) == false) { + return false; + } + VersionControlDetails rhs = ((VersionControlDetails) other); + return ((((((((this.revisionId == rhs.revisionId)||((this.revisionId!= null)&&this.revisionId.equals(rhs.revisionId)))&&((this.repositoryUri == rhs.repositoryUri)||((this.repositoryUri!= null)&&this.repositoryUri.equals(rhs.repositoryUri))))&&((this.mappedTo == rhs.mappedTo)||((this.mappedTo!= null)&&this.mappedTo.equals(rhs.mappedTo))))&&((this.branch == rhs.branch)||((this.branch!= null)&&this.branch.equals(rhs.branch))))&&((this.asOfTimeUtc == rhs.asOfTimeUtc)||((this.asOfTimeUtc!= null)&&this.asOfTimeUtc.equals(rhs.asOfTimeUtc))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.revisionTag == rhs.revisionTag)||((this.revisionTag!= null)&&this.revisionTag.equals(rhs.revisionTag)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebRequest.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebRequest.java new file mode 100644 index 0000000..c95135a --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebRequest.java @@ -0,0 +1,322 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Describes an HTTP request. + * + */ +public class WebRequest { + + /** + * The index within the run.webRequests array of the request object associated with this result. + * + */ + private Integer index = -1; + /** + * The request protocol. Example: 'http'. + * + */ + private String protocol; + /** + * The request version. Example: '1.1'. + * + */ + private String version; + /** + * The target of the request. + * + */ + private String target; + /** + * The HTTP method. Well-known values are 'GET', 'PUT', 'POST', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'. + * + */ + private String method; + /** + * The request headers. + * + */ + private Headers headers; + /** + * The request parameters. + * + */ + private Parameters parameters; + /** + * Represents the contents of an artifact. + * + */ + private ArtifactContent body; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The index within the run.webRequests array of the request object associated with this result. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within the run.webRequests array of the request object associated with this result. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public WebRequest withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * The request protocol. Example: 'http'. + * + */ + public String getProtocol() { + return protocol; + } + + /** + * The request protocol. Example: 'http'. + * + */ + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public WebRequest withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * The request version. Example: '1.1'. + * + */ + public String getVersion() { + return version; + } + + /** + * The request version. Example: '1.1'. + * + */ + public void setVersion(String version) { + this.version = version; + } + + public WebRequest withVersion(String version) { + this.version = version; + return this; + } + + /** + * The target of the request. + * + */ + public String getTarget() { + return target; + } + + /** + * The target of the request. + * + */ + public void setTarget(String target) { + this.target = target; + } + + public WebRequest withTarget(String target) { + this.target = target; + return this; + } + + /** + * The HTTP method. Well-known values are 'GET', 'PUT', 'POST', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'. + * + */ + public String getMethod() { + return method; + } + + /** + * The HTTP method. Well-known values are 'GET', 'PUT', 'POST', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'. + * + */ + public void setMethod(String method) { + this.method = method; + } + + public WebRequest withMethod(String method) { + this.method = method; + return this; + } + + /** + * The request headers. + * + */ + public Headers getHeaders() { + return headers; + } + + /** + * The request headers. + * + */ + public void setHeaders(Headers headers) { + this.headers = headers; + } + + public WebRequest withHeaders(Headers headers) { + this.headers = headers; + return this; + } + + /** + * The request parameters. + * + */ + public Parameters getParameters() { + return parameters; + } + + /** + * The request parameters. + * + */ + public void setParameters(Parameters parameters) { + this.parameters = parameters; + } + + public WebRequest withParameters(Parameters parameters) { + this.parameters = parameters; + return this; + } + + /** + * Represents the contents of an artifact. + * + */ + public ArtifactContent getBody() { + return body; + } + + /** + * Represents the contents of an artifact. + * + */ + public void setBody(ArtifactContent body) { + this.body = body; + } + + public WebRequest withBody(ArtifactContent body) { + this.body = body; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public WebRequest withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(WebRequest.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("protocol"); + sb.append('='); + sb.append(((this.protocol == null)?"":this.protocol)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("target"); + sb.append('='); + sb.append(((this.target == null)?"":this.target)); + sb.append(','); + sb.append("method"); + sb.append('='); + sb.append(((this.method == null)?"":this.method)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null)?"":this.headers)); + sb.append(','); + sb.append("parameters"); + sb.append('='); + sb.append(((this.parameters == null)?"":this.parameters)); + sb.append(','); + sb.append("body"); + sb.append('='); + sb.append(((this.body == null)?"":this.body)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.headers == null)? 0 :this.headers.hashCode())); + result = ((result* 31)+((this.protocol == null)? 0 :this.protocol.hashCode())); + result = ((result* 31)+((this.method == null)? 0 :this.method.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.body == null)? 0 :this.body.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.parameters == null)? 0 :this.parameters.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.target == null)? 0 :this.target.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof WebRequest) == false) { + return false; + } + WebRequest rhs = ((WebRequest) other); + return ((((((((((this.headers == rhs.headers)||((this.headers!= null)&&this.headers.equals(rhs.headers)))&&((this.protocol == rhs.protocol)||((this.protocol!= null)&&this.protocol.equals(rhs.protocol))))&&((this.method == rhs.method)||((this.method!= null)&&this.method.equals(rhs.method))))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.body == rhs.body)||((this.body!= null)&&this.body.equals(rhs.body))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.parameters == rhs.parameters)||((this.parameters!= null)&&this.parameters.equals(rhs.parameters))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.target == rhs.target)||((this.target!= null)&&this.target.equals(rhs.target)))); + } + +} diff --git a/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebResponse.java b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebResponse.java new file mode 100644 index 0000000..9fdf8f5 --- /dev/null +++ b/src/gen/java/se/bjurr/violations/lib/model/generated/sarif/WebResponse.java @@ -0,0 +1,322 @@ + +package se.bjurr.violations.lib.model.generated.sarif; + + + +/** + * Describes the response to an HTTP request. + * + */ +public class WebResponse { + + /** + * The index within the run.webResponses array of the response object associated with this result. + * + */ + private Integer index = -1; + /** + * The response protocol. Example: 'http'. + * + */ + private String protocol; + /** + * The response version. Example: '1.1'. + * + */ + private String version; + /** + * The response status code. Example: 451. + * + */ + private Integer statusCode; + /** + * The response reason. Example: 'Not found'. + * + */ + private String reasonPhrase; + /** + * The response headers. + * + */ + private Headers__1 headers; + /** + * Represents the contents of an artifact. + * + */ + private ArtifactContent body; + /** + * Specifies whether a response was received from the server. + * + */ + private Boolean noResponseReceived = false; + /** + * Key/value pairs that provide additional information about the object. + * + */ + private PropertyBag properties; + + /** + * The index within the run.webResponses array of the response object associated with this result. + * + */ + public Integer getIndex() { + return index; + } + + /** + * The index within the run.webResponses array of the response object associated with this result. + * + */ + public void setIndex(Integer index) { + this.index = index; + } + + public WebResponse withIndex(Integer index) { + this.index = index; + return this; + } + + /** + * The response protocol. Example: 'http'. + * + */ + public String getProtocol() { + return protocol; + } + + /** + * The response protocol. Example: 'http'. + * + */ + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public WebResponse withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * The response version. Example: '1.1'. + * + */ + public String getVersion() { + return version; + } + + /** + * The response version. Example: '1.1'. + * + */ + public void setVersion(String version) { + this.version = version; + } + + public WebResponse withVersion(String version) { + this.version = version; + return this; + } + + /** + * The response status code. Example: 451. + * + */ + public Integer getStatusCode() { + return statusCode; + } + + /** + * The response status code. Example: 451. + * + */ + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public WebResponse withStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * The response reason. Example: 'Not found'. + * + */ + public String getReasonPhrase() { + return reasonPhrase; + } + + /** + * The response reason. Example: 'Not found'. + * + */ + public void setReasonPhrase(String reasonPhrase) { + this.reasonPhrase = reasonPhrase; + } + + public WebResponse withReasonPhrase(String reasonPhrase) { + this.reasonPhrase = reasonPhrase; + return this; + } + + /** + * The response headers. + * + */ + public Headers__1 getHeaders() { + return headers; + } + + /** + * The response headers. + * + */ + public void setHeaders(Headers__1 headers) { + this.headers = headers; + } + + public WebResponse withHeaders(Headers__1 headers) { + this.headers = headers; + return this; + } + + /** + * Represents the contents of an artifact. + * + */ + public ArtifactContent getBody() { + return body; + } + + /** + * Represents the contents of an artifact. + * + */ + public void setBody(ArtifactContent body) { + this.body = body; + } + + public WebResponse withBody(ArtifactContent body) { + this.body = body; + return this; + } + + /** + * Specifies whether a response was received from the server. + * + */ + public Boolean getNoResponseReceived() { + return noResponseReceived; + } + + /** + * Specifies whether a response was received from the server. + * + */ + public void setNoResponseReceived(Boolean noResponseReceived) { + this.noResponseReceived = noResponseReceived; + } + + public WebResponse withNoResponseReceived(Boolean noResponseReceived) { + this.noResponseReceived = noResponseReceived; + return this; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public PropertyBag getProperties() { + return properties; + } + + /** + * Key/value pairs that provide additional information about the object. + * + */ + public void setProperties(PropertyBag properties) { + this.properties = properties; + } + + public WebResponse withProperties(PropertyBag properties) { + this.properties = properties; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(WebResponse.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("index"); + sb.append('='); + sb.append(((this.index == null)?"":this.index)); + sb.append(','); + sb.append("protocol"); + sb.append('='); + sb.append(((this.protocol == null)?"":this.protocol)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("statusCode"); + sb.append('='); + sb.append(((this.statusCode == null)?"":this.statusCode)); + sb.append(','); + sb.append("reasonPhrase"); + sb.append('='); + sb.append(((this.reasonPhrase == null)?"":this.reasonPhrase)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null)?"":this.headers)); + sb.append(','); + sb.append("body"); + sb.append('='); + sb.append(((this.body == null)?"":this.body)); + sb.append(','); + sb.append("noResponseReceived"); + sb.append('='); + sb.append(((this.noResponseReceived == null)?"":this.noResponseReceived)); + sb.append(','); + sb.append("properties"); + sb.append('='); + sb.append(((this.properties == null)?"":this.properties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.headers == null)? 0 :this.headers.hashCode())); + result = ((result* 31)+((this.protocol == null)? 0 :this.protocol.hashCode())); + result = ((result* 31)+((this.reasonPhrase == null)? 0 :this.reasonPhrase.hashCode())); + result = ((result* 31)+((this.noResponseReceived == null)? 0 :this.noResponseReceived.hashCode())); + result = ((result* 31)+((this.index == null)? 0 :this.index.hashCode())); + result = ((result* 31)+((this.body == null)? 0 :this.body.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); + result = ((result* 31)+((this.statusCode == null)? 0 :this.statusCode.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof WebResponse) == false) { + return false; + } + WebResponse rhs = ((WebResponse) other); + return ((((((((((this.headers == rhs.headers)||((this.headers!= null)&&this.headers.equals(rhs.headers)))&&((this.protocol == rhs.protocol)||((this.protocol!= null)&&this.protocol.equals(rhs.protocol))))&&((this.reasonPhrase == rhs.reasonPhrase)||((this.reasonPhrase!= null)&&this.reasonPhrase.equals(rhs.reasonPhrase))))&&((this.noResponseReceived == rhs.noResponseReceived)||((this.noResponseReceived!= null)&&this.noResponseReceived.equals(rhs.noResponseReceived))))&&((this.index == rhs.index)||((this.index!= null)&&this.index.equals(rhs.index))))&&((this.body == rhs.body)||((this.body!= null)&&this.body.equals(rhs.body))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.statusCode == rhs.statusCode)||((this.statusCode!= null)&&this.statusCode.equals(rhs.statusCode)))); + } + +}