Class KillChainPhase.Builder

java.lang.Object
security.whisper.javastix.sdo.types.KillChainPhase.Builder
Enclosing class:
KillChainPhase

@NotThreadSafe public static final class KillChainPhase.Builder extends Object
Builds instances of type KillChainPhase. 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 KillChainPhase.Builder from(KillChainPhaseType instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.sdo.types.KillChainPhaseType instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final KillChainPhase.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
    • killChainName

      @CanIgnoreReturnValue @JsonPropertyDescription("The name of the kill chain.") public final KillChainPhase.Builder killChainName(String killChainName)
      Initializes the value for the killChainName attribute.
      Parameters:
      killChainName - The value for killChainName (can be null)
      Returns:
      this builder for use in a chained invocation
    • phaseName

      @CanIgnoreReturnValue @JsonPropertyDescription("The name of the phase in the kill chain.") public final KillChainPhase.Builder phaseName(String phaseName)
      Initializes the value for the phaseName attribute.
      Parameters:
      phaseName - The value for phaseName (can be null)
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final KillChainPhase.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 KillChainPhase.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 KillChainPhase.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 KillChainPhase.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
    • build

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