Class: GetStream::Generated::Models::SubmitModerationFeedbackRequest

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

Initialize with attributes



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 71

def initialize(attributes = {})
  super(attributes)
  @channel_id = attributes.fetch(:channel_id) { attributes.fetch('channel_id', nil) }
  @confidence = attributes.fetch(:confidence) { attributes.fetch('confidence', nil) }
  @current_recommended_action = attributes.fetch(:current_recommended_action) { attributes.fetch('current_recommended_action', nil) }
  @description = attributes.fetch(:description) { attributes.fetch('description', nil) }
  @entity_creator_id = attributes.fetch(:entity_creator_id) { attributes.fetch('entity_creator_id', nil) }
  @entity_id = attributes.fetch(:entity_id) { attributes.fetch('entity_id', nil) }
  @entity_type = attributes.fetch(:entity_type) { attributes.fetch('entity_type', nil) }
  @expected_recommended_action = attributes.fetch(:expected_recommended_action) { attributes.fetch('expected_recommended_action', nil) }
  @false_positive = attributes.fetch(:false_positive) { attributes.fetch('false_positive', nil) }
  @feedback_type = attributes.fetch(:feedback_type) { attributes.fetch('feedback_type', nil) }
  @message = attributes.fetch(:message) { attributes.fetch('message', nil) }
  @published_at = attributes.fetch(:published_at) { attributes.fetch('published_at', nil) }
  @reference = attributes.fetch(:reference) { attributes.fetch('reference', nil) }
  @review_queue_item_id = attributes.fetch(:review_queue_item_id) { attributes.fetch('review_queue_item_id', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @current_labels = attributes.fetch(:current_labels) { attributes.fetch('current_labels', nil) }
  @expected_labels = attributes.fetch(:expected_labels) { attributes.fetch('expected_labels', nil) }
  @items = attributes.fetch(:items) { attributes.fetch('items', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#channel_id ⇒ String

Returns Optional moderation channel UUID for context.

Returns:

  • (String) —

    Optional moderation channel UUID for context



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

def channel_id
  @channel_id
end

#confidence ⇒ String

Returns Moderator's confidence in this feedback (LOW, MEDIUM, HIGH, VERY_HIGH); forwarded to the moderation provider. Optional.

Returns:

  • (String) —

    Moderator's confidence in this feedback (LOW, MEDIUM, HIGH, VERY_HIGH); forwarded to the moderation provider. Optional



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

def confidence
  @confidence
end

#current_labels ⇒ Array<String>

Returns Classifications originally produced by the moderation system.

Returns:

  • (Array<String>) —

    Classifications originally produced by the moderation system



59
60
61
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 59

def current_labels
  @current_labels
end

Returns Action originally produced by the moderation system.

Returns:

  • (String) —

    Action originally produced by the moderation system



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

def current_recommended_action
  @current_recommended_action
end

#description ⇒ String

Returns Optional free-form note explaining why the classification was wrong.

Returns:

  • (String) —

    Optional free-form note explaining why the classification was wrong



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

def description
  @description
end

#entity_creator_id ⇒ String

Returns ID of the user who created the entity.

Returns:

  • (String) —

    ID of the user who created the entity



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

def entity_creator_id
  @entity_creator_id
end

#entity_id ⇒ String

Returns ID of the entity the items belong to.

Returns:

  • (String) —

    ID of the entity the items belong to



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

def entity_id
  @entity_id
end

#entity_type ⇒ String

Returns Type of the entity the items belong to.

Returns:

  • (String) —

    Type of the entity the items belong to



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

def entity_type
  @entity_type
end

#expected_labels ⇒ Array<String>

Returns Optional moderator-supplied classifications (up to 16 entries).

Returns:

  • (Array<String>) —

    Optional moderator-supplied classifications (up to 16 entries)



62
63
64
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 62

def expected_labels
  @expected_labels
end

Returns Optional moderator-supplied action.

Returns:

  • (String) —

    Optional moderator-supplied action



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

def expected_recommended_action
  @expected_recommended_action
end

#false_positive ⇒ Boolean

Returns Whether the referenced flags are marked (true, default) or unmarked (false) as false positives.

Returns:

  • (Boolean) —

    Whether the referenced flags are marked (true, default) or unmarked (false) as false positives



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

def false_positive
  @false_positive
end

#feedback_type ⇒ String

Returns false_positive (default) disputes existing detections; false_negative reports missed content: items carry the content, expected_labels is required and flag_id is not allowed.

Returns:

  • (String) —

    false_positive (default) disputes existing detections; false_negative reports missed content: items carry the content, expected_labels is required and flag_id is not allowed



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

def feedback_type
  @feedback_type
end

#items ⇒ Array<SubmitModerationFeedbackItem>

Returns Pieces of content of one entity the feedback is about (1 to 50).

Returns:



65
66
67
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 65

def items
  @items
end

#message ⇒ String

Returns The moderated content the moderator is providing feedback on. Required unless items is provided.

Returns:

  • (String) —

    The moderated content the moderator is providing feedback on. Required unless items is provided



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

def message
  @message
end

#published_at ⇒ String

Returns Original publication time of the moderated content (RFC3339). Required unless items is provided.

Returns:

  • (String) —

    Original publication time of the moderated content (RFC3339). Required unless items is provided



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

def published_at
  @published_at
end

#reference ⇒ String

Returns Provider-side reference identifying the moderated content. Required unless items is provided.

Returns:

  • (String) —

    Provider-side reference identifying the moderated content. Required unless items is provided



50
51
52
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 50

def reference
  @reference
end

#review_queue_item_id ⇒ String

Returns Review queue item the feedback targets, as an alternative to entity_type and entity_id.

Returns:

  • (String) —

    Review queue item the feedback targets, as an alternative to entity_type and entity_id



53
54
55
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 53

def review_queue_item_id
  @review_queue_item_id
end

#user ⇒ UserRequest

Returns User request object.

Returns:



68
69
70
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 68

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


56
57
58
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 56

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb', line 95

def self.json_field_mappings
  {
    channel_id: 'channel_id',
    confidence: 'confidence',
    current_recommended_action: 'current_recommended_action',
    description: 'description',
    entity_creator_id: 'entity_creator_id',
    entity_id: 'entity_id',
    entity_type: 'entity_type',
    expected_recommended_action: 'expected_recommended_action',
    false_positive: 'false_positive',
    feedback_type: 'feedback_type',
    message: 'message',
    published_at: 'published_at',
    reference: 'reference',
    review_queue_item_id: 'review_queue_item_id',
    user_id: 'user_id',
    current_labels: 'current_labels',
    expected_labels: 'expected_labels',
    items: 'items',
    user: 'user'
  }
end