Class: GetStream::Generated::Models::BookmarkResponse
- Defined in:
- lib/getstream_ruby/generated/models/bookmark_response.rb
Instance Attribute Summary collapse
-
#_object_id ⇒ String
ID of the bookmarked object.
- #activity ⇒ ActivityResponse
- #activity_id ⇒ String
- #comment ⇒ CommentResponse
-
#created_at ⇒ DateTime
When the bookmark was created.
-
#custom ⇒ Object
Custom data for the bookmark.
- #folder ⇒ BookmarkFolderResponse
-
#object_type ⇒ String
Type of the bookmarked object (activity or comment).
-
#updated_at ⇒ DateTime
When the bookmark was last updated.
- #user ⇒ UserResponse
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BookmarkResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ BookmarkResponse
Initialize with attributes
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 44 def initialize(attributes = {}) super(attributes) @_object_id = attributes[:_object_id] || attributes['object_id'] @created_at = attributes[:created_at] || attributes['created_at'] @object_type = attributes[:object_type] || attributes['object_type'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @activity = attributes[:activity] || attributes['activity'] @user = attributes[:user] || attributes['user'] @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil @comment = attributes[:comment] || attributes['comment'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @folder = attributes[:folder] || attributes['folder'] || nil end |
Instance Attribute Details
#_object_id ⇒ String
Returns ID of the bookmarked object.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 14 def _object_id @_object_id end |
#activity ⇒ ActivityResponse
26 27 28 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 26 def activity @activity end |
#activity_id ⇒ String
32 33 34 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 32 def activity_id @activity_id end |
#comment ⇒ CommentResponse
35 36 37 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 35 def comment @comment end |
#created_at ⇒ DateTime
Returns When the bookmark was created.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 17 def created_at @created_at end |
#custom ⇒ Object
Returns Custom data for the bookmark.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 38 def custom @custom end |
#folder ⇒ BookmarkFolderResponse
41 42 43 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 41 def folder @folder end |
#object_type ⇒ String
Returns Type of the bookmarked object (activity or comment).
20 21 22 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 20 def object_type @object_type end |
#updated_at ⇒ DateTime
Returns When the bookmark was last updated.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 23 def updated_at @updated_at end |
#user ⇒ UserResponse
29 30 31 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 29 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/getstream_ruby/generated/models/bookmark_response.rb', line 59 def self.json_field_mappings { _object_id: 'object_id', created_at: 'created_at', object_type: 'object_type', updated_at: 'updated_at', activity: 'activity', user: 'user', activity_id: 'activity_id', comment: 'comment', custom: 'custom', folder: 'folder' } end |