Class: GetStream::Generated::Models::Reaction

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

Initialize with attributes



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 65

def initialize(attributes = {})
  super(attributes)
  @activity_id = attributes[:activity_id] || attributes['activity_id']
  @created_at = attributes[:created_at] || attributes['created_at']
  @kind = attributes[:kind] || attributes['kind']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @user_id = attributes[:user_id] || attributes['user_id']
  @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @parent = attributes[:parent] || attributes['parent'] || nil
  @score = attributes[:score] || attributes['score'] || nil
  @target_feeds = attributes[:target_feeds] || attributes['target_feeds'] || nil
  @children_counts = attributes[:children_counts] || attributes['children_counts'] || nil
  @data = attributes[:data] || attributes['data'] || nil
  @latest_children = attributes[:latest_children] || attributes['latest_children'] || nil
  @moderation = attributes[:moderation] || attributes['moderation'] || nil
  @own_children = attributes[:own_children] || attributes['own_children'] || nil
  @target_feeds_extra_data = attributes[:target_feeds_extra_data] || attributes['target_feeds_extra_data'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#activity_idString

Returns:

  • (String)


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

def activity_id
  @activity_id
end

#children_countsObject

Returns:

  • (Object)


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

def children_counts
  @children_counts
end

#created_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#dataObject

Returns:

  • (Object)


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

def data
  @data
end

#deleted_atDateTime

Returns:

  • (DateTime)


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

def deleted_at
  @deleted_at
end

#idString

Returns:

  • (String)


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

def id
  @id
end

#kindString

Returns:

  • (String)


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

def kind
  @kind
end

#latest_childrenHash<String, Array<Reaction>>

Returns:



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

def latest_children
  @latest_children
end

#moderationObject

Returns:

  • (Object)


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

def moderation
  @moderation
end

#own_childrenHash<String, Array<Reaction>>

Returns:



56
57
58
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 56

def own_children
  @own_children
end

#parentString

Returns:

  • (String)


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

def parent
  @parent
end

#scoreFloat

Returns:

  • (Float)


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

def score
  @score
end

#target_feedsArray<String>

Returns:

  • (Array<String>)


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

def target_feeds
  @target_feeds
end

#target_feeds_extra_dataObject

Returns:

  • (Object)


59
60
61
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 59

def target_feeds_extra_data
  @target_feeds_extra_data
end

#updated_atDateTime

Returns:

  • (DateTime)


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

def updated_at
  @updated_at
end

#userUser

Returns:



62
63
64
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 62

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 87

def self.json_field_mappings
  {
    activity_id: 'activity_id',
    created_at: 'created_at',
    kind: 'kind',
    updated_at: 'updated_at',
    user_id: 'user_id',
    deleted_at: 'deleted_at',
    id: 'id',
    parent: 'parent',
    score: 'score',
    target_feeds: 'target_feeds',
    children_counts: 'children_counts',
    data: 'data',
    latest_children: 'latest_children',
    moderation: 'moderation',
    own_children: 'own_children',
    target_feeds_extra_data: 'target_feeds_extra_data',
    user: 'user'
  }
end