Class HttpRequestExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.HttpRequestExtension.Builder
- Enclosing class:
HttpRequestExtension
Builds instances of type
HttpRequestExtension.
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 newHttpRequestExtension.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.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(HttpRequestExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.HttpRequestExtensionExtinstance.messageBodyDataRef(String messageBodyDataRef) Initializes the optional valuemessageBodyDataRefto messageBodyDataRef.messageBodyDataRef(Optional<String> messageBodyDataRef) Initializes the optional valuemessageBodyDataRefto messageBodyDataRef.messageBodyLength(long messageBodyLength) Initializes the optional valuemessageBodyLengthto messageBodyLength.messageBodyLength(Optional<Long> messageBodyLength) Initializes the optional valuemessageBodyLengthto messageBodyLength.putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.putAllRequestHeader(Map<String, ? extends String> entries) Put all mappings from the specified map as entries torequestHeadermap.putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.putRequestHeader(String key, String value) Put one entry to therequestHeadermap.putRequestHeader(Map.Entry<String, ? extends String> entry) Put one entry to therequestHeadermap.requestHeader(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for therequestHeadermap.requestMethod(String requestMethod) Initializes the value for therequestMethodattribute.requestValue(String requestValue) Initializes the value for therequestValueattribute.requestVersion(String requestVersion) Initializes the optional valuerequestVersionto requestVersion.requestVersion(Optional<String> requestVersion) Initializes the optional valuerequestVersionto requestVersion.Initializes the value for thetypeattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final HttpRequestExtension.Builder from(HttpRequestExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.HttpRequestExtensionExtinstance.- 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.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final HttpRequestExtension.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
-
requestMethod
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the HTTP method portion of the HTTP request line, as a lowercase string.") public final HttpRequestExtension.Builder requestMethod(String requestMethod) Initializes the value for therequestMethodattribute.- Parameters:
requestMethod- The value for requestMethod (can benull)- Returns:
thisbuilder for use in a chained invocation
-
requestValue
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the value (typically a resource path) portion of the HTTP request line.") public final HttpRequestExtension.Builder requestValue(String requestValue) Initializes the value for therequestValueattribute.- Parameters:
requestValue- The value for requestValue (can benull)- Returns:
thisbuilder for use in a chained invocation
-
requestVersion
@CanIgnoreReturnValue public final HttpRequestExtension.Builder requestVersion(String requestVersion) Initializes the optional valuerequestVersionto requestVersion.- Parameters:
requestVersion- The value for requestVersion- Returns:
thisbuilder for chained invocation
-
requestVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the HTTP version portion of the HTTP request line, as a lowercase string.") public final HttpRequestExtension.Builder requestVersion(Optional<String> requestVersion) Initializes the optional valuerequestVersionto requestVersion.- Parameters:
requestVersion- The value for requestVersion- Returns:
thisbuilder for use in a chained invocation
-
putRequestHeader
@CanIgnoreReturnValue public final HttpRequestExtension.Builder putRequestHeader(String key, String value) Put one entry to therequestHeadermap.- Parameters:
key- The key in the requestHeader mapvalue- The associated value in the requestHeader map- Returns:
thisbuilder for use in a chained invocation
-
putRequestHeader
@CanIgnoreReturnValue public final HttpRequestExtension.Builder putRequestHeader(Map.Entry<String, ? extends String> entry) Put one entry to therequestHeadermap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
requestHeader
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies all of the HTTP header fields that may be found in the HTTP client request, as a dictionary.") public final HttpRequestExtension.Builder requestHeader(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for therequestHeadermap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the requestHeader map- Returns:
thisbuilder for use in a chained invocation
-
putAllRequestHeader
@CanIgnoreReturnValue public final HttpRequestExtension.Builder putAllRequestHeader(Map<String, ? extends String> entries) Put all mappings from the specified map as entries torequestHeadermap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the requestHeader map- Returns:
thisbuilder for use in a chained invocation
-
messageBodyLength
@CanIgnoreReturnValue public final HttpRequestExtension.Builder messageBodyLength(long messageBodyLength) Initializes the optional valuemessageBodyLengthto messageBodyLength.- Parameters:
messageBodyLength- The value for messageBodyLength- Returns:
thisbuilder for chained invocation
-
messageBodyLength
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the length of the HTTP message body, if included, in bytes.") public final HttpRequestExtension.Builder messageBodyLength(Optional<Long> messageBodyLength) Initializes the optional valuemessageBodyLengthto messageBodyLength.- Parameters:
messageBodyLength- The value for messageBodyLength- Returns:
thisbuilder for use in a chained invocation
-
messageBodyDataRef
@CanIgnoreReturnValue public final HttpRequestExtension.Builder messageBodyDataRef(String messageBodyDataRef) Initializes the optional valuemessageBodyDataRefto messageBodyDataRef.- Parameters:
messageBodyDataRef- The value for messageBodyDataRef- Returns:
thisbuilder for chained invocation
-
messageBodyDataRef
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the data contained in the HTTP message body, if included.") public final HttpRequestExtension.Builder messageBodyDataRef(Optional<String> messageBodyDataRef) Initializes the optional valuemessageBodyDataRefto messageBodyDataRef.- Parameters:
messageBodyDataRef- The value for messageBodyDataRef- 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 HttpRequestExtension.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 HttpRequestExtension.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 HttpRequestExtension.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 HttpRequestExtension.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 newHttpRequestExtension.- Returns:
- An immutable instance of HttpRequestExtension
- Throws:
IllegalStateException- if any required attributes are missing
-