Class: GetStream::Generated::Models::PolicyTestResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/policy_test_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ PolicyTestResult

Initialize with attributes



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 56

def initialize(attributes = {})
  super(attributes)
  @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) }
  @id = attributes.fetch(:id) { attributes.fetch('id', nil) }
  @message_text = attributes.fetch(:message_text) { attributes.fetch('message_text', nil) }
  @row_index = attributes.fetch(:row_index) { attributes.fetch('row_index', nil) }
  @run_id = attributes.fetch(:run_id) { attributes.fetch('run_id', nil) }
  @scored = attributes.fetch(:scored) { attributes.fetch('scored', nil) }
  @actual_action = attributes.fetch(:actual_action) { attributes.fetch('actual_action', nil) }
  @expected_action = attributes.fetch(:expected_action) { attributes.fetch('expected_action', nil) }
  @failure_reason = attributes.fetch(:failure_reason) { attributes.fetch('failure_reason', nil) }
  @passed = attributes.fetch(:passed) { attributes.fetch('passed', nil) }
  @severity = attributes.fetch(:severity) { attributes.fetch('severity', nil) }
  @actual_labels = attributes.fetch(:actual_labels) { attributes.fetch('actual_labels', nil) }
  @expected_labels = attributes.fetch(:expected_labels) { attributes.fetch('expected_labels', nil) }
  @raw_response = attributes.fetch(:raw_response) { attributes.fetch('raw_response', nil) }
end

Instance Attribute Details

#actual_action ⇒ String

Returns:

  • (String)


32
33
34
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 32

def actual_action
  @actual_action
end

#actual_labels ⇒ Array<String>

Returns:

  • (Array<String>)


47
48
49
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 47

def actual_labels
  @actual_labels
end

#created_at ⇒ DateTime

Returns:

  • (DateTime)


14
15
16
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 14

def created_at
  @created_at
end

#expected_action ⇒ String

Returns:

  • (String)


35
36
37
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 35

def expected_action
  @expected_action
end

#expected_labels ⇒ Array<String>

Returns:

  • (Array<String>)


50
51
52
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 50

def expected_labels
  @expected_labels
end

#failure_reason ⇒ String

Returns:

  • (String)


38
39
40
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 38

def failure_reason
  @failure_reason
end

#id ⇒ Integer

Returns:

  • (Integer)


17
18
19
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 17

def id
  @id
end

#message_text ⇒ String

Returns:

  • (String)


20
21
22
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 20

def message_text
  @message_text
end

#passed ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 41

def passed
  @passed
end

#raw_response ⇒ Object

Returns:

  • (Object)


53
54
55
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 53

def raw_response
  @raw_response
end

#row_index ⇒ Integer

Returns:

  • (Integer)


23
24
25
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 23

def row_index
  @row_index
end

#run_id ⇒ String

Returns:

  • (String)


26
27
28
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 26

def run_id
  @run_id
end

#scored ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 29

def scored
  @scored
end

#severity ⇒ String

Returns:

  • (String)


44
45
46
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 44

def severity
  @severity
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/getstream_ruby/generated/models/policy_test_result.rb', line 75

def self.json_field_mappings
  {
    created_at: 'created_at',
    id: 'id',
    message_text: 'message_text',
    row_index: 'row_index',
    run_id: 'run_id',
    scored: 'scored',
    actual_action: 'actual_action',
    expected_action: 'expected_action',
    failure_reason: 'failure_reason',
    passed: 'passed',
    severity: 'severity',
    actual_labels: 'actual_labels',
    expected_labels: 'expected_labels',
    raw_response: 'raw_response'
  }
end