diff --git a/pom.xml b/pom.xml index 123cb01..6e7ce94 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.digitalstate.stix stix - v0.5.1 + v0.5.2 jar STIX 2 diff --git a/src/main/java/io/digitalstate/stix/coo/CyberObservableObject.java b/src/main/java/io/digitalstate/stix/coo/CyberObservableObject.java index c3a462c..7f58b71 100644 --- a/src/main/java/io/digitalstate/stix/coo/CyberObservableObject.java +++ b/src/main/java/io/digitalstate/stix/coo/CyberObservableObject.java @@ -2,7 +2,9 @@ import io.digitalstate.stix.common.StixCustomProperties; -public interface CyberObservableObject extends +import java.io.Serializable; + +public interface CyberObservableObject extends Serializable, CyberObservableObjectCommonProperties, StixCustomProperties { diff --git a/src/main/java/io/digitalstate/stix/datamarkings/GranularMarkingDm.java b/src/main/java/io/digitalstate/stix/datamarkings/GranularMarkingDm.java index d758510..61874d5 100644 --- a/src/main/java/io/digitalstate/stix/datamarkings/GranularMarkingDm.java +++ b/src/main/java/io/digitalstate/stix/datamarkings/GranularMarkingDm.java @@ -9,17 +9,19 @@ import io.digitalstate.stix.json.converters.dehydrated.MarkingDefinitionConverter; import io.digitalstate.stix.redaction.Redactable; import io.digitalstate.stix.validation.SdoDefaultValidator; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import java.io.Serializable; import java.util.Set; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Dm", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE) @JsonSerialize(as = GranularMarking.class) @JsonDeserialize(builder = GranularMarking.Builder.class) @Redactable -public interface GranularMarkingDm extends SdoDefaultValidator { +public interface GranularMarkingDm extends SdoDefaultValidator, Serializable { @NotNull @JsonProperty("marking_ref") diff --git a/src/main/java/io/digitalstate/stix/datamarkings/MarkingDefinitionDm.java b/src/main/java/io/digitalstate/stix/datamarkings/MarkingDefinitionDm.java index 32ee538..bac18e3 100644 --- a/src/main/java/io/digitalstate/stix/datamarkings/MarkingDefinitionDm.java +++ b/src/main/java/io/digitalstate/stix/datamarkings/MarkingDefinitionDm.java @@ -11,6 +11,7 @@ import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.contraints.markingdefinitiontype.MarkingDefinitionTypeLimit; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -23,7 +24,7 @@ *
  • {@link MarkingDefinition#definition} - the Marking Object. Two objects are currently supported: {@link Tlp} and {@link Statement}.
  • * */ -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("marking-definition") @DefaultTypeValue(value = "marking-definition", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Dm", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/datamarkings/StatementMarkingObject.java b/src/main/java/io/digitalstate/stix/datamarkings/StatementMarkingObject.java index 93631d6..900fc26 100644 --- a/src/main/java/io/digitalstate/stix/datamarkings/StatementMarkingObject.java +++ b/src/main/java/io/digitalstate/stix/datamarkings/StatementMarkingObject.java @@ -6,11 +6,12 @@ import io.digitalstate.stix.redaction.Redactable; import io.digitalstate.stix.validation.GenericValidation; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeImmutable = "Statement", validationMethod = Value.Style.ValidationMethod.NONE) @JsonSerialize(as = Statement.class) @JsonDeserialize(builder = Statement.Builder.class) @Redactable diff --git a/src/main/java/io/digitalstate/stix/datamarkings/StixMarkingObject.java b/src/main/java/io/digitalstate/stix/datamarkings/StixMarkingObject.java index 9abb16e..8fc0586 100644 --- a/src/main/java/io/digitalstate/stix/datamarkings/StixMarkingObject.java +++ b/src/main/java/io/digitalstate/stix/datamarkings/StixMarkingObject.java @@ -1,4 +1,6 @@ package io.digitalstate.stix.datamarkings; -public interface StixMarkingObject { +import java.io.Serializable; + +public interface StixMarkingObject extends Serializable { } diff --git a/src/main/java/io/digitalstate/stix/datamarkings/TlpMarkingObject.java b/src/main/java/io/digitalstate/stix/datamarkings/TlpMarkingObject.java index 4d9c354..39b2ae3 100644 --- a/src/main/java/io/digitalstate/stix/datamarkings/TlpMarkingObject.java +++ b/src/main/java/io/digitalstate/stix/datamarkings/TlpMarkingObject.java @@ -7,11 +7,12 @@ import io.digitalstate.stix.validation.GenericValidation; import io.digitalstate.stix.validation.contraints.vocab.Vocab; import io.digitalstate.stix.vocabularies.TlpLevels; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotNull; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeImmutable = "Tlp", validationMethod = Value.Style.ValidationMethod.NONE) @JsonSerialize(as = Tlp.class) @JsonDeserialize(builder = Tlp.Builder.class) @Redactable diff --git a/src/main/java/io/digitalstate/stix/sdo/DomainObject.java b/src/main/java/io/digitalstate/stix/sdo/DomainObject.java index 3b96288..e688115 100644 --- a/src/main/java/io/digitalstate/stix/sdo/DomainObject.java +++ b/src/main/java/io/digitalstate/stix/sdo/DomainObject.java @@ -5,12 +5,13 @@ import io.digitalstate.stix.sro.objects.RelationshipSro; import javax.validation.constraints.NotNull; +import java.io.Serializable; import java.util.Set; /** * Base interface used by Immutable STIX Domain Objects */ -public interface DomainObject extends +public interface DomainObject extends Serializable, StixCommonProperties, StixCustomProperties, StixLabels, diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/CampaignSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/CampaignSdo.java index 29ae0bd..dd40ebe 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/CampaignSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/CampaignSdo.java @@ -9,6 +9,7 @@ import io.digitalstate.stix.sdo.DomainObject; import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -19,7 +20,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("campaign") @DefaultTypeValue(value = "campaign", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/CourseOfActionSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/CourseOfActionSdo.java index 6b17a9a..9cc3a6d 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/CourseOfActionSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/CourseOfActionSdo.java @@ -10,6 +10,7 @@ import io.digitalstate.stix.sdo.DomainObject; import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -19,7 +20,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("course-of-action") @DefaultTypeValue(value = "course-of-action", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/IdentitySdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/IdentitySdo.java index 73d090b..24cb750 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/IdentitySdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/IdentitySdo.java @@ -13,6 +13,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.IdentityClasses; import io.digitalstate.stix.vocabularies.IndustrySectors; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -22,7 +23,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("identity") @DefaultTypeValue(value = "identity", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/IndicatorSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/IndicatorSdo.java index fd92d94..e3daacb 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/IndicatorSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/IndicatorSdo.java @@ -13,6 +13,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.IndicatorLabels; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -24,7 +25,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("indicator") @DefaultTypeValue(value = "indicator", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/IntrusionSetSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/IntrusionSetSdo.java index dd43ef8..80fd907 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/IntrusionSetSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/IntrusionSetSdo.java @@ -12,6 +12,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.AttackMotivations; import io.digitalstate.stix.vocabularies.AttackResourceLevels; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -22,7 +23,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("intrusion-set") @DefaultTypeValue(value = "intrusion-set", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/MalwareSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/MalwareSdo.java index 4ed4135..ccb1fe6 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/MalwareSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/MalwareSdo.java @@ -14,6 +14,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.MalwareLabels; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -24,7 +25,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @DefaultTypeValue(value = "malware", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) @JsonTypeName("malware") diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/ObservedDataSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/ObservedDataSdo.java index 5c5690a..bd0be43 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/ObservedDataSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/ObservedDataSdo.java @@ -9,6 +9,7 @@ import io.digitalstate.stix.sdo.DomainObject; import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotNull; @@ -17,7 +18,7 @@ import java.time.Instant; import java.util.Set; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("observed-data") @DefaultTypeValue(value = "observed-data", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/ReportSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/ReportSdo.java index 8d4f90f..f479a2e 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/ReportSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/ReportSdo.java @@ -14,6 +14,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.ReportLabels; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -25,7 +26,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("report") @DefaultTypeValue(value = "report", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/ThreatActorSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/ThreatActorSdo.java index fa7f650..d1ac8d8 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/ThreatActorSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/ThreatActorSdo.java @@ -12,6 +12,7 @@ import io.digitalstate.stix.validation.contraints.vocab.Vocab; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.*; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -22,7 +23,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) @JsonTypeName("threat-actor") @DefaultTypeValue(value = "threat-actor", groups = {DefaultValuesProcessor.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/ToolSdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/ToolSdo.java index e491c32..c5a5b43 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/ToolSdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/ToolSdo.java @@ -14,6 +14,7 @@ import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.ToolLabels; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -23,7 +24,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @JsonTypeName("tool") @DefaultTypeValue(value = "tool", groups = {DefaultValuesProcessor.class}) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/objects/VulnerabilitySdo.java b/src/main/java/io/digitalstate/stix/sdo/objects/VulnerabilitySdo.java index 526ab14..ac79274 100644 --- a/src/main/java/io/digitalstate/stix/sdo/objects/VulnerabilitySdo.java +++ b/src/main/java/io/digitalstate/stix/sdo/objects/VulnerabilitySdo.java @@ -10,6 +10,7 @@ import io.digitalstate.stix.sdo.DomainObject; import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -17,7 +18,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Sdo", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) @JsonTypeName("vulnerability") @DefaultTypeValue(value = "vulnerability", groups = {DefaultValuesProcessor.class}) diff --git a/src/main/java/io/digitalstate/stix/sdo/types/ExternalReferenceType.java b/src/main/java/io/digitalstate/stix/sdo/types/ExternalReferenceType.java index 5e4c0e7..3f3b759 100644 --- a/src/main/java/io/digitalstate/stix/sdo/types/ExternalReferenceType.java +++ b/src/main/java/io/digitalstate/stix/sdo/types/ExternalReferenceType.java @@ -8,19 +8,21 @@ import io.digitalstate.stix.validation.contraints.hashingvocab.HashingVocab; import io.digitalstate.stix.vocabularies.HashingAlgorithms; import org.hibernate.validator.constraints.Length; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; +import java.io.Serializable; import java.util.Map; import java.util.Optional; import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Type", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE) @JsonSerialize(as = ExternalReference.class) @JsonDeserialize(builder = ExternalReference.Builder.class) -public interface ExternalReferenceType extends GenericValidation { +public interface ExternalReferenceType extends GenericValidation, Serializable { @NotBlank @JsonProperty("source_name") diff --git a/src/main/java/io/digitalstate/stix/sdo/types/KillChainPhaseType.java b/src/main/java/io/digitalstate/stix/sdo/types/KillChainPhaseType.java index fb535ed..d924fc1 100644 --- a/src/main/java/io/digitalstate/stix/sdo/types/KillChainPhaseType.java +++ b/src/main/java/io/digitalstate/stix/sdo/types/KillChainPhaseType.java @@ -4,14 +4,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import io.digitalstate.stix.validation.GenericValidation; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; +import java.io.Serializable; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Type", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE) @JsonSerialize(as = KillChainPhase.class) @JsonDeserialize(builder = KillChainPhase.Builder.class) -public interface KillChainPhaseType extends GenericValidation { +public interface KillChainPhaseType extends GenericValidation, Serializable { @NotBlank @JsonProperty("kill_chain_name") diff --git a/src/main/java/io/digitalstate/stix/sro/RelationshipObject.java b/src/main/java/io/digitalstate/stix/sro/RelationshipObject.java index 4646167..aad7aa4 100644 --- a/src/main/java/io/digitalstate/stix/sro/RelationshipObject.java +++ b/src/main/java/io/digitalstate/stix/sro/RelationshipObject.java @@ -2,7 +2,9 @@ import io.digitalstate.stix.common.*; -public interface RelationshipObject extends +import java.io.Serializable; + +public interface RelationshipObject extends Serializable, StixCommonProperties, StixCustomProperties, StixLabels, diff --git a/src/main/java/io/digitalstate/stix/sro/objects/RelationshipSro.java b/src/main/java/io/digitalstate/stix/sro/objects/RelationshipSro.java index 58af0ff..fed556a 100644 --- a/src/main/java/io/digitalstate/stix/sro/objects/RelationshipSro.java +++ b/src/main/java/io/digitalstate/stix/sro/objects/RelationshipSro.java @@ -14,6 +14,7 @@ import io.digitalstate.stix.validation.contraints.vocab.Vocab; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; import io.digitalstate.stix.vocabularies.RelationshipTypes; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotBlank; @@ -22,7 +23,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Sro", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) @DefaultTypeValue(value = "relationship", groups = {DefaultValuesProcessor.class}) @JsonTypeName("relationship") diff --git a/src/main/java/io/digitalstate/stix/sro/objects/SightingSro.java b/src/main/java/io/digitalstate/stix/sro/objects/SightingSro.java index e4b5d52..9a5d9ba 100644 --- a/src/main/java/io/digitalstate/stix/sro/objects/SightingSro.java +++ b/src/main/java/io/digitalstate/stix/sro/objects/SightingSro.java @@ -13,6 +13,7 @@ import io.digitalstate.stix.sro.RelationshipObject; import io.digitalstate.stix.validation.contraints.defaulttypevalue.DefaultTypeValue; import io.digitalstate.stix.validation.groups.DefaultValuesProcessor; +import org.immutables.serial.Serial; import org.immutables.value.Value; import javax.validation.constraints.NotNull; @@ -22,7 +23,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY; -@Value.Immutable +@Value.Immutable @Serial.Version(1L) @Value.Style(typeAbstract="*Sro", typeImmutable="*", validationMethod = Value.Style.ValidationMethod.NONE, additionalJsonAnnotations = {JsonTypeName.class}) @DefaultTypeValue(value = "sighting", groups = {DefaultValuesProcessor.class}) @JsonSerialize(as = Sighting.class) @JsonDeserialize(builder = Sighting.Builder.class)