Class: GetStream::Generated::Models::TextContentParameters

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @contains_url = attributes.fetch(:contains_url) { attributes.fetch('contains_url', nil) }
  @label_operator = attributes.fetch(:label_operator) { attributes.fetch('label_operator', nil) }
  @severity = attributes.fetch(:severity) { attributes.fetch('severity', nil) }
  @text_length = attributes.fetch(:text_length) { attributes.fetch('text_length', nil) }
  @text_length_operator = attributes.fetch(:text_length_operator) { attributes.fetch('text_length_operator', nil) }
  @blocklist_match = attributes.fetch(:blocklist_match) { attributes.fetch('blocklist_match', nil) }
  @harm_labels = attributes.fetch(:harm_labels) { attributes.fetch('harm_labels', nil) }
  @severities = attributes.fetch(:severities) { attributes.fetch('severities', nil) }
  @llm_harm_labels = attributes.fetch(:llm_harm_labels) { attributes.fetch('llm_harm_labels', nil) }
end

Instance Attribute Details

#blocklist_match ⇒ Array<String>

Returns:

  • (Array<String>)


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

def blocklist_match
  @blocklist_match
end

#contains_url ⇒ Boolean

Returns:

  • (Boolean)


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

def contains_url
  @contains_url
end

#harm_labels ⇒ Array<String>

Returns:

  • (Array<String>)


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

def harm_labels
  @harm_labels
end

#label_operator ⇒ String

Returns:

  • (String)


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

def label_operator
  @label_operator
end

#llm_harm_labels ⇒ Hash<String, String>

Returns:

  • (Hash<String, String>)


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

def llm_harm_labels
  @llm_harm_labels
end

#severities ⇒ Array<String>

Returns:

  • (Array<String>)


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

def severities
  @severities
end

#severity ⇒ String

Returns:

  • (String)


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

def severity
  @severity
end

#text_length ⇒ Integer

Returns:

  • (Integer)


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

def text_length
  @text_length
end

#text_length_operator ⇒ String

Returns:

  • (String)


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

def text_length_operator
  @text_length_operator
end

Class Method Details

.json_field_mappings ⇒ Object

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/text_content_parameters.rb', line 55

def self.json_field_mappings
  {
    contains_url: 'contains_url',
    label_operator: 'label_operator',
    severity: 'severity',
    text_length: 'text_length',
    text_length_operator: 'text_length_operator',
    blocklist_match: 'blocklist_match',
    harm_labels: 'harm_labels',
    severities: 'severities',
    llm_harm_labels: 'llm_harm_labels'
  }
end