Class: GetStream::Generated::Models::Reaction
- Defined in:
- lib/getstream_ruby/generated/models/reaction.rb
Instance Attribute Summary collapse
- #activity_id ⇒ String
- #children_counts ⇒ Object
- #created_at ⇒ DateTime
- #data ⇒ Object
- #deleted_at ⇒ DateTime
- #id ⇒ String
- #kind ⇒ String
- #latest_children ⇒ Hash<String, Array<Reaction>>
- #moderation ⇒ Object
- #own_children ⇒ Hash<String, Array<Reaction>>
- #parent ⇒ String
- #score ⇒ Float
- #target_feeds ⇒ Array<String>
- #target_feeds_extra_data ⇒ Object
- #updated_at ⇒ DateTime
- #user ⇒ User
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Reaction
constructor
Initialize with attributes.
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_id ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 14 def activity_id @activity_id end |
#children_counts ⇒ Object
44 45 46 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 44 def children_counts @children_counts end |
#created_at ⇒ DateTime
17 18 19 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 17 def created_at @created_at end |
#data ⇒ Object
47 48 49 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 47 def data @data end |
#deleted_at ⇒ DateTime
29 30 31 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 29 def deleted_at @deleted_at end |
#id ⇒ String
32 33 34 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 32 def id @id end |
#kind ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 20 def kind @kind end |
#latest_children ⇒ Hash<String, Array<Reaction>>
50 51 52 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 50 def latest_children @latest_children end |
#moderation ⇒ Object
53 54 55 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 53 def moderation @moderation end |
#own_children ⇒ Hash<String, Array<Reaction>>
56 57 58 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 56 def own_children @own_children end |
#parent ⇒ String
35 36 37 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 35 def parent @parent end |
#score ⇒ Float
38 39 40 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 38 def score @score end |
#target_feeds ⇒ Array<String>
41 42 43 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 41 def target_feeds @target_feeds end |
#target_feeds_extra_data ⇒ 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_at ⇒ DateTime
23 24 25 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 23 def updated_at @updated_at end |
#user ⇒ User
62 63 64 |
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 62 def user @user end |
#user_id ⇒ 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_mappings ⇒ Object
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 |