Class: GetStream::Generated::Models::PolicyTestRow

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/policy_test_row.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 = {}) ⇒ PolicyTestRow

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/policy_test_row.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @content_type = attributes[:content_type] || attributes['content_type'] || nil
  @policy = attributes[:policy] || attributes['policy'] || nil
  @recommended_action = attributes[:recommended_action] || attributes['recommended_action'] || nil
  @text = attributes[:text] || attributes['text'] || nil
  @labels = attributes[:labels] || attributes['labels'] || nil
end

Instance Attribute Details

#content_typeString

Returns:

  • (String)


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

def content_type
  @content_type
end

#labelsArray<String>

Returns:

  • (Array<String>)


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

def labels
  @labels
end

#policyString

Returns:

  • (String)


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

def policy
  @policy
end

Returns:

  • (String)


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

def recommended_action
  @recommended_action
end

#textString

Returns:

  • (String)


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

def text
  @text
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/policy_test_row.rb', line 39

def self.json_field_mappings
  {
    content_type: 'content_type',
    policy: 'policy',
    recommended_action: 'recommended_action',
    text: 'text',
    labels: 'labels'
  }
end