Class WindowsPeBinaryFileExtension.Builder

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

@NotThreadSafe public static final class WindowsPeBinaryFileExtension.Builder extends Object
Builds instances of type WindowsPeBinaryFileExtension. 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 WindowsPeBinaryFileExtension.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 WindowsPeBinaryFileExtension.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
    • from

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of the PE binary. Open Vocabulary - windows-pebinary-type-ov") public final WindowsPeBinaryFileExtension.Builder peType(String peType)
      Initializes the value for the peType attribute.
      Parameters:
      peType - The value for peType (can be null)
      Returns:
      this builder for use in a chained invocation
    • imphash

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the special import hash, or \'imphash\', calculated for the PE Binary based on its imported libraries and functions.") public final WindowsPeBinaryFileExtension.Builder imphash(Optional<String> imphash)
      Initializes the optional value imphash to imphash.
      Parameters:
      imphash - The value for imphash
      Returns:
      this builder for use in a chained invocation
    • machineHex

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of target machine.") public final WindowsPeBinaryFileExtension.Builder machineHex(Optional<String> machineHex)
      Initializes the optional value machineHex to machineHex.
      Parameters:
      machineHex - The value for machineHex
      Returns:
      this builder for use in a chained invocation
    • numberOfSections

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the number of sections in the PE binary, as a non-negative integer.") public final WindowsPeBinaryFileExtension.Builder numberOfSections(Optional<Long> numberOfSections)
      Initializes the optional value numberOfSections to numberOfSections.
      Parameters:
      numberOfSections - The value for numberOfSections
      Returns:
      this builder for use in a chained invocation
    • timeDateStamp

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the time when the PE binary was created. The timestamp value MUST BE precise to the second.") public final WindowsPeBinaryFileExtension.Builder timeDateStamp(Optional<? extends StixInstant> timeDateStamp)
      Initializes the optional value timeDateStamp to timeDateStamp.
      Parameters:
      timeDateStamp - The value for timeDateStamp
      Returns:
      this builder for use in a chained invocation
    • pointerToSymbolTableHex

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the file offset of the COFF symbol table.") public final WindowsPeBinaryFileExtension.Builder pointerToSymbolTableHex(Optional<String> pointerToSymbolTableHex)
      Initializes the optional value pointerToSymbolTableHex to pointerToSymbolTableHex.
      Parameters:
      pointerToSymbolTableHex - The value for pointerToSymbolTableHex
      Returns:
      this builder for use in a chained invocation
    • numberOfSymbols

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the number of entries in the symbol table of the PE binary, as a non-negative integer.") public final WindowsPeBinaryFileExtension.Builder numberOfSymbols(Optional<Long> numberOfSymbols)
      Initializes the optional value numberOfSymbols to numberOfSymbols.
      Parameters:
      numberOfSymbols - The value for numberOfSymbols
      Returns:
      this builder for use in a chained invocation
    • sizeOfOptionalHeader

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the optional header of the PE binary.") public final WindowsPeBinaryFileExtension.Builder sizeOfOptionalHeader(Optional<Long> sizeOfOptionalHeader)
      Initializes the optional value sizeOfOptionalHeader to sizeOfOptionalHeader.
      Parameters:
      sizeOfOptionalHeader - The value for sizeOfOptionalHeader
      Returns:
      this builder for use in a chained invocation
    • characteristicsHex

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the flags that indicate the file\u2019s characteristics.") public final WindowsPeBinaryFileExtension.Builder characteristicsHex(Optional<String> characteristicsHex)
      Initializes the optional value characteristicsHex to characteristicsHex.
      Parameters:
      characteristicsHex - The value for characteristicsHex
      Returns:
      this builder for use in a chained invocation
    • putFileHeaderHash

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

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies any hashes that were computed for the file header.") public final WindowsPeBinaryFileExtension.Builder fileHeaderHashes(Map<String,? extends String> entries)
      Sets or replaces all mappings from the specified map as entries for the fileHeaderHashes map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the fileHeaderHashes map
      Returns:
      this builder for use in a chained invocation
    • putAllFileHeaderHashes

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

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

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the PE optional header of the PE binary.") public final WindowsPeBinaryFileExtension.Builder optionalHeader(Optional<? extends WindowsPeOptionalHeaderObj> optionalHeader)
      Initializes the optional value optionalHeader to optionalHeader.
      Parameters:
      optionalHeader - The value for optionalHeader
      Returns:
      this builder for use in a chained invocation
    • type

      @CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.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 WindowsPeBinaryFileExtension.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 WindowsPeBinaryFileExtension.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 WindowsPeBinaryFileExtension.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 WindowsPeBinaryFileExtension.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

      Returns:
      An immutable instance of WindowsPeBinaryFileExtension
      Throws:
      IllegalStateException - if any required attributes are missing