Class ThreatActor.Builder

java.lang.Object
security.whisper.javastix.sdo.objects.ThreatActor.Builder
Enclosing class:
ThreatActor

@NotThreadSafe public static final class ThreatActor.Builder extends Object
Builds instances of type ThreatActor. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(BundleableObject instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.bundle.BundleableObject instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(StixCommonProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixCommonProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(StixRevoked instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixRevoked instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(ThreatActorSdo instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.sdo.objects.ThreatActorSdo instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(StixCustomProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixCustomProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(StixLabels instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixLabels instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(StixModified instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixModified instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ThreatActor.Builder from(DomainObject instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.sdo.DomainObject instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addLabel

      @CanIgnoreReturnValue public final ThreatActor.Builder addLabel(@Nullable String element)
      Adds one element to labels set.
      Parameters:
      element - A labels element
      Returns:
      this builder for use in a chained invocation
    • addLabels

      @CanIgnoreReturnValue public final ThreatActor.Builder addLabels(String... elements)
      Adds elements to labels set.
      Parameters:
      elements - An array of labels elements
      Returns:
      this builder for use in a chained invocation
    • labels

      @CanIgnoreReturnValue @JsonPropertyDescription("This field specifies the type of threat actor. Open Vocab - threat-actor-label-ov") public final ThreatActor.Builder labels(Iterable<String> elements)
      Sets or replaces all elements for labels set.
      Parameters:
      elements - An iterable of labels elements
      Returns:
      this builder for use in a chained invocation
    • addAllLabels

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllLabels(Iterable<String> elements)
      Adds elements to labels set.
      Parameters:
      elements - An iterable of labels elements
      Returns:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue @JsonPropertyDescription("A name used to identify this Threat Actor or Threat Actor group.") public final ThreatActor.Builder name(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name (can be null)
      Returns:
      this builder for use in a chained invocation
    • description

      @CanIgnoreReturnValue public final ThreatActor.Builder description(String description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for chained invocation
    • description

      @CanIgnoreReturnValue @JsonPropertyDescription("A description that provides more details and context about the Threat Actor.") public final ThreatActor.Builder description(Optional<String> description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • addAlias

      @CanIgnoreReturnValue public final ThreatActor.Builder addAlias(@Nullable String element)
      Adds one element to aliases set.
      Parameters:
      element - A aliases element
      Returns:
      this builder for use in a chained invocation
    • addAliases

      @CanIgnoreReturnValue public final ThreatActor.Builder addAliases(String... elements)
      Adds elements to aliases set.
      Parameters:
      elements - An array of aliases elements
      Returns:
      this builder for use in a chained invocation
    • aliases

      @CanIgnoreReturnValue @JsonPropertyDescription("A list of other names that this Threat Actor is believed to use.") public final ThreatActor.Builder aliases(Iterable<String> elements)
      Sets or replaces all elements for aliases set.
      Parameters:
      elements - An iterable of aliases elements
      Returns:
      this builder for use in a chained invocation
    • addAllAliases

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllAliases(Iterable<String> elements)
      Adds elements to aliases set.
      Parameters:
      elements - An iterable of aliases elements
      Returns:
      this builder for use in a chained invocation
    • addRole

      @CanIgnoreReturnValue public final ThreatActor.Builder addRole(@Nullable String element)
      Adds one element to roles set.
      Parameters:
      element - A roles element
      Returns:
      this builder for use in a chained invocation
    • addRoles

      @CanIgnoreReturnValue public final ThreatActor.Builder addRoles(String... elements)
      Adds elements to roles set.
      Parameters:
      elements - An array of roles elements
      Returns:
      this builder for use in a chained invocation
    • roles

      @CanIgnoreReturnValue @JsonPropertyDescription("This is a list of roles the Threat Actor plays. Open Vocab - threat-actor-role-ov") public final ThreatActor.Builder roles(Iterable<String> elements)
      Sets or replaces all elements for roles set.
      Parameters:
      elements - An iterable of roles elements
      Returns:
      this builder for use in a chained invocation
    • addAllRoles

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllRoles(Iterable<String> elements)
      Adds elements to roles set.
      Parameters:
      elements - An iterable of roles elements
      Returns:
      this builder for use in a chained invocation
    • addGoal

      @CanIgnoreReturnValue public final ThreatActor.Builder addGoal(@Nullable String element)
      Adds one element to goals set.
      Parameters:
      element - A goals element
      Returns:
      this builder for use in a chained invocation
    • addGoals

      @CanIgnoreReturnValue public final ThreatActor.Builder addGoals(String... elements)
      Adds elements to goals set.
      Parameters:
      elements - An array of goals elements
      Returns:
      this builder for use in a chained invocation
    • goals

      @CanIgnoreReturnValue @JsonPropertyDescription("The high level goals of this Threat Actor, namely, what are they trying to do.") public final ThreatActor.Builder goals(Iterable<String> elements)
      Sets or replaces all elements for goals set.
      Parameters:
      elements - An iterable of goals elements
      Returns:
      this builder for use in a chained invocation
    • addAllGoals

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllGoals(Iterable<String> elements)
      Adds elements to goals set.
      Parameters:
      elements - An iterable of goals elements
      Returns:
      this builder for use in a chained invocation
    • sophistication

      @CanIgnoreReturnValue public final ThreatActor.Builder sophistication(String sophistication)
      Initializes the optional value sophistication to sophistication.
      Parameters:
      sophistication - The value for sophistication
      Returns:
      this builder for chained invocation
    • sophistication

      @CanIgnoreReturnValue @JsonPropertyDescription("The skill, specific knowledge, special training, or expertise a Threat Actor must have to perform the attack. Open Vocab - threat-actor-sophistication-ov") public final ThreatActor.Builder sophistication(Optional<String> sophistication)
      Initializes the optional value sophistication to sophistication.
      Parameters:
      sophistication - The value for sophistication
      Returns:
      this builder for use in a chained invocation
    • resourceLevel

      @CanIgnoreReturnValue public final ThreatActor.Builder resourceLevel(String resourceLevel)
      Initializes the optional value resourceLevel to resourceLevel.
      Parameters:
      resourceLevel - The value for resourceLevel
      Returns:
      this builder for chained invocation
    • resourceLevel

      @CanIgnoreReturnValue @JsonPropertyDescription("This defines the organizational level at which this Threat Actor typically works. Open Vocab - attack-resource-level-ov") public final ThreatActor.Builder resourceLevel(Optional<String> resourceLevel)
      Initializes the optional value resourceLevel to resourceLevel.
      Parameters:
      resourceLevel - The value for resourceLevel
      Returns:
      this builder for use in a chained invocation
    • primaryMotivation

      @CanIgnoreReturnValue public final ThreatActor.Builder primaryMotivation(String primaryMotivation)
      Initializes the optional value primaryMotivation to primaryMotivation.
      Parameters:
      primaryMotivation - The value for primaryMotivation
      Returns:
      this builder for chained invocation
    • primaryMotivation

      @CanIgnoreReturnValue @JsonPropertyDescription("The primary reason, motivation, or purpose behind this Threat Actor. Open Vocab - attack-motivation-ov") public final ThreatActor.Builder primaryMotivation(Optional<String> primaryMotivation)
      Initializes the optional value primaryMotivation to primaryMotivation.
      Parameters:
      primaryMotivation - The value for primaryMotivation
      Returns:
      this builder for use in a chained invocation
    • addSecondaryMotivation

      @CanIgnoreReturnValue public final ThreatActor.Builder addSecondaryMotivation(@Nullable String element)
      Adds one element to secondaryMotivations set.
      Parameters:
      element - A secondaryMotivations element
      Returns:
      this builder for use in a chained invocation
    • addSecondaryMotivations

      @CanIgnoreReturnValue public final ThreatActor.Builder addSecondaryMotivations(String... elements)
      Adds elements to secondaryMotivations set.
      Parameters:
      elements - An array of secondaryMotivations elements
      Returns:
      this builder for use in a chained invocation
    • secondaryMotivations

      @CanIgnoreReturnValue @JsonPropertyDescription("The secondary reasons, motivations, or purposes behind this Threat Actor. Open Vocab - attack-motivation-ov") public final ThreatActor.Builder secondaryMotivations(Iterable<String> elements)
      Sets or replaces all elements for secondaryMotivations set.
      Parameters:
      elements - An iterable of secondaryMotivations elements
      Returns:
      this builder for use in a chained invocation
    • addAllSecondaryMotivations

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllSecondaryMotivations(Iterable<String> elements)
      Adds elements to secondaryMotivations set.
      Parameters:
      elements - An iterable of secondaryMotivations elements
      Returns:
      this builder for use in a chained invocation
    • addPersonalMotivation

      @CanIgnoreReturnValue public final ThreatActor.Builder addPersonalMotivation(@Nullable String element)
      Adds one element to personalMotivations set.
      Parameters:
      element - A personalMotivations element
      Returns:
      this builder for use in a chained invocation
    • addPersonalMotivations

      @CanIgnoreReturnValue public final ThreatActor.Builder addPersonalMotivations(String... elements)
      Adds elements to personalMotivations set.
      Parameters:
      elements - An array of personalMotivations elements
      Returns:
      this builder for use in a chained invocation
    • personalMotivations

      @CanIgnoreReturnValue @JsonPropertyDescription("The personal reasons, motivations, or purposes of the Threat Actor regardless of organizational goals. Open Vocab - attack-motivation-ov") public final ThreatActor.Builder personalMotivations(Iterable<String> elements)
      Sets or replaces all elements for personalMotivations set.
      Parameters:
      elements - An iterable of personalMotivations elements
      Returns:
      this builder for use in a chained invocation
    • addAllPersonalMotivations

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllPersonalMotivations(Iterable<String> elements)
      Adds elements to personalMotivations set.
      Parameters:
      elements - An iterable of personalMotivations elements
      Returns:
      this builder for use in a chained invocation
    • addRelationship

      @CanIgnoreReturnValue public final ThreatActor.Builder addRelationship(@Nullable RelationshipSro element)
      Adds one element to relationships set.
      Parameters:
      element - A relationships element
      Returns:
      this builder for use in a chained invocation
    • addRelationships

      @CanIgnoreReturnValue public final ThreatActor.Builder addRelationships(RelationshipSro... elements)
      Adds elements to relationships set.
      Parameters:
      elements - An array of relationships elements
      Returns:
      this builder for use in a chained invocation
    • relationships

      @CanIgnoreReturnValue public final ThreatActor.Builder relationships(Iterable<? extends RelationshipSro> elements)
      Sets or replaces all elements for relationships set.
      Parameters:
      elements - An iterable of relationships elements
      Returns:
      this builder for use in a chained invocation
    • addAllRelationships

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllRelationships(Iterable<? extends RelationshipSro> elements)
      Adds elements to relationships set.
      Parameters:
      elements - An iterable of relationships elements
      Returns:
      this builder for use in a chained invocation
    • hydrated

      @CanIgnoreReturnValue public final ThreatActor.Builder hydrated(boolean hydrated)
      Initializes the value for the hydrated attribute.

      If not set, this attribute will have a default value as returned by the initializer of hydrated.

      Parameters:
      hydrated - The value for hydrated
      Returns:
      this builder for use in a chained invocation
    • type

      @CanIgnoreReturnValue @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).") public final ThreatActor.Builder type(String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type (can be null)
      Returns:
      this builder for use in a chained invocation
    • id

      @CanIgnoreReturnValue @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.") public final ThreatActor.Builder id(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id (can be null)
      Returns:
      this builder for use in a chained invocation
    • createdByRef

      @CanIgnoreReturnValue public final ThreatActor.Builder createdByRef(IdentitySdo createdByRef)
      Initializes the optional value createdByRef to createdByRef.
      Parameters:
      createdByRef - The value for createdByRef
      Returns:
      this builder for chained invocation
    • createdByRef

      @CanIgnoreReturnValue @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.") public final ThreatActor.Builder createdByRef(Optional<? extends IdentitySdo> createdByRef)
      Initializes the optional value createdByRef to createdByRef.
      Parameters:
      createdByRef - The value for createdByRef
      Returns:
      this builder for use in a chained invocation
    • created

      @CanIgnoreReturnValue @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.") public final ThreatActor.Builder created(StixInstant created)
      Initializes the value for the created attribute.

      If not set, this attribute will have a default value as returned by the initializer of created.

      Parameters:
      created - The value for created
      Returns:
      this builder for use in a chained invocation
    • lang

      @CanIgnoreReturnValue public final ThreatActor.Builder lang(String lang)
      Initializes the optional value lang to lang.
      Parameters:
      lang - The value for lang
      Returns:
      this builder for chained invocation
    • lang

      @CanIgnoreReturnValue @JsonPropertyDescription("Identifies the language of the text content in this object using ISO 639-2 language codes.") public final ThreatActor.Builder lang(Optional<String> lang)
      Initializes the optional value lang to lang.
      Parameters:
      lang - The value for lang
      Returns:
      this builder for use in a chained invocation
    • addExternalReference

      @CanIgnoreReturnValue public final ThreatActor.Builder addExternalReference(@Nullable ExternalReferenceType element)
      Adds one element to externalReferences set.
      Parameters:
      element - A externalReferences element
      Returns:
      this builder for use in a chained invocation
    • addExternalReferences

      @CanIgnoreReturnValue public final ThreatActor.Builder addExternalReferences(ExternalReferenceType... elements)
      Adds elements to externalReferences set.
      Parameters:
      elements - An array of externalReferences elements
      Returns:
      this builder for use in a chained invocation
    • externalReferences

      @CanIgnoreReturnValue @JsonPropertyDescription("A list of external references which refers to non-STIX information.") public final ThreatActor.Builder externalReferences(Iterable<? extends ExternalReferenceType> elements)
      Sets or replaces all elements for externalReferences set.
      Parameters:
      elements - An iterable of externalReferences elements
      Returns:
      this builder for use in a chained invocation
    • addAllExternalReferences

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllExternalReferences(Iterable<? extends ExternalReferenceType> elements)
      Adds elements to externalReferences set.
      Parameters:
      elements - An iterable of externalReferences elements
      Returns:
      this builder for use in a chained invocation
    • addObjectMarkingRef

      @CanIgnoreReturnValue public final ThreatActor.Builder addObjectMarkingRef(@Nullable MarkingDefinitionDm element)
      Adds one element to objectMarkingRefs set.
      Parameters:
      element - A objectMarkingRefs element
      Returns:
      this builder for use in a chained invocation
    • addObjectMarkingRefs

      @CanIgnoreReturnValue public final ThreatActor.Builder addObjectMarkingRefs(MarkingDefinitionDm... elements)
      Adds elements to objectMarkingRefs set.
      Parameters:
      elements - An array of objectMarkingRefs elements
      Returns:
      this builder for use in a chained invocation
    • objectMarkingRefs

      @CanIgnoreReturnValue @JsonPropertyDescription("The list of marking-definition objects to be applied to this object.") public final ThreatActor.Builder objectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements)
      Sets or replaces all elements for objectMarkingRefs set.
      Parameters:
      elements - An iterable of objectMarkingRefs elements
      Returns:
      this builder for use in a chained invocation
    • addAllObjectMarkingRefs

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements)
      Adds elements to objectMarkingRefs set.
      Parameters:
      elements - An iterable of objectMarkingRefs elements
      Returns:
      this builder for use in a chained invocation
    • addGranularMarking

      @CanIgnoreReturnValue public final ThreatActor.Builder addGranularMarking(@Nullable GranularMarkingDm element)
      Adds one element to granularMarkings set.
      Parameters:
      element - A granularMarkings element
      Returns:
      this builder for use in a chained invocation
    • addGranularMarkings

      @CanIgnoreReturnValue public final ThreatActor.Builder addGranularMarkings(GranularMarkingDm... elements)
      Adds elements to granularMarkings set.
      Parameters:
      elements - An array of granularMarkings elements
      Returns:
      this builder for use in a chained invocation
    • granularMarkings

      @CanIgnoreReturnValue @JsonPropertyDescription("The set of granular markings that apply to this object.") public final ThreatActor.Builder granularMarkings(Iterable<? extends GranularMarkingDm> elements)
      Sets or replaces all elements for granularMarkings set.
      Parameters:
      elements - An iterable of granularMarkings elements
      Returns:
      this builder for use in a chained invocation
    • addAllGranularMarkings

      @CanIgnoreReturnValue public final ThreatActor.Builder addAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements)
      Adds elements to granularMarkings set.
      Parameters:
      elements - An iterable of granularMarkings elements
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final ThreatActor.Builder putCustomProperty(String key, Object value)
      Put one entry to the customProperties map.
      Parameters:
      key - The key in the customProperties map
      value - The associated value in the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final ThreatActor.Builder putCustomProperty(Map.Entry<String,? extends Object> entry)
      Put one entry to the customProperties map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • customProperties

      @CanIgnoreReturnValue public final ThreatActor.Builder customProperties(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putAllCustomProperties

      @CanIgnoreReturnValue public final ThreatActor.Builder putAllCustomProperties(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • modified

      @CanIgnoreReturnValue @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.") public final ThreatActor.Builder modified(StixInstant modified)
      Initializes the value for the modified attribute.

      If not set, this attribute will have a default value as returned by the initializer of modified.

      Parameters:
      modified - The value for modified
      Returns:
      this builder for use in a chained invocation
    • revoked

      @CanIgnoreReturnValue @JsonPropertyDescription("The revoked property indicates whether the object has been revoked.") public final ThreatActor.Builder revoked(StixBoolean revoked)
      Initializes the value for the revoked attribute.

      If not set, this attribute will have a default value as returned by the initializer of revoked.

      Parameters:
      revoked - The value for revoked
      Returns:
      this builder for use in a chained invocation
    • build

      public ThreatActor build()
      Builds a new ThreatActor.
      Returns:
      An immutable instance of ThreatActor
      Throws:
      IllegalStateException - if any required attributes are missing