Class HttpRequestExtension
java.lang.Object
security.whisper.javastix.coo.extension.types.HttpRequestExtension
- All Implemented Interfaces:
Serializable,StixCustomProperties,CyberObservableExtension,CyberObservableExtensionCommonProperties,HttpRequestExtensionExt,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@AllowedParents(NetworkTrafficCoo.class)
public final class HttpRequestExtension
extends Object
implements HttpRequestExtensionExt, Serializable
http-request-ext
The HTTP request extension specifies a default extension for capturing network traffic properties specific to HTTP requests.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeHttpRequestExtension. -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRequestExtension.Builderbuilder()Creates a builder forHttpRequestExtension.static HttpRequestExtensioncopyOf(HttpRequestExtensionExt instance) Creates an immutable copy of aHttpRequestExtensionExtvalue.booleanThis instance is equal to all instances ofHttpRequestExtensionthat have equal attribute values.Custom Properties for STIX Objects.Currently only supports non-duplicate keys: https://github.com/oasis-tcs/cti-stix2/issues/137getType()This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.inthashCode()Computes a hash code from attributes:requestMethod,requestValue,requestVersion,requestHeader,messageBodyLength,messageBodyDataRef,type,customProperties.toString()Prints the immutable valueHttpRequestExtensionwith attribute values.final HttpRequestExtensionwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final HttpRequestExtensionwithMessageBodyDataRef(String value) Copy the current immutable object by setting a present value for the optionalmessageBodyDataRefattribute.final HttpRequestExtensionwithMessageBodyDataRef(Optional<String> optional) Copy the current immutable object by setting an optional value for themessageBodyDataRefattribute.final HttpRequestExtensionwithMessageBodyLength(long value) Copy the current immutable object by setting a present value for the optionalmessageBodyLengthattribute.final HttpRequestExtensionwithMessageBodyLength(Optional<Long> optional) Copy the current immutable object by setting an optional value for themessageBodyLengthattribute.final HttpRequestExtensionwithRequestHeader(Map<String, ? extends String> entries) Copy the current immutable object by replacing therequestHeadermap with the specified map.final HttpRequestExtensionwithRequestMethod(String value) Copy the current immutable object by setting a value for therequestMethodattribute.final HttpRequestExtensionwithRequestValue(String value) Copy the current immutable object by setting a value for therequestValueattribute.final HttpRequestExtensionwithRequestVersion(String value) Copy the current immutable object by setting a present value for the optionalrequestVersionattribute.final HttpRequestExtensionwithRequestVersion(Optional<String> optional) Copy the current immutable object by setting an optional value for therequestVersionattribute.final HttpRequestExtensionCopy the current immutable object by setting a value for thetypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getRequestMethod
@JsonPropertyDescription("Specifies the HTTP method portion of the HTTP request line, as a lowercase string.") public String getRequestMethod()- Specified by:
getRequestMethodin interfaceHttpRequestExtensionExt- Returns:
- The value of the
requestMethodattribute
-
getRequestValue
@JsonPropertyDescription("Specifies the value (typically a resource path) portion of the HTTP request line.") public String getRequestValue()- Specified by:
getRequestValuein interfaceHttpRequestExtensionExt- Returns:
- The value of the
requestValueattribute
-
getRequestVersion
@JsonPropertyDescription("Specifies the HTTP version portion of the HTTP request line, as a lowercase string.") public Optional<String> getRequestVersion()- Specified by:
getRequestVersionin interfaceHttpRequestExtensionExt- Returns:
- The value of the
requestVersionattribute
-
getRequestHeader
@JsonPropertyDescription("Specifies all of the HTTP header fields that may be found in the HTTP client request, as a dictionary.") public com.google.common.collect.ImmutableMap<String,String> getRequestHeader()Currently only supports non-duplicate keys: https://github.com/oasis-tcs/cti-stix2/issues/137- Specified by:
getRequestHeaderin interfaceHttpRequestExtensionExt
-
getMessageBodyLength
@JsonPropertyDescription("Specifies the length of the HTTP message body, if included, in bytes.") public Optional<Long> getMessageBodyLength()- Specified by:
getMessageBodyLengthin interfaceHttpRequestExtensionExt- Returns:
- The value of the
messageBodyLengthattribute
-
getMessageBodyDataRef
@JsonPropertyDescription("Specifies the data contained in the HTTP message body, if included.") public Optional<String> getMessageBodyDataRef()- Specified by:
getMessageBodyDataRefin interfaceHttpRequestExtensionExt- Returns:
- The value of the
messageBodyDataRefattribute
-
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:
getTypein interfaceCyberObservableExtensionCommonProperties
-
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:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
withRequestMethod
Copy the current immutable object by setting a value for therequestMethodattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for requestMethod (can benull)- Returns:
- A modified copy of the
thisobject
-
withRequestValue
Copy the current immutable object by setting a value for therequestValueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for requestValue (can benull)- Returns:
- A modified copy of the
thisobject
-
withRequestVersion
Copy the current immutable object by setting a present value for the optionalrequestVersionattribute.- Parameters:
value- The value for requestVersion- Returns:
- A modified copy of
thisobject
-
withRequestVersion
Copy the current immutable object by setting an optional value for therequestVersionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for requestVersion- Returns:
- A modified copy of
thisobject
-
withRequestHeader
Copy the current immutable object by replacing therequestHeadermap 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 returningthis.- Parameters:
entries- The entries to be added to the requestHeader map- Returns:
- A modified copy of
thisobject
-
withMessageBodyLength
Copy the current immutable object by setting a present value for the optionalmessageBodyLengthattribute.- Parameters:
value- The value for messageBodyLength- Returns:
- A modified copy of
thisobject
-
withMessageBodyLength
Copy the current immutable object by setting an optional value for themessageBodyLengthattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for messageBodyLength- Returns:
- A modified copy of
thisobject
-
withMessageBodyDataRef
Copy the current immutable object by setting a present value for the optionalmessageBodyDataRefattribute.- Parameters:
value- The value for messageBodyDataRef- Returns:
- A modified copy of
thisobject
-
withMessageBodyDataRef
Copy the current immutable object by setting an optional value for themessageBodyDataRefattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for messageBodyDataRef- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap 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 returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofHttpRequestExtensionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:requestMethod,requestValue,requestVersion,requestHeader,messageBodyLength,messageBodyDataRef,type,customProperties. -
toString
Prints the immutable valueHttpRequestExtensionwith attribute values. -
copyOf
Creates an immutable copy of aHttpRequestExtensionExtvalue. 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 HttpRequestExtension instance
-
builder
Creates a builder forHttpRequestExtension.- Returns:
- A new HttpRequestExtension builder
-