Class Sighting
java.lang.Object
security.whisper.javastix.sro.objects.Sighting
- All Implemented Interfaces:
Serializable,BundleableObject,Stix,StixCommonProperties,StixCustomProperties,StixLabels,StixModified,StixRevoked,StixSpecVersion,SightingSro,RelationshipObject,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@Redactable(useMask=false,
redactionMask="\u2588\u2588REDACTED\u2588\u2588")
public final class Sighting
extends Object
implements SightingSro
sighting
A Sighting denotes the belief that something in CTI (e.g., an indicator, malware, tool, threat actor, etc.) was seen.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic Sighting.Builderbuilder()Creates a builder forSighting.static SightingcopyOf(SightingSro instance) Creates an immutable copy of aSightingSrovalue.booleanThis instance is equal to all instances ofSightingthat have equal attribute values.getCount()Custom Properties for STIX Objects.com.google.common.collect.ImmutableSet<ExternalReferenceType> com.google.common.collect.ImmutableSet<GranularMarkingDm> booleanDictates if the object is hydrated.getId()com.google.common.collect.ImmutableSet<String> getLang()com.google.common.collect.ImmutableSet<MarkingDefinitionDm> com.google.common.collect.ImmutableSet<ObservedDataSdo> Helper attribute to track the STIX Spec Version that was used for this object.getType()com.google.common.collect.ImmutableSet<IdentitySdo> inthashCode()Computes a hash code from attributes:firstSeen,lastSeen,count,sightingOfRef,observedDataRefs,whereSightedRefs,isSummary,hydrated,type,id,createdByRef,created,lang,externalReferences,objectMarkingRefs,granularMarkings,customProperties,labels,modified,revoked.toString()Prints the immutable valueSightingwith attribute values.final SightingwithCount(int value) Copy the current immutable object by setting a present value for the optionalcountattribute.final SightingCopy the current immutable object by setting an optional value for thecountattribute.final SightingwithCreated(StixInstant value) Copy the current immutable object by setting a value for thecreatedattribute.final SightingwithCreatedByRef(Optional<? extends IdentitySdo> optional) Copy the current immutable object by setting an optional value for thecreatedByRefattribute.final SightingwithCreatedByRef(IdentitySdo value) Copy the current immutable object by setting a present value for the optionalcreatedByRefattribute.final SightingwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final SightingwithExternalReferences(Iterable<? extends ExternalReferenceType> elements) Copy the current immutable object with elements that replace the content ofexternalReferences.final SightingwithExternalReferences(ExternalReferenceType... elements) Copy the current immutable object with elements that replace the content ofexternalReferences.final SightingwithFirstSeen(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for thefirstSeenattribute.final SightingwithFirstSeen(StixInstant value) Copy the current immutable object by setting a present value for the optionalfirstSeenattribute.final SightingwithGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final SightingwithGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final SightingwithHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.final SightingCopy the current immutable object by setting a value for theidattribute.final SightingwithIsSummary(StixBoolean value) Copy the current immutable object by setting a value for theisSummaryattribute.final SightingwithLabels(Iterable<String> elements) Copy the current immutable object with elements that replace the content oflabels.final SightingwithLabels(String... elements) Copy the current immutable object with elements that replace the content oflabels.final SightingCopy the current immutable object by setting a present value for the optionallangattribute.final SightingCopy the current immutable object by setting an optional value for thelangattribute.final SightingwithLastSeen(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for thelastSeenattribute.final SightingwithLastSeen(StixInstant value) Copy the current immutable object by setting a present value for the optionallastSeenattribute.final SightingwithModified(StixInstant value) Copy the current immutable object by setting a value for themodifiedattribute.final SightingwithObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final SightingwithObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final SightingwithObservedDataRefs(Iterable<? extends ObservedDataSdo> elements) Copy the current immutable object with elements that replace the content ofobservedDataRefs.final SightingwithObservedDataRefs(ObservedDataSdo... elements) Copy the current immutable object with elements that replace the content ofobservedDataRefs.final SightingwithRevoked(StixBoolean value) Copy the current immutable object by setting a value for therevokedattribute.final SightingwithSightingOfRef(DomainObject value) Copy the current immutable object by setting a value for thesightingOfRefattribute.final SightingCopy the current immutable object by setting a value for thetypeattribute.final SightingwithWhereSightedRefs(Iterable<? extends IdentitySdo> elements) Copy the current immutable object with elements that replace the content ofwhereSightedRefs.final SightingwithWhereSightedRefs(IdentitySdo... elements) Copy the current immutable object with elements that replace the content ofwhereSightedRefs.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyIdMethods inherited from interface security.whisper.javastix.common.StixCommonProperties
checkHydrationValidation
-
Method Details
-
getFirstSeen
@JsonPropertyDescription("The beginning of the time window during which the SDO referenced by the sighting_of_ref property was sighted.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<StixInstant> getFirstSeen()- Specified by:
getFirstSeenin interfaceSightingSro- Returns:
- The value of the
firstSeenattribute
-
getLastSeen
@JsonPropertyDescription("The end of the time window during which the SDO referenced by the sighting_of_ref property was sighted.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<StixInstant> getLastSeen()- Specified by:
getLastSeenin interfaceSightingSro- Returns:
- The value of the
lastSeenattribute
-
getCount
@JsonPropertyDescription("This is an integer between 0 and 999,999,999 inclusive and represents the number of times the object was sighted.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<Integer> getCount()- Specified by:
getCountin interfaceSightingSro- Returns:
- The value of the
countattribute
-
getSightingOfRef
@JsonPropertyDescription("An ID reference to the object that has been sighted.") @Redactable(useMask=true, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public DomainObject getSightingOfRef()- Specified by:
getSightingOfRefin interfaceSightingSro- Returns:
- The value of the
sightingOfRefattribute
-
getObservedDataRefs
@JsonPropertyDescription("A list of ID references to the Observed Data objects that contain the raw cyber data for this Sighting.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<ObservedDataSdo> getObservedDataRefs()- Specified by:
getObservedDataRefsin interfaceSightingSro- Returns:
- The value of the
observedDataRefsattribute
-
getWhereSightedRefs
@JsonPropertyDescription("The ID of the Victim Target objects of the entities that saw the sighting.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<IdentitySdo> getWhereSightedRefs()- Specified by:
getWhereSightedRefsin interfaceSightingSro- Returns:
- The value of the
whereSightedRefsattribute
-
isSummary
@JsonPropertyDescription("The summary property indicates whether the Sighting should be considered summary data.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixBoolean isSummary()- Specified by:
isSummaryin interfaceSightingSro- Returns:
- The value of the
isSummaryattribute
-
getHydrated
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public boolean getHydrated()Dictates if the object is hydrated. Hydration is defined as if the Object has only a "ID" or has been properly hydrated with the expected required fields- Specified by:
getHydratedin interfaceBundleableObject- Specified by:
getHydratedin interfaceStixCommonProperties- Returns:
- boolean
-
getType
@JsonPropertyDescription("The type property identifies the type of STIX Object (SDO, Relationship Object, etc). The value of the type field MUST be one of the types defined by a STIX Object (e.g., indicator).") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getType()- Specified by:
getTypein interfaceBundleableObject- Specified by:
getTypein interfaceStixCommonProperties- Returns:
- The value of the
typeattribute
-
getId
@JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getId()- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceStixCommonProperties- Returns:
- The value of the
idattribute
-
getCreatedByRef
@JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") @Redactable(useMask=true, redactionMask="identity--__REDACTED__") public Optional<IdentitySdo> getCreatedByRef()- Specified by:
getCreatedByRefin interfaceStixCommonProperties- Returns:
- The value of the
createdByRefattribute
-
getCreated
@JsonPropertyDescription("The created property represents the time at which the first version of this object was created. The timstamp value MUST be precise to the nearest millisecond.") @Redactable(useMask=true, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixInstant getCreated()- Specified by:
getCreatedin interfaceStixCommonProperties- Returns:
- The value of the
createdattribute
-
getLang
@JsonPropertyDescription("Identifies the language of the text content in this object using ISO 639-2 language codes.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getLang()- Specified by:
getLangin interfaceStixCommonProperties- Returns:
- The value of the
langattribute
-
getExternalReferences
@JsonPropertyDescription("A list of external references which refers to non-STIX information.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<ExternalReferenceType> getExternalReferences()- Specified by:
getExternalReferencesin interfaceStixCommonProperties- Returns:
- The value of the
externalReferencesattribute
-
getObjectMarkingRefs
@JsonPropertyDescription("The list of marking-definition objects to be applied to this object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<MarkingDefinitionDm> getObjectMarkingRefs()- Specified by:
getObjectMarkingRefsin interfaceBundleableObject- Specified by:
getObjectMarkingRefsin interfaceStixCommonProperties- Returns:
- The value of the
objectMarkingRefsattribute
-
getGranularMarkings
@JsonPropertyDescription("The set of granular markings that apply to this object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<GranularMarkingDm> getGranularMarkings()- Specified by:
getGranularMarkingsin interfaceBundleableObject- Specified by:
getGranularMarkingsin interfaceStixCommonProperties- Returns:
- The value of the
granularMarkingsattribute
-
getCustomProperties
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
getLabels
@JsonPropertyDescription("The labels property specifies a set of classifications.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getLabels()- Specified by:
getLabelsin interfaceStixLabels- Returns:
- The value of the
labelsattribute
-
getModified
@JsonPropertyDescription("The modified property represents the time that this particular version of the object was created. The timstamp value MUST be precise to the nearest millisecond.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixInstant getModified()- Specified by:
getModifiedin interfaceStixModified- Returns:
- The value of the
modifiedattribute
-
getRevoked
@JsonPropertyDescription("The revoked property indicates whether the object has been revoked.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixBoolean getRevoked()- Specified by:
getRevokedin interfaceStixRevoked- Returns:
- The value of the
revokedattribute
-
withFirstSeen
Copy the current immutable object by setting a present value for the optionalfirstSeenattribute.- Parameters:
value- The value for firstSeen- Returns:
- A modified copy of
thisobject
-
withFirstSeen
Copy the current immutable object by setting an optional value for thefirstSeenattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for firstSeen- Returns:
- A modified copy of
thisobject
-
withLastSeen
Copy the current immutable object by setting a present value for the optionallastSeenattribute.- Parameters:
value- The value for lastSeen- Returns:
- A modified copy of
thisobject
-
withLastSeen
Copy the current immutable object by setting an optional value for thelastSeenattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lastSeen- Returns:
- A modified copy of
thisobject
-
withCount
Copy the current immutable object by setting a present value for the optionalcountattribute.- Parameters:
value- The value for count- Returns:
- A modified copy of
thisobject
-
withCount
Copy the current immutable object by setting an optional value for thecountattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for count- Returns:
- A modified copy of
thisobject
-
withSightingOfRef
Copy the current immutable object by setting a value for thesightingOfRefattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sightingOfRef (can benull)- Returns:
- A modified copy of the
thisobject
-
withObservedDataRefs
Copy the current immutable object with elements that replace the content ofobservedDataRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withObservedDataRefs
Copy the current immutable object with elements that replace the content ofobservedDataRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of observedDataRefs elements to set- Returns:
- A modified copy of
thisobject
-
withWhereSightedRefs
Copy the current immutable object with elements that replace the content ofwhereSightedRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWhereSightedRefs
Copy the current immutable object with elements that replace the content ofwhereSightedRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of whereSightedRefs elements to set- Returns:
- A modified copy of
thisobject
-
withIsSummary
Copy the current immutable object by setting a value for theisSummaryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isSummary- Returns:
- A modified copy of the
thisobject
-
withHydrated
Copy the current immutable object by setting a value for thehydratedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hydrated- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withCreatedByRef
Copy the current immutable object by setting a present value for the optionalcreatedByRefattribute.- Parameters:
value- The value for createdByRef- Returns:
- A modified copy of
thisobject
-
withCreatedByRef
Copy the current immutable object by setting an optional value for thecreatedByRefattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for createdByRef- Returns:
- A modified copy of
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withLang
Copy the current immutable object by setting a present value for the optionallangattribute.- Parameters:
value- The value for lang- Returns:
- A modified copy of
thisobject
-
withLang
Copy the current immutable object by setting an optional value for thelangattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lang- Returns:
- A modified copy of
thisobject
-
withExternalReferences
Copy the current immutable object with elements that replace the content ofexternalReferences.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExternalReferences
Copy the current immutable object with elements that replace the content ofexternalReferences. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of externalReferences elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of objectMarkingRefs elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of granularMarkings elements to set- Returns:
- A modified copy of
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
withLabels
Copy the current immutable object with elements that replace the content oflabels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLabels
Copy the current immutable object with elements that replace the content oflabels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of labels elements to set- Returns:
- A modified copy of
thisobject
-
withModified
Copy the current immutable object by setting a value for themodifiedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modified- Returns:
- A modified copy of the
thisobject
-
withRevoked
Copy the current immutable object by setting a value for therevokedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for revoked- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofSightingthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:firstSeen,lastSeen,count,sightingOfRef,observedDataRefs,whereSightedRefs,isSummary,hydrated,type,id,createdByRef,created,lang,externalReferences,objectMarkingRefs,granularMarkings,customProperties,labels,modified,revoked. -
toString
Prints the immutable valueSightingwith attribute values. -
toJsonString
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String toJsonString()Returns a lazily initialized value of the
toJsonStringattribute. Initialized once and only once and stored for subsequent access with proper synchronization.- Specified by:
toJsonStringin interfaceBundleableObject- Specified by:
toJsonStringin interfaceStixCommonProperties- Returns:
- A lazily initialized value of the
toJsonStringattribute
-
getSpecVersion
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getSpecVersion()Helper attribute to track the STIX Spec Version that was used for this object.Returns a lazily initialized value of the
specVersionattribute. Initialized once and only once and stored for subsequent access with proper synchronization.- Specified by:
getSpecVersionin interfaceStixSpecVersion- Returns:
- A lazily initialized value of the
specVersionattribute
-
copyOf
Creates an immutable copy of aSightingSrovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Sighting instance
-
builder
Creates a builder forSighting.- Returns:
- A new Sighting builder
-