Class: GetStream::Generated::Models::ChannelResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/channel_response.rb

Overview

Represents channel in chat

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 = {}) ⇒ ChannelResponse

Initialize with attributes



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
125
126
127
128
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 98

def initialize(attributes = {})
  super(attributes)
  @cid = attributes[:cid] || attributes['cid']
  @created_at = attributes[:created_at] || attributes['created_at']
  @disabled = attributes[:disabled] || attributes['disabled']
  @frozen = attributes[:frozen] || attributes['frozen']
  @id = attributes[:id] || attributes['id']
  @type = attributes[:type] || attributes['type']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @custom = attributes[:custom] || attributes['custom']
  @auto_translation_enabled = attributes[:auto_translation_enabled] || attributes['auto_translation_enabled'] || nil
  @auto_translation_language = attributes[:auto_translation_language] || attributes['auto_translation_language'] || nil
  @blocked = attributes[:blocked] || attributes['blocked'] || nil
  @cooldown = attributes[:cooldown] || attributes['cooldown'] || nil
  @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil
  @hidden = attributes[:hidden] || attributes['hidden'] || nil
  @hide_messages_before = attributes[:hide_messages_before] || attributes['hide_messages_before'] || nil
  @last_message_at = attributes[:last_message_at] || attributes['last_message_at'] || nil
  @member_count = attributes[:member_count] || attributes['member_count'] || nil
  @message_count = attributes[:message_count] || attributes['message_count'] || nil
  @mute_expires_at = attributes[:mute_expires_at] || attributes['mute_expires_at'] || nil
  @muted = attributes[:muted] || attributes['muted'] || nil
  @team = attributes[:team] || attributes['team'] || nil
  @truncated_at = attributes[:truncated_at] || attributes['truncated_at'] || nil
  @filter_tags = attributes[:filter_tags] || attributes['filter_tags'] || nil
  @members = attributes[:members] || attributes['members'] || nil
  @own_capabilities = attributes[:own_capabilities] || attributes['own_capabilities'] || nil
  @config = attributes[:config] || attributes['config'] || nil
  @created_by = attributes[:created_by] || attributes['created_by'] || nil
  @truncated_by = attributes[:truncated_by] || attributes['truncated_by'] || nil
end

Instance Attribute Details

#auto_translation_enabledBoolean



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

def auto_translation_enabled
  @auto_translation_enabled
end

#auto_translation_languageString



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

def auto_translation_language
  @auto_translation_language
end

#blockedBoolean



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

def blocked
  @blocked
end

#cidString



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

def cid
  @cid
end

#configChannelConfigWithInfo



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

def config
  @config
end

#cooldownInteger



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

def cooldown
  @cooldown
end

#created_atDateTime



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

def created_at
  @created_at
end

#created_byUserResponse



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

def created_by
  @created_by
end

#customObject



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

def custom
  @custom
end

#deleted_atDateTime



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

def deleted_at
  @deleted_at
end

#disabledBoolean



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

def disabled
  @disabled
end

#filter_tagsArray<String>



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

def filter_tags
  @filter_tags
end

#frozenBoolean



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

def frozen
  @frozen
end

#hiddenBoolean



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

def hidden
  @hidden
end

#hide_messages_beforeDateTime



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

def hide_messages_before
  @hide_messages_before
end

#idString



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

def id
  @id
end

#last_message_atDateTime



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

def last_message_at
  @last_message_at
end

#member_countInteger



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

def member_count
  @member_count
end

#membersArray<ChannelMemberResponse>



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

def members
  @members
end

#message_countInteger



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

def message_count
  @message_count
end

#mute_expires_atDateTime



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

def mute_expires_at
  @mute_expires_at
end

#mutedBoolean



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

def muted
  @muted
end

#own_capabilitiesArray<ChannelOwnCapability>



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

def own_capabilities
  @own_capabilities
end

#teamString



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

def team
  @team
end

#truncated_atDateTime



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

def truncated_at
  @truncated_at
end

#truncated_byUserResponse



95
96
97
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 95

def truncated_by
  @truncated_by
end

#typeString



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

def type
  @type
end

#updated_atDateTime



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

def updated_at
  @updated_at
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



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
158
159
160
161
162
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 131

def self.json_field_mappings
  {
    cid: 'cid',
    created_at: 'created_at',
    disabled: 'disabled',
    frozen: 'frozen',
    id: 'id',
    type: 'type',
    updated_at: 'updated_at',
    custom: 'custom',
    auto_translation_enabled: 'auto_translation_enabled',
    auto_translation_language: 'auto_translation_language',
    blocked: 'blocked',
    cooldown: 'cooldown',
    deleted_at: 'deleted_at',
    hidden: 'hidden',
    hide_messages_before: 'hide_messages_before',
    last_message_at: 'last_message_at',
    member_count: 'member_count',
    message_count: 'message_count',
    mute_expires_at: 'mute_expires_at',
    muted: 'muted',
    team: 'team',
    truncated_at: 'truncated_at',
    filter_tags: 'filter_tags',
    members: 'members',
    own_capabilities: 'own_capabilities',
    config: 'config',
    created_by: 'created_by',
    truncated_by: 'truncated_by'
  }
end