Class IcmpExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.IcmpExtension.Builder
- Enclosing class:
IcmpExtension
Builds instances of type
IcmpExtension.
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 newIcmpExtension.final IcmpExtension.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final IcmpExtension.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final IcmpExtension.Builderfrom(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.final IcmpExtension.Builderfrom(IcmpExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.IcmpExtensionExtinstance.final IcmpExtension.BuildericmpCodeHex(String icmpCodeHex) Initializes the value for theicmpCodeHexattribute.final IcmpExtension.BuilderocmpTypeHex(String ocmpTypeHex) Initializes the value for theocmpTypeHexattribute.final IcmpExtension.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final IcmpExtension.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final IcmpExtension.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final IcmpExtension.BuilderInitializes the value for thetypeattribute.
-
Method Details
-
from
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
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.IcmpExtensionExtinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final IcmpExtension.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
-
ocmpTypeHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the ICMP type byte.") public final IcmpExtension.Builder ocmpTypeHex(String ocmpTypeHex) Initializes the value for theocmpTypeHexattribute.- Parameters:
ocmpTypeHex- The value for ocmpTypeHex (can benull)- Returns:
thisbuilder for use in a chained invocation
-
icmpCodeHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the ICMP code byte.") public final IcmpExtension.Builder icmpCodeHex(String icmpCodeHex) Initializes the value for theicmpCodeHexattribute.- Parameters:
icmpCodeHex- The value for icmpCodeHex (can benull)- 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 IcmpExtension.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 IcmpExtension.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 IcmpExtension.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 IcmpExtension.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 newIcmpExtension.- Returns:
- An immutable instance of IcmpExtension
- Throws:
IllegalStateException- if any required attributes are missing
-