Class: GetStream::Generated::Models::DraftPayloadResponse

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

Initialize with attributes



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 53

def initialize(attributes = {})
  super(attributes)
  @id = attributes[:id] || attributes['id']
  @text = attributes[:text] || attributes['text']
  @custom = attributes[:custom] || attributes['custom']
  @html = attributes[:html] || attributes['html'] || nil
  @mml = attributes[:mml] || attributes['mml'] || nil
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || 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
  @type = attributes[:type] || attributes['type'] || nil
  @attachments = attributes[:attachments] || attributes['attachments'] || nil
  @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil
end

Instance Attribute Details

#attachmentsArray<Attachment>



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

def attachments
  @attachments
end

#customObject



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

def custom
  @custom
end

#htmlString



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

def html
  @html
end

#idString



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

def id
  @id
end

#mentioned_usersArray<UserResponse>



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

def mentioned_users
  @mentioned_users
end

#mmlString



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

def mml
  @mml
end

#parent_idString



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

def parent_id
  @parent_id
end

#poll_idString



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

def poll_id
  @poll_id
end

#quoted_message_idString



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

def quoted_message_id
  @quoted_message_id
end

#show_in_channelBoolean



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

def show_in_channel
  @show_in_channel
end

#silentBoolean



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

def silent
  @silent
end

#textString



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

def text
  @text
end

#typeString



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

def type
  @type
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 71

def self.json_field_mappings
  {
    id: 'id',
    text: 'text',
    custom: 'custom',
    html: 'html',
    mml: 'mml',
    parent_id: 'parent_id',
    poll_id: 'poll_id',
    quoted_message_id: 'quoted_message_id',
    show_in_channel: 'show_in_channel',
    silent: 'silent',
    type: 'type',
    attachments: 'attachments',
    mentioned_users: 'mentioned_users'
  }
end