Class: GetStream::Generated::Models::ChannelResponse
- Defined in:
- lib/getstream_ruby/generated/models/channel_response.rb
Overview
Represents channel in chat
Instance Attribute Summary collapse
-
#active_member_count ⇒ Integer
Number of members who are not deactivated or deleted.
-
#auto_translation_enabled ⇒ Boolean
Whether auto translation is enabled or not.
-
#auto_translation_language ⇒ String
Language (or comma-separated list of languages) to translate to when auto translation is active.
-
#blocked ⇒ Boolean
Whether this channel is blocked by current user or not.
-
#cid ⇒ String
Channel CID (
: ). - #config ⇒ ChannelConfigWithInfo
-
#cooldown ⇒ Integer
Cooldown period after sending each message.
-
#created_at ⇒ DateTime
Date/time of creation.
-
#created_by ⇒ UserResponse
User response object.
-
#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.
-
#fork ⇒ ChannelForkSummary
A fork of an agent 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
User response object.
-
#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
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 129 130 131 132 133 134 135 136 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 104 def initialize(attributes = {}) super(attributes) @cid = attributes.fetch(:cid) { attributes.fetch('cid', nil) } @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } @disabled = attributes.fetch(:disabled) { attributes.fetch('disabled', nil) } @frozen = attributes.fetch(:frozen) { attributes.fetch('frozen', nil) } @id = attributes.fetch(:id) { attributes.fetch('id', nil) } @type = attributes.fetch(:type) { attributes.fetch('type', nil) } @updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) } @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) } @active_member_count = attributes.fetch(:active_member_count) { attributes.fetch('active_member_count', nil) } @auto_translation_enabled = attributes.fetch(:auto_translation_enabled) { attributes.fetch('auto_translation_enabled', nil) } @auto_translation_language = attributes.fetch(:auto_translation_language) { attributes.fetch('auto_translation_language', nil) } @blocked = attributes.fetch(:blocked) { attributes.fetch('blocked', nil) } @cooldown = attributes.fetch(:cooldown) { attributes.fetch('cooldown', nil) } @deleted_at = attributes.fetch(:deleted_at) { attributes.fetch('deleted_at', nil) } @hidden = attributes.fetch(:hidden) { attributes.fetch('hidden', nil) } @hide_messages_before = attributes.fetch(:hide_messages_before) { attributes.fetch('hide_messages_before', nil) } @last_message_at = attributes.fetch(:last_message_at) { attributes.fetch('last_message_at', nil) } @member_count = attributes.fetch(:member_count) { attributes.fetch('member_count', nil) } @message_count = attributes.fetch(:message_count) { attributes.fetch('message_count', nil) } @mute_expires_at = attributes.fetch(:mute_expires_at) { attributes.fetch('mute_expires_at', nil) } @muted = attributes.fetch(:muted) { attributes.fetch('muted', nil) } @team = attributes.fetch(:team) { attributes.fetch('team', nil) } @truncated_at = attributes.fetch(:truncated_at) { attributes.fetch('truncated_at', nil) } @filter_tags = attributes.fetch(:filter_tags) { attributes.fetch('filter_tags', nil) } @members = attributes.fetch(:members) { attributes.fetch('members', nil) } @own_capabilities = attributes.fetch(:own_capabilities) { attributes.fetch('own_capabilities', nil) } @config = attributes.fetch(:config) { attributes.fetch('config', nil) } @created_by = attributes.fetch(:created_by) { attributes.fetch('created_by', nil) } @fork = attributes.fetch(:fork) { attributes.fetch('fork', nil) } @truncated_by = attributes.fetch(:truncated_by) { attributes.fetch('truncated_by', nil) } end |
Instance Attribute Details
#active_member_count ⇒ Integer
Returns Number of members who are not deactivated or deleted.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 38 def active_member_count @active_member_count end |
#auto_translation_enabled ⇒ Boolean
Returns Whether auto translation is enabled or not.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 41 def auto_translation_enabled @auto_translation_enabled end |
#auto_translation_language ⇒ String
Returns Language (or comma-separated list of languages) to translate to when auto translation is active.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 44 def auto_translation_language @auto_translation_language end |
#blocked ⇒ Boolean
Returns Whether this channel is blocked by current user or not.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 47 def blocked @blocked end |
#cid ⇒ String
Returns Channel CID (
14 15 16 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 14 def cid @cid end |
#config ⇒ ChannelConfigWithInfo
92 93 94 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 92 def config @config end |
#cooldown ⇒ Integer
Returns Cooldown period after sending each message.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 50 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
Returns User response object.
95 96 97 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 95 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.
53 54 55 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 53 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.
83 84 85 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 83 def @filter_tags end |
#fork ⇒ ChannelForkSummary
Returns A fork of an agent channel.
98 99 100 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 98 def fork @fork 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.
56 57 58 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 56 def hidden @hidden end |
#hide_messages_before ⇒ DateTime
Returns Date since when the message history is accessible.
59 60 61 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 59 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.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 62 def @last_message_at end |
#member_count ⇒ Integer
Returns Number of members in the channel.
65 66 67 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 65 def member_count @member_count end |
#members ⇒ Array<ChannelMemberResponse>
Returns List of channel members (max 100).
86 87 88 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 86 def members @members end |
#message_count ⇒ Integer
Returns Number of messages in the channel.
68 69 70 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 68 def @message_count end |
#mute_expires_at ⇒ DateTime
Returns Date of mute expiration.
71 72 73 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 71 def mute_expires_at @mute_expires_at end |
#muted ⇒ Boolean
Returns Whether this channel is muted or not.
74 75 76 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 74 def muted @muted end |
#own_capabilities ⇒ Array<ChannelOwnCapability>
Returns List of channel capabilities of authenticated user.
89 90 91 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 89 def own_capabilities @own_capabilities end |
#team ⇒ String
Returns Team the channel belongs to (multi-tenant only).
77 78 79 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 77 def team @team end |
#truncated_at ⇒ DateTime
Returns Date of the latest truncation of the channel.
80 81 82 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 80 def truncated_at @truncated_at end |
#truncated_by ⇒ UserResponse
Returns User response object.
101 102 103 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 101 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
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/getstream_ruby/generated/models/channel_response.rb', line 139 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', active_member_count: 'active_member_count', 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', fork: 'fork', truncated_by: 'truncated_by' } end |