Class: GetStream::Generated::Models::FloodSimilarRuleParameters

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @min_text_length = attributes.fetch(:min_text_length) { attributes.fetch('min_text_length', nil) }
  @similarity_distance = attributes.fetch(:similarity_distance) { attributes.fetch('similarity_distance', nil) }
  @threshold = attributes.fetch(:threshold) { attributes.fetch('threshold', nil) }
  @time_window = attributes.fetch(:time_window) { attributes.fetch('time_window', nil) }
  @allowlist = attributes.fetch(:allowlist) { attributes.fetch('allowlist', nil) }
end

Instance Attribute Details

#allowlist ⇒ Array<String>

Returns:

  • (Array<String>)


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

def allowlist
  @allowlist
end

#min_text_length ⇒ Integer

Returns:

  • (Integer)


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

def min_text_length
  @min_text_length
end

#similarity_distance ⇒ Integer

Returns:

  • (Integer)


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

def similarity_distance
  @similarity_distance
end

#threshold ⇒ Integer

Returns:

  • (Integer)


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

def threshold
  @threshold
end

#time_window ⇒ String

Returns:

  • (String)


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

def time_window
  @time_window
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/flood_similar_rule_parameters.rb', line 39

def self.json_field_mappings
  {
    min_text_length: 'min_text_length',
    similarity_distance: 'similarity_distance',
    threshold: 'threshold',
    time_window: 'time_window',
    allowlist: 'allowlist'
  }
end