Class: GetStream::Generated::Models::MatchedBlocklist
- Defined in:
- lib/getstream_ruby/generated/models/matched_blocklist.rb
Instance Attribute Summary collapse
-
#matches ⇒ Array<String>
Distinct text the blocklist matched in the content, at most 10 values of up to 256 bytes each.
-
#name ⇒ String
Blocklist name, as set on the rule condition.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MatchedBlocklist
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ MatchedBlocklist
Initialize with attributes
20 21 22 23 24 |
# File 'lib/getstream_ruby/generated/models/matched_blocklist.rb', line 20 def initialize(attributes = {}) super(attributes) @name = attributes.fetch(:name) { attributes.fetch('name', nil) } @matches = attributes.fetch(:matches) { attributes.fetch('matches', nil) } end |
Instance Attribute Details
#matches ⇒ Array<String>
Returns Distinct text the blocklist matched in the content, at most 10 values of up to 256 bytes each. Word, email and domain blocklists report a single match, in the normalized form they compare, even when several words hit; regex lists and domain/email allowlists report every match, except that an allowlist with LLM domain validation enabled reports the one URL the check kept. Regex lists match on the text with invisible characters removed, except the built-in URL list, which reports the URL as it appears in the content. Can be empty when the blocklist hit but no value was recorded (for example a flag stored before this field existed).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/matched_blocklist.rb', line 17 def matches @matches end |
#name ⇒ String
Returns Blocklist name, as set on the rule condition.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/matched_blocklist.rb', line 14 def name @name 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/matched_blocklist.rb', line 27 def self.json_field_mappings { name: 'name', matches: 'matches' } end |