Class IntrusionSet

java.lang.Object
security.whisper.javastix.sdo.objects.IntrusionSet
All Implemented Interfaces:
Serializable, BundleableObject, Stix, StixCommonProperties, StixCustomProperties, StixLabels, StixModified, StixRevoked, StixSpecVersion, DomainObject, IntrusionSetSdo, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public final class IntrusionSet extends Object implements IntrusionSetSdo
intrusion-set

An Intrusion Set is a grouped set of adversary behavior and resources with common properties that is believed to be orchestrated by a single organization.

See Also:
  • Method Details

    • getName

      @JsonPropertyDescription("The name used to identify the Intrusion Set.") @Redactable(useMask=true, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getName()
      Specified by:
      getName in interface IntrusionSetSdo
      Returns:
      The value of the name attribute
    • getDescription

      @JsonPropertyDescription("Provides more context and details about the Intrusion Set object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getDescription()
      Specified by:
      getDescription in interface IntrusionSetSdo
      Returns:
      The value of the description attribute
    • getAliases

      @JsonPropertyDescription("Alternative names used to identify this Intrusion Set.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getAliases()
      Specified by:
      getAliases in interface IntrusionSetSdo
      Returns:
      The value of the aliases attribute
    • getFirstSeen

      @JsonPropertyDescription("The time that this Intrusion Set was first seen.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<StixInstant> getFirstSeen()
      Specified by:
      getFirstSeen in interface IntrusionSetSdo
      Returns:
      The value of the firstSeen attribute
    • getLastSeen

      @JsonPropertyDescription("The time that this Intrusion Set was last seen.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<StixInstant> getLastSeen()
      Specified by:
      getLastSeen in interface IntrusionSetSdo
      Returns:
      The value of the lastSeen attribute
    • getGoals

      @JsonPropertyDescription("The high level goals of this Intrusion Set, namely, what are they trying to do.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getGoals()
      Specified by:
      getGoals in interface IntrusionSetSdo
      Returns:
      The value of the goals attribute
    • getResourceLevel

      @JsonPropertyDescription("This defines the organizational level at which this Intrusion Set typically works. Open Vocab - attack-resource-level-ov") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getResourceLevel()
      Specified by:
      getResourceLevel in interface IntrusionSetSdo
      Returns:
      The value of the resourceLevel attribute
    • getPrimaryMotivation

      @JsonPropertyDescription("The primary reason, motivation, or purpose behind this Intrusion Set. Open Vocab - attack-motivation-ov") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getPrimaryMotivation()
      Specified by:
      getPrimaryMotivation in interface IntrusionSetSdo
      Returns:
      The value of the primaryMotivation attribute
    • getSecondaryMotivations

      @JsonPropertyDescription("The secondary reasons, motivations, or purposes behind this Intrusion Set. Open Vocab - attack-motivation-ov") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getSecondaryMotivations()
      Specified by:
      getSecondaryMotivations in interface IntrusionSetSdo
      Returns:
      The value of the secondaryMotivations attribute
    • getRelationships

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<RelationshipSro> getRelationships()
      This is used with the SROs. The SRO interface enforces what relationships can be created. The Relationships can then be stored in the Domain object if they choose. Otherwise you would typically add these Relationship SROs that are specific to SDOs, can be grabbed during bundle creation.
      Specified by:
      getRelationships in interface DomainObject
      Returns:
      Set of Relationship SROs
    • 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:
      getHydrated in interface BundleableObject
      Specified by:
      getHydrated in interface StixCommonProperties
      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:
      getType in interface BundleableObject
      Specified by:
      getType in interface StixCommonProperties
      Returns:
      The value of the type attribute
    • 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:
      getId in interface BundleableObject
      Specified by:
      getId in interface StixCommonProperties
      Returns:
      The value of the id attribute
    • 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:
      getCreatedByRef in interface StixCommonProperties
      Returns:
      The value of the createdByRef attribute
    • 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:
      getCreated in interface StixCommonProperties
      Returns:
      The value of the created attribute
    • 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:
      getLang in interface StixCommonProperties
      Returns:
      The value of the lang attribute
    • 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:
      getExternalReferences in interface StixCommonProperties
      Returns:
      The value of the externalReferences attribute
    • 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:
      getObjectMarkingRefs in interface BundleableObject
      Specified by:
      getObjectMarkingRefs in interface StixCommonProperties
      Returns:
      The value of the objectMarkingRefs attribute
    • 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:
      getGranularMarkings in interface BundleableObject
      Specified by:
      getGranularMarkings in interface StixCommonProperties
      Returns:
      The value of the granularMarkings attribute
    • 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:
      getCustomProperties in interface StixCustomProperties
      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:
      getLabels in interface StixLabels
      Returns:
      The value of the labels attribute
    • 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:
      getModified in interface StixModified
      Returns:
      The value of the modified attribute
    • 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:
      getRevoked in interface StixRevoked
      Returns:
      The value of the revoked attribute
    • withName

      public final IntrusionSet withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name (can be null)
      Returns:
      A modified copy of the this object
    • withDescription

      public final IntrusionSet withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final IntrusionSet withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • withAliases

      public final IntrusionSet withAliases(String... elements)
      Copy the current immutable object with elements that replace the content of aliases.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAliases

      public final IntrusionSet withAliases(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of aliases. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of aliases elements to set
      Returns:
      A modified copy of this object
    • withFirstSeen

      public final IntrusionSet withFirstSeen(StixInstant value)
      Copy the current immutable object by setting a present value for the optional firstSeen attribute.
      Parameters:
      value - The value for firstSeen
      Returns:
      A modified copy of this object
    • withFirstSeen

      public final IntrusionSet withFirstSeen(Optional<? extends StixInstant> optional)
      Copy the current immutable object by setting an optional value for the firstSeen attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for firstSeen
      Returns:
      A modified copy of this object
    • withLastSeen

      public final IntrusionSet withLastSeen(StixInstant value)
      Copy the current immutable object by setting a present value for the optional lastSeen attribute.
      Parameters:
      value - The value for lastSeen
      Returns:
      A modified copy of this object
    • withLastSeen

      public final IntrusionSet withLastSeen(Optional<? extends StixInstant> optional)
      Copy the current immutable object by setting an optional value for the lastSeen attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for lastSeen
      Returns:
      A modified copy of this object
    • withGoals

      public final IntrusionSet withGoals(String... elements)
      Copy the current immutable object with elements that replace the content of goals.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withGoals

      public final IntrusionSet withGoals(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of goals. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of goals elements to set
      Returns:
      A modified copy of this object
    • withResourceLevel

      public final IntrusionSet withResourceLevel(String value)
      Copy the current immutable object by setting a present value for the optional resourceLevel attribute.
      Parameters:
      value - The value for resourceLevel
      Returns:
      A modified copy of this object
    • withResourceLevel

      public final IntrusionSet withResourceLevel(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the resourceLevel attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for resourceLevel
      Returns:
      A modified copy of this object
    • withPrimaryMotivation

      public final IntrusionSet withPrimaryMotivation(String value)
      Copy the current immutable object by setting a present value for the optional primaryMotivation attribute.
      Parameters:
      value - The value for primaryMotivation
      Returns:
      A modified copy of this object
    • withPrimaryMotivation

      public final IntrusionSet withPrimaryMotivation(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the primaryMotivation attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for primaryMotivation
      Returns:
      A modified copy of this object
    • withSecondaryMotivations

      public final IntrusionSet withSecondaryMotivations(String... elements)
      Copy the current immutable object with elements that replace the content of secondaryMotivations.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSecondaryMotivations

      public final IntrusionSet withSecondaryMotivations(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of secondaryMotivations. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of secondaryMotivations elements to set
      Returns:
      A modified copy of this object
    • withRelationships

      public final IntrusionSet withRelationships(RelationshipSro... elements)
      Copy the current immutable object with elements that replace the content of relationships.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRelationships

      public final IntrusionSet withRelationships(Iterable<? extends RelationshipSro> elements)
      Copy the current immutable object with elements that replace the content of relationships. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of relationships elements to set
      Returns:
      A modified copy of this object
    • withHydrated

      public final IntrusionSet withHydrated(boolean value)
      Copy the current immutable object by setting a value for the hydrated attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for hydrated
      Returns:
      A modified copy of the this object
    • withType

      public final IntrusionSet withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy of the this object
    • withId

      public final IntrusionSet withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id (can be null)
      Returns:
      A modified copy of the this object
    • withCreatedByRef

      public final IntrusionSet withCreatedByRef(IdentitySdo value)
      Copy the current immutable object by setting a present value for the optional createdByRef attribute.
      Parameters:
      value - The value for createdByRef
      Returns:
      A modified copy of this object
    • withCreatedByRef

      public final IntrusionSet withCreatedByRef(Optional<? extends IdentitySdo> optional)
      Copy the current immutable object by setting an optional value for the createdByRef attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for createdByRef
      Returns:
      A modified copy of this object
    • withCreated

      public final IntrusionSet withCreated(StixInstant value)
      Copy the current immutable object by setting a value for the created attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for created
      Returns:
      A modified copy of the this object
    • withLang

      public final IntrusionSet withLang(String value)
      Copy the current immutable object by setting a present value for the optional lang attribute.
      Parameters:
      value - The value for lang
      Returns:
      A modified copy of this object
    • withLang

      public final IntrusionSet withLang(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the lang attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for lang
      Returns:
      A modified copy of this object
    • withExternalReferences

      public final IntrusionSet withExternalReferences(ExternalReferenceType... elements)
      Copy the current immutable object with elements that replace the content of externalReferences.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExternalReferences

      public final IntrusionSet withExternalReferences(Iterable<? extends ExternalReferenceType> elements)
      Copy the current immutable object with elements that replace the content of externalReferences. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of externalReferences elements to set
      Returns:
      A modified copy of this object
    • withObjectMarkingRefs

      public final IntrusionSet withObjectMarkingRefs(MarkingDefinitionDm... elements)
      Copy the current immutable object with elements that replace the content of objectMarkingRefs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withObjectMarkingRefs

      public final IntrusionSet withObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements)
      Copy the current immutable object with elements that replace the content of objectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of objectMarkingRefs elements to set
      Returns:
      A modified copy of this object
    • withGranularMarkings

      public final IntrusionSet withGranularMarkings(GranularMarkingDm... elements)
      Copy the current immutable object with elements that replace the content of granularMarkings.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withGranularMarkings

      public final IntrusionSet withGranularMarkings(Iterable<? extends GranularMarkingDm> elements)
      Copy the current immutable object with elements that replace the content of granularMarkings. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of granularMarkings elements to set
      Returns:
      A modified copy of this object
    • withCustomProperties

      public final IntrusionSet withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map 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 returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • withLabels

      public final IntrusionSet withLabels(String... elements)
      Copy the current immutable object with elements that replace the content of labels.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLabels

      public final IntrusionSet withLabels(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of labels. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of labels elements to set
      Returns:
      A modified copy of this object
    • withModified

      public final IntrusionSet withModified(StixInstant value)
      Copy the current immutable object by setting a value for the modified attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for modified
      Returns:
      A modified copy of the this object
    • withRevoked

      public final IntrusionSet withRevoked(StixBoolean value)
      Copy the current immutable object by setting a value for the revoked attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for revoked
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of IntrusionSet that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, description, aliases, firstSeen, lastSeen, goals, resourceLevel, primaryMotivation, secondaryMotivations, relationships, hydrated, type, id, createdByRef, created, lang, externalReferences, objectMarkingRefs, granularMarkings, customProperties, labels, modified, revoked.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value IntrusionSet with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • toJsonString

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String toJsonString()

      Returns a lazily initialized value of the toJsonString attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
      toJsonString in interface BundleableObject
      Specified by:
      toJsonString in interface StixCommonProperties
      Returns:
      A lazily initialized value of the toJsonString attribute
    • 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 specVersion attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
      getSpecVersion in interface StixSpecVersion
      Returns:
      A lazily initialized value of the specVersion attribute
    • copyOf

      public static IntrusionSet copyOf(IntrusionSetSdo instance)
      Creates an immutable copy of a IntrusionSetSdo value. 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 IntrusionSet instance
    • builder

      public static IntrusionSet.Builder builder()
      Creates a builder for IntrusionSet.
      Returns:
      A new IntrusionSet builder