Class IcmpExtension

java.lang.Object
security.whisper.javastix.coo.extension.types.IcmpExtension
All Implemented Interfaces:
Serializable, StixCustomProperties, CyberObservableExtension, CyberObservableExtensionCommonProperties, IcmpExtensionExt, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @AllowedParents(NetworkTrafficCoo.class) public final class IcmpExtension extends Object implements IcmpExtensionExt, Serializable
icmp-ext

The ICMP extension specifies a default extension for capturing network traffic properties specific to ICMP.

See Also:
  • Method Details

    • getOcmpTypeHex

      @JsonPropertyDescription("Specifies the ICMP type byte.") public String getOcmpTypeHex()
      Specified by:
      getOcmpTypeHex in interface IcmpExtensionExt
      Returns:
      The value of the ocmpTypeHex attribute
    • getIcmpCodeHex

      @JsonPropertyDescription("Specifies the ICMP code byte.") public String getIcmpCodeHex()
      Specified by:
      getIcmpCodeHex in interface IcmpExtensionExt
      Returns:
      The value of the icmpCodeHex attribute
    • getType

      public String getType()
      This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.
      Specified by:
      getType in interface CyberObservableExtensionCommonProperties
    • 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>
    • withOcmpTypeHex

      public final IcmpExtension withOcmpTypeHex(String value)
      Copy the current immutable object by setting a value for the ocmpTypeHex attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ocmpTypeHex (can be null)
      Returns:
      A modified copy of the this object
    • withIcmpCodeHex

      public final IcmpExtension withIcmpCodeHex(String value)
      Copy the current immutable object by setting a value for the icmpCodeHex attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for icmpCodeHex (can be null)
      Returns:
      A modified copy of the this object
    • withType

      public final IcmpExtension withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final IcmpExtension 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 IcmpExtension 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: ocmpTypeHex, icmpCodeHex, type, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static IcmpExtension copyOf(IcmpExtensionExt instance)
      Creates an immutable copy of a IcmpExtensionExt 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 IcmpExtension instance
    • builder

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