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[:created_at] || attributes['created_at']
  @id = attributes[:id] || attributes['id']
  @message_text = attributes[:message_text] || attributes['message_text']
  @row_index = attributes[:row_index] || attributes['row_index']
  @run_id = attributes[:run_id] || attributes['run_id']
  @scored = attributes[:scored] || attributes['scored']
  @actual_action = attributes[:actual_action] || attributes['actual_action'] || nil
  @expected_action = attributes[:expected_action] || attributes['expected_action'] || nil
  @failure_reason = attributes[:failure_reason] || attributes['failure_reason'] || nil
  @passed = attributes[:passed] || attributes['passed'] || nil
  @severity = attributes[:severity] || attributes['severity'] || nil
  @actual_labels = attributes[:actual_labels] || attributes['actual_labels'] || nil
  @expected_labels = attributes[:expected_labels] || attributes['expected_labels'] || nil
  @raw_response = attributes[:raw_response] || attributes['raw_response'] || nil
end

Instance Attribute Details

#actual_actionString

Returns:

  • (String)


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

def actual_action
  @actual_action
end

#actual_labelsArray<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_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#expected_actionString

Returns:

  • (String)


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

def expected_action
  @expected_action
end

#expected_labelsArray<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_reasonString

Returns:

  • (String)


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

def failure_reason
  @failure_reason
end

#idInteger

Returns:

  • (Integer)


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

def id
  @id
end

#message_textString

Returns:

  • (String)


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

def message_text
  @message_text
end

#passedBoolean

Returns:

  • (Boolean)


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

def passed
  @passed
end

#raw_responseObject

Returns:

  • (Object)


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

def raw_response
  @raw_response
end

#row_indexInteger

Returns:

  • (Integer)


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

def row_index
  @row_index
end

#run_idString

Returns:

  • (String)


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

def run_id
  @run_id
end

#scoredBoolean

Returns:

  • (Boolean)


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

def scored
  @scored
end

#severityString

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_mappingsObject

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