Class: GetStream::Generated::Models::OwnUser

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

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/own_user.rb', line 98

def initialize(attributes = {})
  super(attributes)
  @banned = attributes[:banned] || attributes['banned']
  @created_at = attributes[:created_at] || attributes['created_at']
  @id = attributes[:id] || attributes['id']
  @language = attributes[:language] || attributes['language']
  @online = attributes[:online] || attributes['online']
  @role = attributes[:role] || attributes['role']
  @total_unread_count = attributes[:total_unread_count] || attributes['total_unread_count']
  @unread_channels = attributes[:unread_channels] || attributes['unread_channels']
  @unread_count = attributes[:unread_count] || attributes['unread_count']
  @unread_threads = attributes[:unread_threads] || attributes['unread_threads']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @channel_mutes = attributes[:channel_mutes] || attributes['channel_mutes']
  @devices = attributes[:devices] || attributes['devices']
  @mutes = attributes[:mutes] || attributes['mutes']
  @custom = attributes[:custom] || attributes['custom']
  @total_unread_count_by_team = attributes[:total_unread_count_by_team] || attributes['total_unread_count_by_team']
  @avg_response_time = attributes[:avg_response_time] || attributes['avg_response_time'] || nil
  @deactivated_at = attributes[:deactivated_at] || attributes['deactivated_at'] || nil
  @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil
  @invisible = attributes[:invisible] || attributes['invisible'] || nil
  @last_active = attributes[:last_active] || attributes['last_active'] || nil
  @last_engaged_at = attributes[:last_engaged_at] || attributes['last_engaged_at'] || nil
  @blocked_user_ids = attributes[:blocked_user_ids] || attributes['blocked_user_ids'] || nil
  @latest_hidden_channels = attributes[:latest_hidden_channels] || attributes['latest_hidden_channels'] || nil
  @teams = attributes[:teams] || attributes['teams'] || nil
  @privacy_settings = attributes[:privacy_settings] || attributes['privacy_settings'] || nil
  @push_preferences = attributes[:push_preferences] || attributes['push_preferences'] || nil
  @teams_role = attributes[:teams_role] || attributes['teams_role'] || nil
end

Instance Attribute Details

#avg_response_timeInteger

Returns:

  • (Integer)


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

def avg_response_time
  @avg_response_time
end

#bannedBoolean

Returns:

  • (Boolean)


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

def banned
  @banned
end

#blocked_user_idsArray<String>

Returns:

  • (Array<String>)


80
81
82
# File 'lib/getstream_ruby/generated/models/own_user.rb', line 80

def blocked_user_ids
  @blocked_user_ids
end

#channel_mutesArray<ChannelMute>

Returns:



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

def channel_mutes
  @channel_mutes
end

#created_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#deactivated_atDateTime

Returns:

  • (DateTime)


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

def deactivated_at
  @deactivated_at
end

#deleted_atDateTime

Returns:

  • (DateTime)


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

def deleted_at
  @deleted_at
end

#devicesArray<Device>

Returns:



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

def devices
  @devices
end

#idString

Returns:

  • (String)


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

def id
  @id
end

#invisibleBoolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/getstream_ruby/generated/models/own_user.rb', line 71

def invisible
  @invisible
end

#languageString

Returns:

  • (String)


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

def language
  @language
end

#last_activeDateTime

Returns:

  • (DateTime)


74
75
76
# File 'lib/getstream_ruby/generated/models/own_user.rb', line 74

def last_active
  @last_active
end

#last_engaged_atDateTime

Returns:

  • (DateTime)


77
78
79
# File 'lib/getstream_ruby/generated/models/own_user.rb', line 77

def last_engaged_at
  @last_engaged_at
end

#latest_hidden_channelsArray<String>

Returns:

  • (Array<String>)


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

def latest_hidden_channels
  @latest_hidden_channels
end

#mutesArray<UserMute>

Returns:



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

def mutes
  @mutes
end

#onlineBoolean

Returns:

  • (Boolean)


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

def online
  @online
end

#privacy_settingsPrivacySettings

Returns:



89
90
91
# File 'lib/getstream_ruby/generated/models/own_user.rb', line 89

def privacy_settings
  @privacy_settings
end

#push_preferencesPushPreferences

Returns:



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

def push_preferences
  @push_preferences
end

#roleString

Returns:

  • (String)


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

def role
  @role
end

#teamsArray<String>

Returns:

  • (Array<String>)


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

def teams
  @teams
end

#teams_roleHash<String, String>

Returns:

  • (Hash<String, String>)


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

def teams_role
  @teams_role
end

#total_unread_countInteger

Returns:

  • (Integer)


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

def total_unread_count
  @total_unread_count
end

#total_unread_count_by_teamHash<String, Integer>

Returns:

  • (Hash<String, Integer>)


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

def total_unread_count_by_team
  @total_unread_count_by_team
end

#unread_channelsInteger

Returns:

  • (Integer)


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

def unread_channels
  @unread_channels
end

#unread_countInteger

Returns:

  • (Integer)


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

def unread_count
  @unread_count
end

#unread_threadsInteger

Returns:

  • (Integer)


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

def unread_threads
  @unread_threads
end

#updated_atDateTime

Returns:

  • (DateTime)


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

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/own_user.rb', line 131

def self.json_field_mappings
  {
    banned: 'banned',
    created_at: 'created_at',
    id: 'id',
    language: 'language',
    online: 'online',
    role: 'role',
    total_unread_count: 'total_unread_count',
    unread_channels: 'unread_channels',
    unread_count: 'unread_count',
    unread_threads: 'unread_threads',
    updated_at: 'updated_at',
    channel_mutes: 'channel_mutes',
    devices: 'devices',
    mutes: 'mutes',
    custom: 'custom',
    total_unread_count_by_team: 'total_unread_count_by_team',
    avg_response_time: 'avg_response_time',
    deactivated_at: 'deactivated_at',
    deleted_at: 'deleted_at',
    invisible: 'invisible',
    last_active: 'last_active',
    last_engaged_at: 'last_engaged_at',
    blocked_user_ids: 'blocked_user_ids',
    latest_hidden_channels: 'latest_hidden_channels',
    teams: 'teams',
    privacy_settings: 'privacy_settings',
    push_preferences: 'push_preferences',
    teams_role: 'teams_role'
  }
end