Class: GetStream::Generated::Models::BookmarkResponse

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

Returns ID of the bookmarked object.

Returns:

  • (String)

    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

#activityActivityResponse

Returns:



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

def activity
  @activity
end

#activity_idString

Returns:

  • (String)


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

def activity_id
  @activity_id
end

#commentCommentResponse

Returns:



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

def comment
  @comment
end

#created_atDateTime

Returns When the bookmark was created.

Returns:

  • (DateTime)

    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

#customObject

Returns Custom data for the bookmark.

Returns:

  • (Object)

    Custom data for the bookmark



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

def custom
  @custom
end

#folderBookmarkFolderResponse



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

def folder
  @folder
end

#object_typeString

Returns Type of the bookmarked object (activity or comment).

Returns:

  • (String)

    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_atDateTime

Returns When the bookmark was last updated.

Returns:

  • (DateTime)

    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

#userUserResponse

Returns:



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

def user
  @user
end

Class Method Details

.json_field_mappingsObject

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