Class: Datadog::AppSec::WAF::Result
- Inherits:
-
Object
- Object
- Datadog::AppSec::WAF::Result
- Defined in:
- lib/datadog/appsec/waf/result.rb
Overview
Ruby representation of the ddwaf_result of a libddwaf run. See github.com/DataDog/libddwaf/blob/10e3a1dfc7bc9bb8ab11a09a9f8b6b339eaf3271/include/ddwaf.h#L159-L173
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#derivatives ⇒ Object
readonly
Returns the value of attribute derivatives.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#total_runtime ⇒ Object
readonly
Returns the value of attribute total_runtime.
Instance Method Summary collapse
-
#initialize(status, events, total_runtime, timeout, actions, derivatives) ⇒ Result
constructor
A new instance of Result.
- #input_truncated? ⇒ Boolean
- #mark_input_truncated! ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(status, events, total_runtime, timeout, actions, derivatives) ⇒ Result
Returns a new instance of Result.
11 12 13 14 15 16 17 18 19 |
# File 'lib/datadog/appsec/waf/result.rb', line 11 def initialize(status, events, total_runtime, timeout, actions, derivatives) @status = status @events = events @total_runtime = total_runtime @timeout = timeout @actions = actions @derivatives = derivatives @input_truncated = false end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def actions @actions end |
#derivatives ⇒ Object (readonly)
Returns the value of attribute derivatives.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def derivatives @derivatives end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def events @events end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def status @status end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def timeout @timeout end |
#total_runtime ⇒ Object (readonly)
Returns the value of attribute total_runtime.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def total_runtime @total_runtime end |
Instance Method Details
#input_truncated? ⇒ Boolean
25 26 27 |
# File 'lib/datadog/appsec/waf/result.rb', line 25 def input_truncated? @input_truncated end |
#mark_input_truncated! ⇒ Object
21 22 23 |
# File 'lib/datadog/appsec/waf/result.rb', line 21 def mark_input_truncated! @input_truncated = true end |
#to_h ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/datadog/appsec/waf/result.rb', line 29 def to_h { status: @status, events: @events, total_runtime: @total_runtime, timeout: @timeout, actions: @actions, derivatives: @derivatives } end |