Class: GetStream::Generated::Models::ChannelStateResponse

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

Initialize with attributes



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/getstream_ruby/generated/models/channel_state_response.rb', line 62

def initialize(attributes = {})
  super(attributes)
  @duration = attributes[:duration] || attributes['duration']
  @members = attributes[:members] || attributes['members']
  @messages = attributes[:messages] || attributes['messages']
  @pinned_messages = attributes[:pinned_messages] || attributes['pinned_messages']
  @threads = attributes[:threads] || attributes['threads']
  @hidden = attributes[:hidden] || attributes['hidden'] || nil
  @hide_messages_before = attributes[:hide_messages_before] || attributes['hide_messages_before'] || nil
  @watcher_count = attributes[:watcher_count] || attributes['watcher_count'] || nil
  @active_live_locations = attributes[:active_live_locations] || attributes['active_live_locations'] || nil
  @pending_messages = attributes[:pending_messages] || attributes['pending_messages'] || nil
  @read = attributes[:read] || attributes['read'] || nil
  @watchers = attributes[:watchers] || attributes['watchers'] || nil
  @channel = attributes[:channel] || attributes['channel'] || nil
  @draft = attributes[:draft] || attributes['draft'] || nil
  @membership = attributes[:membership] || attributes['membership'] || nil
  @push_preferences = attributes[:push_preferences] || attributes['push_preferences'] || nil
end

Instance Attribute Details

#active_live_locationsArray<SharedLocationResponseData>



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

def active_live_locations
  @active_live_locations
end

#channelChannelResponse



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

def channel
  @channel
end

#draftDraftResponse



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

def draft
  @draft
end

#durationString



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

def duration
  @duration
end

#hiddenBoolean



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

def hidden
  @hidden
end

#hide_messages_beforeDateTime



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

def hide_messages_before
  @hide_messages_before
end

#membersArray<ChannelMemberResponse>



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

def members
  @members
end

#membershipChannelMemberResponse



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

def membership
  @membership
end

#messagesArray<MessageResponse>



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

def messages
  @messages
end

#pending_messagesArray<PendingMessageResponse>



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

def pending_messages
  @pending_messages
end

#pinned_messagesArray<MessageResponse>



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

def pinned_messages
  @pinned_messages
end

#push_preferencesChannelPushPreferencesResponse



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

def push_preferences
  @push_preferences
end

#readArray<ReadStateResponse>



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

def read
  @read
end

#threadsArray<ThreadStateResponse>



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

def threads
  @threads
end

#watcher_countInteger



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

def watcher_count
  @watcher_count
end

#watchersArray<UserResponse>



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

def watchers
  @watchers
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/getstream_ruby/generated/models/channel_state_response.rb', line 83

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