Class: GetStream::Generated::Models::ForkChannelResponse

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) }
  @members = attributes.fetch(:members) { attributes.fetch('members', nil) }
  @messages = attributes.fetch(:messages) { attributes.fetch('messages', nil) }
  @pinned_messages = attributes.fetch(:pinned_messages) { attributes.fetch('pinned_messages', nil) }
  @threads = attributes.fetch(:threads) { attributes.fetch('threads', nil) }
  @fork = attributes.fetch(:fork) { attributes.fetch('fork', nil) }
  @cooldown_remaining_ms = attributes.fetch(:cooldown_remaining_ms) { attributes.fetch('cooldown_remaining_ms', nil) }
  @hidden = attributes.fetch(:hidden) { attributes.fetch('hidden', nil) }
  @hide_messages_before = attributes.fetch(:hide_messages_before) { attributes.fetch('hide_messages_before', nil) }
  @watcher_count = attributes.fetch(:watcher_count) { attributes.fetch('watcher_count', nil) }
  @active_live_locations = attributes.fetch(:active_live_locations) { attributes.fetch('active_live_locations', nil) }
  @pending_messages = attributes.fetch(:pending_messages) { attributes.fetch('pending_messages', nil) }
  @read = attributes.fetch(:read) { attributes.fetch('read', nil) }
  @scheduled_messages = attributes.fetch(:scheduled_messages) { attributes.fetch('scheduled_messages', nil) }
  @watchers = attributes.fetch(:watchers) { attributes.fetch('watchers', nil) }
  @channel = attributes.fetch(:channel) { attributes.fetch('channel', nil) }
  @draft = attributes.fetch(:draft) { attributes.fetch('draft', nil) }
  @membership = attributes.fetch(:membership) { attributes.fetch('membership', nil) }
  @push_preferences = attributes.fetch(:push_preferences) { attributes.fetch('push_preferences', nil) }
end

Instance Attribute Details

#active_live_locations ⇒ Array<SharedLocationResponseData>

Returns Active live locations in the channel.

Returns:



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

def active_live_locations
  @active_live_locations
end

#channel ⇒ ChannelResponse

Returns Represents channel in chat.

Returns:



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

def channel
  @channel
end

#cooldown_remaining_ms ⇒ Integer

Returns Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down.

Returns:

  • (Integer) —

    Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down



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

def cooldown_remaining_ms
  @cooldown_remaining_ms
end

#draft ⇒ DraftResponse

Returns:



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

def draft
  @draft
end

#duration ⇒ String

Returns:

  • (String)


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

def duration
  @duration
end

#fork ⇒ ChannelForkResponse

Returns A fork of an agent channel.

Returns:



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

def fork
  @fork
end

#hidden ⇒ Boolean

Returns Whether this channel is hidden or not.

Returns:

  • (Boolean) —

    Whether this channel is hidden or not



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

def hidden
  @hidden
end

#hide_messages_before ⇒ DateTime

Returns Messages before this date are hidden from the user.

Returns:

  • (DateTime) —

    Messages before this date are hidden from the user



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

def hide_messages_before
  @hide_messages_before
end

#members ⇒ Array<ChannelMemberResponse>

Returns List of channel members.

Returns:



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

def members
  @members
end

#membership ⇒ ChannelMemberResponse



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

def membership
  @membership
end

#messages ⇒ Array<MessageResponse>

Returns List of channel messages.

Returns:



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

def messages
  @messages
end

#pending_messages ⇒ Array<PendingMessageResponse>

Returns Pending messages that this user has sent.

Returns:



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

def pending_messages
  @pending_messages
end

#pinned_messages ⇒ Array<MessageResponse>

Returns List of pinned messages in the channel.

Returns:



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

def pinned_messages
  @pinned_messages
end

#push_preferences ⇒ ChannelPushPreferencesResponse

Returns The push preference details.

Returns:



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

def push_preferences
  @push_preferences
end

#read ⇒ Array<ReadStateResponse>

Returns List of read states.

Returns:



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

def read
  @read
end

#scheduled_messages ⇒ Array<ScheduledMessageResponse>

Returns The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel or QueryChannels with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query.

Returns:

  • (Array<ScheduledMessageResponse>) —

    The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel or QueryChannels with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query



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

def scheduled_messages
  @scheduled_messages
end

#threads ⇒ Array<ThreadStateResponse>

Returns:



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

def threads
  @threads
end

#watcher_count ⇒ Integer

Returns Number of channel watchers.

Returns:

  • (Integer) —

    Number of channel watchers



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

def watcher_count
  @watcher_count
end

#watchers ⇒ Array<UserResponse>

Returns List of user who is watching the channel.

Returns:

  • (Array<UserResponse>) —

    List of user who is watching the channel



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

def watchers
  @watchers
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/getstream_ruby/generated/models/fork_channel_response.rb', line 95

def self.json_field_mappings
  {
    duration: 'duration',
    members: 'members',
    messages: 'messages',
    pinned_messages: 'pinned_messages',
    threads: 'threads',
    fork: 'fork',
    cooldown_remaining_ms: 'cooldown_remaining_ms',
    hidden: 'hidden',
    hide_messages_before: 'hide_messages_before',
    watcher_count: 'watcher_count',
    active_live_locations: 'active_live_locations',
    pending_messages: 'pending_messages',
    read: 'read',
    scheduled_messages: 'scheduled_messages',
    watchers: 'watchers',
    channel: 'channel',
    draft: 'draft',
    membership: 'membership',
    push_preferences: 'push_preferences'
  }
end