Class: GetStream::Generated::Models::MessageMarksConfig

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/message_marks_config.rb

Overview

The app's message marks policy: the mark types it defines or overrides, and the privacy switch. The channel type's mark_types says which of them are on in its channels.

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 = {}) ⇒ MessageMarksConfig

Initialize with attributes



20
21
22
23
24
# File 'lib/getstream_ruby/generated/models/message_marks_config.rb', line 20

def initialize(attributes = {})
  super(attributes)
  @privacy = attributes.fetch(:privacy) { attributes.fetch('privacy', nil) }
  @types = attributes.fetch(:types) { attributes.fetch('types', nil) }
end

Instance Attribute Details

#privacy ⇒ MarkPrivacyConfig

Returns How marks follow the marker's privacy settings.

Returns:



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

def privacy
  @privacy
end

#types ⇒ Hash<String, MarkTypeConfig>

Returns Mark type definitions by name. A built-in name such as played overrides its defaults; a custom name must be namespaced, for example acme.viewed. At most 20 types.

Returns:

  • (Hash<String, MarkTypeConfig>) —

    Mark type definitions by name. A built-in name such as played overrides its defaults; a custom name must be namespaced, for example acme.viewed. At most 20 types



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

def types
  @types
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/message_marks_config.rb', line 27

def self.json_field_mappings
  {
    privacy: 'privacy',
    types: 'types'
  }
end