Class TcpExtension.Builder

java.lang.Object
security.whisper.javastix.coo.extension.types.TcpExtension.Builder
Enclosing class:
TcpExtension

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

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

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the source TCP flags, as the union of all TCP flags observed between the start of the traffic (as defined by the start property) and the end of the traffic (as defined by the end property). ") public final TcpExtension.Builder srcFlagsHex(Optional<String> srcFlagsHex)
      Initializes the optional value srcFlagsHex to srcFlagsHex.
      Parameters:
      srcFlagsHex - The value for srcFlagsHex
      Returns:
      this builder for use in a chained invocation
    • dstFlagsHex

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the destination TCP flags, as the union of all TCP flags observed between the start of the traffic (as defined by the start property) and the end of the traffic (as defined by the end property).") public final TcpExtension.Builder dstFlagsHex(Optional<String> dstFlagsHex)
      Initializes the optional value dstFlagsHex to dstFlagsHex.
      Parameters:
      dstFlagsHex - The value for dstFlagsHex
      Returns:
      this builder for use in a chained invocation
    • type

      @CanIgnoreReturnValue public final TcpExtension.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
    • putCustomProperty

      @CanIgnoreReturnValue public final TcpExtension.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 TcpExtension.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 TcpExtension.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 TcpExtension.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 TcpExtension build()
      Builds a new TcpExtension.
      Returns:
      An immutable instance of TcpExtension
      Throws:
      IllegalStateException - if any required attributes are missing