Class: GetStream::Generated::Models::ChannelResponse
- Defined in:
- lib/getstream_ruby/generated/models/channel_response.rb
Overview
Represents channel in chat
Instance Attribute Summary collapse
-
#auto_translation_enabled ⇒ Boolean
Whether auto translation is enabled or not.
-
#auto_translation_language ⇒ String
Language to translate to when auto translation is active.
-
#blocked ⇒ Boolean
Whether this channel is blocked by current user or not.
-
#cid ⇒ String
Channel CID (<type>:<id>).
- #config ⇒ ChannelConfigWithInfo
-
#cooldown ⇒ Integer
Cooldown period after sending each message.
-
#created_at ⇒ DateTime
Date/time of creation.
- #created_by ⇒ UserResponse
-
#custom ⇒ Object
Custom data for this object.
-
#deleted_at ⇒ DateTime
Date/time of deletion.
- #disabled ⇒ Boolean
-
#filter_tags ⇒ Array<String>
List of filter tags associated with the channel.
-
#frozen ⇒ Boolean
Whether channel is frozen or not.
-
#hidden ⇒ Boolean
Whether this channel is hidden by current user or not.
-
#hide_messages_before ⇒ DateTime
Date since when the message history is accessible.
-
#id ⇒ String
Channel unique ID.
-
#last_message_at ⇒ DateTime
Date of the last message sent.
-
#member_count ⇒ Integer
Number of members in the channel.
-
#members ⇒ Array<ChannelMemberResponse>
List of channel members (max 100).
-
#message_count ⇒ Integer
Number of messages in the channel.
-
#mute_expires_at ⇒ DateTime
Date of mute expiration.
-
#muted ⇒ Boolean
Whether this channel is muted or not.
-
#own_capabilities ⇒ Array<ChannelOwnCapability>
List of channel capabilities of authenticated user.
-
#team ⇒ String
Team the channel belongs to (multi-tenant only).
-
#truncated_at ⇒ DateTime
Date of the latest truncation of the channel.
- #truncated_by ⇒ UserResponse
-
#type ⇒ String
Type of the channel.
-
#updated_at ⇒ DateTime
Date/time of the last update.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ChannelResponse
constructor
Initialize with attributes.
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_enabled ⇒ Boolean
Returns Whether auto translation is enabled or not.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 38 def auto_translation_enabled @auto_translation_enabled end |
#auto_translation_language ⇒ String
Returns Language to translate to when auto translation is active.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 41 def auto_translation_language @auto_translation_language end |
#blocked ⇒ Boolean
Returns Whether this channel is blocked by current user or not.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 44 def blocked @blocked end |
#cid ⇒ String
Returns Channel CID (<type>:<id>).
14 15 16 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 14 def cid @cid end |
#config ⇒ ChannelConfigWithInfo
89 90 91 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 89 def config @config end |
#cooldown ⇒ Integer
Returns Cooldown period after sending each message.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 47 def cooldown @cooldown end |
#created_at ⇒ DateTime
Returns Date/time of creation.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 17 def created_at @created_at end |
#created_by ⇒ UserResponse
92 93 94 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 92 def created_by @created_by end |
#custom ⇒ Object
Returns Custom data for this object.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 35 def custom @custom end |
#deleted_at ⇒ DateTime
Returns Date/time of deletion.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 50 def deleted_at @deleted_at end |
#disabled ⇒ Boolean
20 21 22 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 20 def disabled @disabled end |
#filter_tags ⇒ Array<String>
Returns List of filter tags associated with the channel.
80 81 82 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 80 def @filter_tags end |
#frozen ⇒ Boolean
Returns Whether channel is frozen or not.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 23 def frozen @frozen end |
#hidden ⇒ Boolean
Returns Whether this channel is hidden by current user or not.
53 54 55 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 53 def hidden @hidden end |
#hide_messages_before ⇒ DateTime
Returns Date since when the message history is accessible.
56 57 58 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 56 def @hide_messages_before end |
#id ⇒ String
Returns Channel unique ID.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 26 def id @id end |
#last_message_at ⇒ DateTime
Returns Date of the last message sent.
59 60 61 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 59 def @last_message_at end |
#member_count ⇒ Integer
Returns Number of members in the channel.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 62 def member_count @member_count end |
#members ⇒ Array<ChannelMemberResponse>
Returns List of channel members (max 100).
83 84 85 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 83 def members @members end |
#message_count ⇒ Integer
Returns Number of messages in the channel.
65 66 67 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 65 def @message_count end |
#mute_expires_at ⇒ DateTime
Returns Date of mute expiration.
68 69 70 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 68 def mute_expires_at @mute_expires_at end |
#muted ⇒ Boolean
Returns Whether this channel is muted or not.
71 72 73 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 71 def muted @muted end |
#own_capabilities ⇒ Array<ChannelOwnCapability>
Returns List of channel capabilities of authenticated user.
86 87 88 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 86 def own_capabilities @own_capabilities end |
#team ⇒ String
Returns Team the channel belongs to (multi-tenant only).
74 75 76 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 74 def team @team end |
#truncated_at ⇒ DateTime
Returns Date of the latest truncation of the channel.
77 78 79 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 77 def truncated_at @truncated_at end |
#truncated_by ⇒ UserResponse
95 96 97 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 95 def truncated_by @truncated_by end |
#type ⇒ String
Returns Type of the channel.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 29 def type @type end |
#updated_at ⇒ DateTime
Returns Date/time of the last update.
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_mappings ⇒ Object
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 |