Class: GetStream::Generated::Models::QueryModerationRulesResponse

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

Initialize with attributes



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/getstream_ruby/generated/models/query_moderation_rules_response.rb', line 50

def initialize(attributes = {})
  super(attributes)
  @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) }
  @ai_image_label_definitions = attributes.fetch(:ai_image_label_definitions) { attributes.fetch('ai_image_label_definitions', nil) }
  @closed_caption_labels = attributes.fetch(:closed_caption_labels) { attributes.fetch('closed_caption_labels', nil) }
  @keyframe_labels = attributes.fetch(:keyframe_labels) { attributes.fetch('keyframe_labels', nil) }
  @ocr_labels = attributes.fetch(:ocr_labels) { attributes.fetch('ocr_labels', nil) }
  @rules = attributes.fetch(:rules) { attributes.fetch('rules', nil) }
  @ai_image_subclassifications = attributes.fetch(:ai_image_subclassifications) { attributes.fetch('ai_image_subclassifications', nil) }
  @default_llm_labels = attributes.fetch(:default_llm_labels) { attributes.fetch('default_llm_labels', nil) }
  @default_username_llm_labels = attributes.fetch(:default_username_llm_labels) { attributes.fetch('default_username_llm_labels', nil) }
  @keyframe_label_classifications = attributes.fetch(:keyframe_label_classifications) { attributes.fetch('keyframe_label_classifications', nil) }
  @next = attributes.fetch(:next) { attributes.fetch('next', nil) }
  @prev = attributes.fetch(:prev) { attributes.fetch('prev', nil) }
end

Instance Attribute Details

#ai_image_label_definitions ⇒ Array<AIImageLabelDefinition>

Returns AI image label definitions with metadata for dashboard rendering.

Returns:



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

def ai_image_label_definitions
  @ai_image_label_definitions
end

#ai_image_subclassifications ⇒ Hash<String, Array<String>>

Returns Stream L1 to leaf-level label name mapping for AI image rules.

Returns:

  • (Hash<String, Array<String>>) —

    Stream L1 to leaf-level label name mapping for AI image rules



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

def ai_image_subclassifications
  @ai_image_subclassifications
end

#closed_caption_labels ⇒ Array<String>

Returns Available harm labels for closed caption rules.

Returns:

  • (Array<String>) —

    Available harm labels for closed caption rules



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

def closed_caption_labels
  @closed_caption_labels
end

#default_llm_labels ⇒ Hash<String, String>

Returns Default LLM label descriptions.

Returns:

  • (Hash<String, String>) —

    Default LLM label descriptions



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

def default_llm_labels
  @default_llm_labels
end

#default_username_llm_labels ⇒ Hash<String, String>

Returns Recommended LLM label descriptions for username-scoped policies (key starts with 'username:'). Used by /moderation/v2/labels fast-path.

Returns:

  • (Hash<String, String>) —

    Recommended LLM label descriptions for username-scoped policies (key starts with 'username:'). Used by /moderation/v2/labels fast-path.



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

def default_username_llm_labels
  @default_username_llm_labels
end

#duration ⇒ String

Returns:

  • (String)


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

def duration
  @duration
end

#keyframe_label_classifications ⇒ Hash<String, Array<String>>

Returns L1 to L2 mapping of keyframe harm label classifications.

Returns:

  • (Hash<String, Array<String>>) —

    L1 to L2 mapping of keyframe harm label classifications



41
42
43
# File 'lib/getstream_ruby/generated/models/query_moderation_rules_response.rb', line 41

def keyframe_label_classifications
  @keyframe_label_classifications
end

#keyframe_labels ⇒ Array<String>

Returns Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules.

Returns:

  • (Array<String>) —

    Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules



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

def keyframe_labels
  @keyframe_labels
end

#next ⇒ String

Returns:

  • (String)


44
45
46
# File 'lib/getstream_ruby/generated/models/query_moderation_rules_response.rb', line 44

def next
  @next
end

#ocr_labels ⇒ Array<String>

Returns Available harm labels for OCR-based rule conditions (keyframe_ocr_rule and ocr_content). Mirrors closed_caption_labels today but kept as a separate field so the pickers can diverge later.

Returns:

  • (Array<String>) —

    Available harm labels for OCR-based rule conditions (keyframe_ocr_rule and ocr_content). Mirrors closed_caption_labels today but kept as a separate field so the pickers can diverge later.



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

def ocr_labels
  @ocr_labels
end

#prev ⇒ String

Returns:

  • (String)


47
48
49
# File 'lib/getstream_ruby/generated/models/query_moderation_rules_response.rb', line 47

def prev
  @prev
end

#rules ⇒ Array<ModerationRuleV2Response>

Returns List of moderation rules.

Returns:



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

def rules
  @rules
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/getstream_ruby/generated/models/query_moderation_rules_response.rb', line 67

def self.json_field_mappings
  {
    duration: 'duration',
    ai_image_label_definitions: 'ai_image_label_definitions',
    closed_caption_labels: 'closed_caption_labels',
    keyframe_labels: 'keyframe_labels',
    ocr_labels: 'ocr_labels',
    rules: 'rules',
    ai_image_subclassifications: 'ai_image_subclassifications',
    default_llm_labels: 'default_llm_labels',
    default_username_llm_labels: 'default_username_llm_labels',
    keyframe_label_classifications: 'keyframe_label_classifications',
    next: 'next',
    prev: 'prev'
  }
end