Class: GetStream::Generated::Models::SearchAllMessagesSection

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

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/search_all_messages_section.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @next = attributes.fetch(:next) { attributes.fetch('next', nil) }
  @results = attributes.fetch(:results) { attributes.fetch('results', nil) }
  @error = attributes.fetch(:error) { attributes.fetch('error', nil) }
  @results_warning = attributes.fetch(:results_warning) { attributes.fetch('results_warning', nil) }
  @warning = attributes.fetch(:warning) { attributes.fetch('warning', nil) }
end

Instance Attribute Details

#error ⇒ SearchAllSectionError



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

def error
  @error
end

#next ⇒ String

Returns Opaque cursor for the next page of this section, present only when more results exist. Pass it back under next.messages with the same query.

Returns:

  • (String) —

    Opaque cursor for the next page of this section, present only when more results exist. Pass it back under next.messages with the same query



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

def next
  @next
end

#results ⇒ Array<SearchResult>

Returns Matching messages, newest first, in the same shape as the search endpoint's results.

Returns:

  • (Array<SearchResult>) —

    Matching messages, newest first, in the same shape as the search endpoint's results



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

def results
  @results
end

#results_warning ⇒ SearchWarning

Returns:



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

def results_warning
  @results_warning
end

#warning ⇒ SearchAllWarning

Returns:



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

def warning
  @warning
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/search_all_messages_section.rb', line 39

def self.json_field_mappings
  {
    next: 'next',
    results: 'results',
    error: 'error',
    results_warning: 'results_warning',
    warning: 'warning'
  }
end