Class WindowsPeSection

java.lang.Object
security.whisper.javastix.coo.types.WindowsPeSection
All Implemented Interfaces:
Serializable, StixCustomProperties, WindowsPeSectionObj, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class WindowsPeSection extends Object implements WindowsPeSectionObj
The PE Section type specifies metadata about a PE file section.
See Also:
  • Method Details

    • getName

      @JsonPropertyDescription("Specifies the name of the section.") public Optional<String> getName()
      Specified by:
      getName in interface WindowsPeSectionObj
      Returns:
      The value of the name attribute
    • getSize

      @JsonPropertyDescription("Specifies the size of the section, in bytes.") public Optional<Long> getSize()
      Specified by:
      getSize in interface WindowsPeSectionObj
      Returns:
      The value of the size attribute
    • getEntropy

      @JsonPropertyDescription("Specifies the calculated entropy for the section, as calculated using the Shannon algorithm.") public Optional<Float> getEntropy()
      Specified by:
      getEntropy in interface WindowsPeSectionObj
      Returns:
      The value of the entropy attribute
    • getHashes

      @JsonPropertyDescription("Specifies any hashes computed over the section.") public com.google.common.collect.ImmutableMap<String,String> getHashes()
      Specified by:
      getHashes in interface WindowsPeSectionObj
      Returns:
      The value of the hashes attribute
    • getCustomProperties

      public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()
      Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.
      Specified by:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withName

      public final WindowsPeSection withName(String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      Parameters:
      value - The value for name
      Returns:
      A modified copy of this object
    • withName

      public final WindowsPeSection withName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for name
      Returns:
      A modified copy of this object
    • withSize

      public final WindowsPeSection withSize(long value)
      Copy the current immutable object by setting a present value for the optional size attribute.
      Parameters:
      value - The value for size
      Returns:
      A modified copy of this object
    • withSize

      public final WindowsPeSection withSize(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the size attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for size
      Returns:
      A modified copy of this object
    • withEntropy

      public final WindowsPeSection withEntropy(float value)
      Copy the current immutable object by setting a present value for the optional entropy attribute.
      Parameters:
      value - The value for entropy
      Returns:
      A modified copy of this object
    • withEntropy

      public final WindowsPeSection withEntropy(Optional<Float> optional)
      Copy the current immutable object by setting an optional value for the entropy attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for entropy
      Returns:
      A modified copy of this object
    • withHashes

      public final WindowsPeSection withHashes(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the hashes map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the hashes map
      Returns:
      A modified copy of this object
    • withCustomProperties

      public final WindowsPeSection withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of WindowsPeSection that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, size, entropy, hashes, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value WindowsPeSection with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static WindowsPeSection copyOf(WindowsPeSectionObj instance)
      Creates an immutable copy of a WindowsPeSectionObj value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable WindowsPeSection instance
    • builder

      public static WindowsPeSection.Builder builder()
      Creates a builder for WindowsPeSection.
      Returns:
      A new WindowsPeSection builder