Class: Datadog::AppSec::WAF::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/appsec/waf/result.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionsObject (readonly)

Returns the value of attribute actions.



9
10
11
# File 'lib/datadog/appsec/waf/result.rb', line 9

def actions
  @actions
end

#derivativesObject (readonly)

Returns the value of attribute derivatives.



9
10
11
# File 'lib/datadog/appsec/waf/result.rb', line 9

def derivatives
  @derivatives
end

#eventsObject (readonly)

Returns the value of attribute events.



9
10
11
# File 'lib/datadog/appsec/waf/result.rb', line 9

def events
  @events
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/datadog/appsec/waf/result.rb', line 9

def status
  @status
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



9
10
11
# File 'lib/datadog/appsec/waf/result.rb', line 9

def timeout
  @timeout
end

#total_runtimeObject (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

Returns:

  • (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_hObject



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