Class: GetStream::Generated::Models::ChannelMetadata

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

Initialize with attributes



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/channel_metadata.rb', line 41

def initialize(attributes = {})
  super(attributes)
  @cid = attributes[:cid] || attributes['cid']
  @id = attributes[:id] || attributes['id']
  @type = attributes[:type] || attributes['type']
  @custom = attributes[:custom] || attributes['custom']
  @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
  @push_level = attributes[:push_level] || attributes['push_level'] || nil
  @team = attributes[:team] || attributes['team'] || nil
end

Instance Attribute Details

#cidString

Returns:

  • (String)


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

def cid
  @cid
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#idString

Returns:

  • (String)


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

def id
  @id
end

#last_message_atDateTime

Returns:

  • (DateTime)


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

def last_message_at
  @last_message_at
end

#member_countInteger

Returns:

  • (Integer)


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

def member_count
  @member_count
end

#message_countInteger

Returns:

  • (Integer)


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

def message_count
  @message_count
end

#push_levelString

Returns:

  • (String)


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

def push_level
  @push_level
end

#teamString

Returns:

  • (String)


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

def team
  @team
end

#typeString

Returns:

  • (String)


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

def type
  @type
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/getstream_ruby/generated/models/channel_metadata.rb', line 55

def self.json_field_mappings
  {
    cid: 'cid',
    id: 'id',
    type: 'type',
    custom: 'custom',
    last_message_at: 'last_message_at',
    member_count: 'member_count',
    message_count: 'message_count',
    push_level: 'push_level',
    team: 'team'
  }
end