Class: GetStream::Generated::Models::MessageRequest

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

Initialize with attributes



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 74

def initialize(attributes = {})
  super(attributes)
  @html = attributes[:html] || attributes['html'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @mml = attributes[:mml] || attributes['mml'] || nil
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
  @pin_expires = attributes[:pin_expires] || attributes['pin_expires'] || nil
  @pinned = attributes[:pinned] || attributes['pinned'] || nil
  @pinned_at = attributes[:pinned_at] || attributes['pinned_at'] || nil
  @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
  @quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
  @show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
  @silent = attributes[:silent] || attributes['silent'] || nil
  @text = attributes[:text] || attributes['text'] || nil
  @type = attributes[:type] || attributes['type'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @attachments = attributes[:attachments] || attributes['attachments'] || nil
  @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil
  @restricted_visibility = attributes[:restricted_visibility] || attributes['restricted_visibility'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
  @shared_location = attributes[:shared_location] || attributes['shared_location'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#attachmentsArray<Attachment>

Returns:



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

def attachments
  @attachments
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#htmlString

Returns:

  • (String)


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

def html
  @html
end

#idString

Returns:

  • (String)


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

def id
  @id
end

#mentioned_usersArray<String>

Returns:

  • (Array<String>)


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

def mentioned_users
  @mentioned_users
end

#mmlString

Returns:

  • (String)


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

def mml
  @mml
end

#parent_idString

Returns:

  • (String)


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

def parent_id
  @parent_id
end

#pin_expiresDateTime

Returns:

  • (DateTime)


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

def pin_expires
  @pin_expires
end

#pinnedBoolean

Returns:

  • (Boolean)


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

def pinned
  @pinned
end

#pinned_atDateTime

Returns:

  • (DateTime)


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

def pinned_at
  @pinned_at
end

#poll_idString

Returns:

  • (String)


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

def poll_id
  @poll_id
end

#quoted_message_idString

Returns:

  • (String)


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

def quoted_message_id
  @quoted_message_id
end

#restricted_visibilityArray<String>

Returns:

  • (Array<String>)


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

def restricted_visibility
  @restricted_visibility
end

#shared_locationSharedLocation

Returns:



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

def shared_location
  @shared_location
end

#show_in_channelBoolean

Returns:

  • (Boolean)


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

def show_in_channel
  @show_in_channel
end

#silentBoolean

Returns:

  • (Boolean)


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

def silent
  @silent
end

#textString

Returns:

  • (String)


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

def text
  @text
end

#typeString

Returns:

  • (String)


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

def type
  @type
end

#userUserRequest

Returns:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    html: 'html',
    id: 'id',
    mml: 'mml',
    parent_id: 'parent_id',
    pin_expires: 'pin_expires',
    pinned: 'pinned',
    pinned_at: 'pinned_at',
    poll_id: 'poll_id',
    quoted_message_id: 'quoted_message_id',
    show_in_channel: 'show_in_channel',
    silent: 'silent',
    text: 'text',
    type: 'type',
    user_id: 'user_id',
    attachments: 'attachments',
    mentioned_users: 'mentioned_users',
    restricted_visibility: 'restricted_visibility',
    custom: 'custom',
    shared_location: 'shared_location',
    user: 'user'
  }
end