Class WindowsPeBinaryFileExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.WindowsPeBinaryFileExtension.Builder
- Enclosing class:
WindowsPeBinaryFileExtension
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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newWindowsPeBinaryFileExtension.characteristicsHex(String characteristicsHex) Initializes the optional valuecharacteristicsHexto characteristicsHex.characteristicsHex(Optional<String> characteristicsHex) Initializes the optional valuecharacteristicsHexto characteristicsHex.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.fileHeaderHashes(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thefileHeaderHashesmap.from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.from(WindowsPeBinaryFileExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.WindowsPeBinaryFileExtensionExtinstance.Initializes the optional valueimphashto imphash.Initializes the optional valueimphashto imphash.machineHex(String machineHex) Initializes the optional valuemachineHexto machineHex.machineHex(Optional<String> machineHex) Initializes the optional valuemachineHexto machineHex.numberOfSections(long numberOfSections) Initializes the optional valuenumberOfSectionsto numberOfSections.numberOfSections(Optional<Long> numberOfSections) Initializes the optional valuenumberOfSectionsto numberOfSections.numberOfSymbols(long numberOfSymbols) Initializes the optional valuenumberOfSymbolsto numberOfSymbols.numberOfSymbols(Optional<Long> numberOfSymbols) Initializes the optional valuenumberOfSymbolsto numberOfSymbols.optionalHeader(Optional<? extends WindowsPeOptionalHeaderObj> optionalHeader) Initializes the optional valueoptionalHeaderto optionalHeader.optionalHeader(WindowsPeOptionalHeaderObj optionalHeader) Initializes the optional valueoptionalHeaderto optionalHeader.Initializes the value for thepeTypeattribute.pointerToSymbolTableHex(String pointerToSymbolTableHex) Initializes the optional valuepointerToSymbolTableHexto pointerToSymbolTableHex.pointerToSymbolTableHex(Optional<String> pointerToSymbolTableHex) Initializes the optional valuepointerToSymbolTableHexto pointerToSymbolTableHex.putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.putAllFileHeaderHashes(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tofileHeaderHashesmap.putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.putFileHeaderHash(String key, String value) Put one entry to thefileHeaderHashesmap.putFileHeaderHash(Map.Entry<String, ? extends String> entry) Put one entry to thefileHeaderHashesmap.sizeOfOptionalHeader(long sizeOfOptionalHeader) Initializes the optional valuesizeOfOptionalHeaderto sizeOfOptionalHeader.sizeOfOptionalHeader(Optional<Long> sizeOfOptionalHeader) Initializes the optional valuesizeOfOptionalHeaderto sizeOfOptionalHeader.timeDateStamp(Optional<? extends StixInstant> timeDateStamp) Initializes the optional valuetimeDateStampto timeDateStamp.timeDateStamp(StixInstant timeDateStamp) Initializes the optional valuetimeDateStampto timeDateStamp.Initializes the value for thetypeattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder from(WindowsPeBinaryFileExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.WindowsPeBinaryFileExtensionExtinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder 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 thepeTypeattribute.- Parameters:
peType- The value for peType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
imphash
Initializes the optional valueimphashto imphash.- Parameters:
imphash- The value for imphash- Returns:
thisbuilder 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 valueimphashto imphash.- Parameters:
imphash- The value for imphash- Returns:
thisbuilder for use in a chained invocation
-
machineHex
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder machineHex(String machineHex) Initializes the optional valuemachineHexto machineHex.- Parameters:
machineHex- The value for machineHex- Returns:
thisbuilder for chained invocation
-
machineHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of target machine.") public final WindowsPeBinaryFileExtension.Builder machineHex(Optional<String> machineHex) Initializes the optional valuemachineHexto machineHex.- Parameters:
machineHex- The value for machineHex- Returns:
thisbuilder for use in a chained invocation
-
numberOfSections
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder numberOfSections(long numberOfSections) Initializes the optional valuenumberOfSectionsto numberOfSections.- Parameters:
numberOfSections- The value for numberOfSections- Returns:
thisbuilder 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 valuenumberOfSectionsto numberOfSections.- Parameters:
numberOfSections- The value for numberOfSections- Returns:
thisbuilder for use in a chained invocation
-
timeDateStamp
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder timeDateStamp(StixInstant timeDateStamp) Initializes the optional valuetimeDateStampto timeDateStamp.- Parameters:
timeDateStamp- The value for timeDateStamp- Returns:
thisbuilder 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 valuetimeDateStampto timeDateStamp.- Parameters:
timeDateStamp- The value for timeDateStamp- Returns:
thisbuilder for use in a chained invocation
-
pointerToSymbolTableHex
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder pointerToSymbolTableHex(String pointerToSymbolTableHex) Initializes the optional valuepointerToSymbolTableHexto pointerToSymbolTableHex.- Parameters:
pointerToSymbolTableHex- The value for pointerToSymbolTableHex- Returns:
thisbuilder 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 valuepointerToSymbolTableHexto pointerToSymbolTableHex.- Parameters:
pointerToSymbolTableHex- The value for pointerToSymbolTableHex- Returns:
thisbuilder for use in a chained invocation
-
numberOfSymbols
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder numberOfSymbols(long numberOfSymbols) Initializes the optional valuenumberOfSymbolsto numberOfSymbols.- Parameters:
numberOfSymbols- The value for numberOfSymbols- Returns:
thisbuilder 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 valuenumberOfSymbolsto numberOfSymbols.- Parameters:
numberOfSymbols- The value for numberOfSymbols- Returns:
thisbuilder for use in a chained invocation
-
sizeOfOptionalHeader
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder sizeOfOptionalHeader(long sizeOfOptionalHeader) Initializes the optional valuesizeOfOptionalHeaderto sizeOfOptionalHeader.- Parameters:
sizeOfOptionalHeader- The value for sizeOfOptionalHeader- Returns:
thisbuilder 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 valuesizeOfOptionalHeaderto sizeOfOptionalHeader.- Parameters:
sizeOfOptionalHeader- The value for sizeOfOptionalHeader- Returns:
thisbuilder for use in a chained invocation
-
characteristicsHex
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder characteristicsHex(String characteristicsHex) Initializes the optional valuecharacteristicsHexto characteristicsHex.- Parameters:
characteristicsHex- The value for characteristicsHex- Returns:
thisbuilder 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 valuecharacteristicsHexto characteristicsHex.- Parameters:
characteristicsHex- The value for characteristicsHex- Returns:
thisbuilder for use in a chained invocation
-
putFileHeaderHash
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder putFileHeaderHash(String key, String value) Put one entry to thefileHeaderHashesmap.- Parameters:
key- The key in the fileHeaderHashes mapvalue- The associated value in the fileHeaderHashes map- Returns:
thisbuilder for use in a chained invocation
-
putFileHeaderHash
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder putFileHeaderHash(Map.Entry<String, ? extends String> entry) Put one entry to thefileHeaderHashesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder 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 thefileHeaderHashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the fileHeaderHashes map- Returns:
thisbuilder 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 tofileHeaderHashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the fileHeaderHashes map- Returns:
thisbuilder for use in a chained invocation
-
optionalHeader
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder optionalHeader(WindowsPeOptionalHeaderObj optionalHeader) Initializes the optional valueoptionalHeaderto optionalHeader.- Parameters:
optionalHeader- The value for optionalHeader- Returns:
thisbuilder 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 valueoptionalHeaderto optionalHeader.- Parameters:
optionalHeader- The value for optionalHeader- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final WindowsPeBinaryFileExtension.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder 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 thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder 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 tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWindowsPeBinaryFileExtension.- Returns:
- An immutable instance of WindowsPeBinaryFileExtension
- Throws:
IllegalStateException- if any required attributes are missing
-