Class: GetStream::Generated::Models::CommentResponse

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

Initialize with attributes



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 95

def initialize(attributes = {})
  super(attributes)
  @_object_id = attributes[:_object_id] || attributes['object_id']
  @bookmark_count = attributes[:bookmark_count] || attributes['bookmark_count']
  @confidence_score = attributes[:confidence_score] || attributes['confidence_score']
  @created_at = attributes[:created_at] || attributes['created_at']
  @downvote_count = attributes[:downvote_count] || attributes['downvote_count']
  @id = attributes[:id] || attributes['id']
  @object_type = attributes[:object_type] || attributes['object_type']
  @reaction_count = attributes[:reaction_count] || attributes['reaction_count']
  @reply_count = attributes[:reply_count] || attributes['reply_count']
  @score = attributes[:score] || attributes['score']
  @status = attributes[:status] || attributes['status']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @upvote_count = attributes[:upvote_count] || attributes['upvote_count']
  @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users']
  @own_reactions = attributes[:own_reactions] || attributes['own_reactions']
  @user = attributes[:user] || attributes['user']
  @controversy_score = attributes[:controversy_score] || attributes['controversy_score'] || nil
  @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil
  @edited_at = attributes[:edited_at] || attributes['edited_at'] || nil
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
  @text = attributes[:text] || attributes['text'] || nil
  @attachments = attributes[:attachments] || attributes['attachments'] || nil
  @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
  @i18n = attributes[:i18n] || attributes['i18n'] || nil
  @moderation = attributes[:moderation] || attributes['moderation'] || nil
  @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil
end

Instance Attribute Details

#_object_idString



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

def _object_id
  @_object_id
end

#attachmentsArray<Attachment>



77
78
79
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 77

def attachments
  @attachments
end

#bookmark_countInteger



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

def bookmark_count
  @bookmark_count
end

#confidence_scoreFloat



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

def confidence_score
  @confidence_score
end

#controversy_scoreFloat



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

def controversy_score
  @controversy_score
end

#created_atDateTime



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

def created_at
  @created_at
end

#customObject



83
84
85
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 83

def custom
  @custom
end

#deleted_atDateTime



65
66
67
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 65

def deleted_at
  @deleted_at
end

#downvote_countInteger



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

def downvote_count
  @downvote_count
end

#edited_atDateTime



68
69
70
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 68

def edited_at
  @edited_at
end

#i18nHash<String, String>



86
87
88
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 86

def i18n
  @i18n
end

#idString



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

def id
  @id
end

#latest_reactionsArray<FeedsReactionResponse>



80
81
82
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 80

def latest_reactions
  @latest_reactions
end

#mentioned_usersArray<UserResponse>



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

def mentioned_users
  @mentioned_users
end

#moderationModerationV2Response



89
90
91
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 89

def moderation
  @moderation
end

#object_typeString



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

def object_type
  @object_type
end

#own_reactionsArray<FeedsReactionResponse>



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

def own_reactions
  @own_reactions
end

#parent_idString



71
72
73
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 71

def parent_id
  @parent_id
end

#reaction_countInteger



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

def reaction_count
  @reaction_count
end

#reaction_groupsHash<String, FeedsReactionGroupResponse>



92
93
94
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 92

def reaction_groups
  @reaction_groups
end

#reply_countInteger



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

def reply_count
  @reply_count
end

#scoreInteger



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

def score
  @score
end

#statusString



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

def status
  @status
end

#textString



74
75
76
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 74

def text
  @text
end

#updated_atDateTime



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

def updated_at
  @updated_at
end

#upvote_countInteger



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

def upvote_count
  @upvote_count
end

#userUserResponse



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

def user
  @user
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 127

def self.json_field_mappings
  {
    _object_id: 'object_id',
    bookmark_count: 'bookmark_count',
    confidence_score: 'confidence_score',
    created_at: 'created_at',
    downvote_count: 'downvote_count',
    id: 'id',
    object_type: 'object_type',
    reaction_count: 'reaction_count',
    reply_count: 'reply_count',
    score: 'score',
    status: 'status',
    updated_at: 'updated_at',
    upvote_count: 'upvote_count',
    mentioned_users: 'mentioned_users',
    own_reactions: 'own_reactions',
    user: 'user',
    controversy_score: 'controversy_score',
    deleted_at: 'deleted_at',
    edited_at: 'edited_at',
    parent_id: 'parent_id',
    text: 'text',
    attachments: 'attachments',
    latest_reactions: 'latest_reactions',
    custom: 'custom',
    i18n: 'i18n',
    moderation: 'moderation',
    reaction_groups: 'reaction_groups'
  }
end