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

Returns Whether auto translation is enabled or not.

Returns:

  • (Boolean)

    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_languageString

Returns Language to translate to when auto translation is active.

Returns:

  • (String)

    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

#blockedBoolean

Returns Whether this channel is blocked by current user or not.

Returns:

  • (Boolean)

    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

#cidString

Returns Channel CID (<type>:<id>).

Returns:

  • (String)

    Channel CID (<type>:<id>)



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

Returns Cooldown period after sending each message.

Returns:

  • (Integer)

    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_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    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_byUserResponse

Returns:



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

def created_by
  @created_by
end

#customObject

Returns Custom data for this object.

Returns:

  • (Object)

    Custom data for this object



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

def custom
  @custom
end

#deleted_atDateTime

Returns Date/time of deletion.

Returns:

  • (DateTime)

    Date/time of deletion



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

def deleted_at
  @deleted_at
end

#disabledBoolean

Returns:

  • (Boolean)


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

def disabled
  @disabled
end

#filter_tagsArray<String>

Returns List of filter tags associated with the channel.

Returns:

  • (Array<String>)

    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
  @filter_tags
end

#frozenBoolean

Returns Whether channel is frozen or not.

Returns:

  • (Boolean)

    Whether channel is frozen or not



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

def frozen
  @frozen
end

#hiddenBoolean

Returns Whether this channel is hidden by current user or not.

Returns:

  • (Boolean)

    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_beforeDateTime

Returns Date since when the message history is accessible.

Returns:

  • (DateTime)

    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
  @hide_messages_before
end

#idString

Returns Channel unique ID.

Returns:

  • (String)

    Channel unique ID



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

def id
  @id
end

#last_message_atDateTime

Returns Date of the last message sent.

Returns:

  • (DateTime)

    Date of the last message sent



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

def last_message_at
  @last_message_at
end

#member_countInteger

Returns Number of members in the channel.

Returns:

  • (Integer)

    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

#membersArray<ChannelMemberResponse>

Returns List of channel members (max 100).

Returns:



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

def members
  @members
end

#message_countInteger

Returns Number of messages in the channel.

Returns:

  • (Integer)

    Number of messages in the channel



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

def message_count
  @message_count
end

#mute_expires_atDateTime

Returns Date of mute expiration.

Returns:

  • (DateTime)

    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

#mutedBoolean

Returns Whether this channel is muted or not.

Returns:

  • (Boolean)

    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_capabilitiesArray<ChannelOwnCapability>

Returns List of channel capabilities of authenticated user.

Returns:



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

def own_capabilities
  @own_capabilities
end

#teamString

Returns Team the channel belongs to (multi-tenant only).

Returns:

  • (String)

    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_atDateTime

Returns Date of the latest truncation of the channel.

Returns:

  • (DateTime)

    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_byUserResponse

Returns:



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

def truncated_by
  @truncated_by
end

#typeString

Returns Type of the channel.

Returns:

  • (String)

    Type of the channel



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

def type
  @type
end

#updated_atDateTime

Returns Date/time of the last update.

Returns:

  • (DateTime)

    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_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