Class: GetStream::Generated::Models::SubmitActionRequest

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

Initialize with attributes



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 96

def initialize(attributes = {})
  super(attributes)
  @action_type = attributes.fetch(:action_type) { attributes.fetch('action_type', nil) }
  @appeal_id = attributes.fetch(:appeal_id) { attributes.fetch('appeal_id', nil) }
  @item_id = attributes.fetch(:item_id) { attributes.fetch('item_id', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @agent_recommendation = attributes.fetch(:agent_recommendation) { attributes.fetch('agent_recommendation', nil) }
  @ban = attributes.fetch(:ban) { attributes.fetch('ban', nil) }
  @block = attributes.fetch(:block) { attributes.fetch('block', nil) }
  @bypass = attributes.fetch(:bypass) { attributes.fetch('bypass', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
  @delete_activity = attributes.fetch(:delete_activity) { attributes.fetch('delete_activity', nil) }
  @delete_comment = attributes.fetch(:delete_comment) { attributes.fetch('delete_comment', nil) }
  @delete_message = attributes.fetch(:delete_message) { attributes.fetch('delete_message', nil) }
  @delete_poll = attributes.fetch(:delete_poll) { attributes.fetch('delete_poll', nil) }
  @delete_poll_answer = attributes.fetch(:delete_poll_answer) { attributes.fetch('delete_poll_answer', nil) }
  @delete_poll_option = attributes.fetch(:delete_poll_option) { attributes.fetch('delete_poll_option', nil) }
  @delete_reaction = attributes.fetch(:delete_reaction) { attributes.fetch('delete_reaction', nil) }
  @delete_user = attributes.fetch(:delete_user) { attributes.fetch('delete_user', nil) }
  @delete_user_messages = attributes.fetch(:delete_user_messages) { attributes.fetch('delete_user_messages', nil) }
  @escalate = attributes.fetch(:escalate) { attributes.fetch('escalate', nil) }
  @flag = attributes.fetch(:flag) { attributes.fetch('flag', nil) }
  @mark_reviewed = attributes.fetch(:mark_reviewed) { attributes.fetch('mark_reviewed', nil) }
  @reject_appeal = attributes.fetch(:reject_appeal) { attributes.fetch('reject_appeal', nil) }
  @restore = attributes.fetch(:restore) { attributes.fetch('restore', nil) }
  @shadow_block = attributes.fetch(:shadow_block) { attributes.fetch('shadow_block', nil) }
  @unban = attributes.fetch(:unban) { attributes.fetch('unban', nil) }
  @unblock = attributes.fetch(:unblock) { attributes.fetch('unblock', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#action_type ⇒ String

Returns Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate, agent_recommendation.

Returns:

  • (String) —

    Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate, agent_recommendation



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

def action_type
  @action_type
end

#agent_recommendation ⇒ AgentRecommendationPayload



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

def agent_recommendation
  @agent_recommendation
end

#appeal_id ⇒ String

Returns UUID of the appeal to act on (required for reject_appeal, optional for other actions).

Returns:

  • (String) —

    UUID of the appeal to act on (required for reject_appeal, optional for other actions)



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

def appeal_id
  @appeal_id
end

#ban ⇒ BanActionRequestPayload

Returns Configuration for ban moderation action.

Returns:



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

def ban
  @ban
end

#block ⇒ BlockActionRequestPayload

Returns Configuration for block action.

Returns:



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

def block
  @block
end

#bypass ⇒ BypassActionRequest

Returns:



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

def bypass
  @bypass
end

#custom ⇒ CustomActionRequestPayload

Returns Configuration for custom moderation action.

Returns:



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

def custom
  @custom
end

#delete_activity ⇒ DeleteActivityRequestPayload

Returns Configuration for activity deletion action.

Returns:



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

def delete_activity
  @delete_activity
end

#delete_comment ⇒ DeleteCommentRequestPayload

Returns Configuration for comment deletion action.

Returns:



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

def delete_comment
  @delete_comment
end

#delete_message ⇒ DeleteMessageRequestPayload

Returns Configuration for message deletion action.

Returns:



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

def delete_message
  @delete_message
end

#delete_poll ⇒ DeletePollRequestPayload

Returns Configuration for poll deletion action. Poll deletion is always permanent.

Returns:



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

def delete_poll
  @delete_poll
end

#delete_poll_answer ⇒ DeletePollAnswerRequestPayload

Returns Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept.

Returns:

  • (DeletePollAnswerRequestPayload) —

    Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept.



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

def delete_poll_answer
  @delete_poll_answer
end

#delete_poll_option ⇒ DeletePollOptionRequestPayload

Returns Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.

Returns:

  • (DeletePollOptionRequestPayload) —

    Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.



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

def delete_poll_option
  @delete_poll_option
end

#delete_reaction ⇒ DeleteReactionRequestPayload

Returns Configuration for reaction deletion action.

Returns:



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

def delete_reaction
  @delete_reaction
end

#delete_user ⇒ DeleteUserRequestPayload

Returns Configuration for user deletion action.

Returns:



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

def delete_user
  @delete_user
end

#delete_user_messages ⇒ DeleteUserMessagesRequestPayload

Returns Configuration for deleting all of a user's chat messages without banning them or deleting their account.

Returns:



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

def delete_user_messages
  @delete_user_messages
end

#escalate ⇒ EscalatePayload

Returns Configuration for escalation action.

Returns:



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

def escalate
  @escalate
end

#flag ⇒ FlagRequest

Returns:



71
72
73
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 71

def flag
  @flag
end

#item_id ⇒ String

Returns UUID of the review queue item to act on.

Returns:

  • (String) —

    UUID of the review queue item to act on



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

def item_id
  @item_id
end

#mark_reviewed ⇒ MarkReviewedRequestPayload

Returns Configuration for mark reviewed action.

Returns:



74
75
76
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 74

def mark_reviewed
  @mark_reviewed
end

#reject_appeal ⇒ RejectAppealRequestPayload

Returns Configuration for rejecting an appeal.

Returns:



77
78
79
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 77

def reject_appeal
  @reject_appeal
end

#restore ⇒ RestoreActionRequestPayload

Returns Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).

Returns:

  • (RestoreActionRequestPayload) —

    Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).



80
81
82
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 80

def restore
  @restore
end

#shadow_block ⇒ ShadowBlockActionRequestPayload

Returns Configuration for shadow block action.

Returns:



83
84
85
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 83

def shadow_block
  @shadow_block
end

#unban ⇒ UnbanActionRequestPayload

Returns Configuration for unban moderation action.

Returns:



86
87
88
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 86

def unban
  @unban
end

#unblock ⇒ Object

Deprecated.

This field is deprecated. @return [UnblockActionRequestPayload] Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action.



90
91
92
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 90

def unblock
  @unblock
end

#user ⇒ UserRequest

Returns User request object.

Returns:



93
94
95
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 93

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/getstream_ruby/generated/models/submit_action_request.rb', line 128

def self.json_field_mappings
  {
    action_type: 'action_type',
    appeal_id: 'appeal_id',
    item_id: 'item_id',
    user_id: 'user_id',
    agent_recommendation: 'agent_recommendation',
    ban: 'ban',
    block: 'block',
    bypass: 'bypass',
    custom: 'custom',
    delete_activity: 'delete_activity',
    delete_comment: 'delete_comment',
    delete_message: 'delete_message',
    delete_poll: 'delete_poll',
    delete_poll_answer: 'delete_poll_answer',
    delete_poll_option: 'delete_poll_option',
    delete_reaction: 'delete_reaction',
    delete_user: 'delete_user',
    delete_user_messages: 'delete_user_messages',
    escalate: 'escalate',
    flag: 'flag',
    mark_reviewed: 'mark_reviewed',
    reject_appeal: 'reject_appeal',
    restore: 'restore',
    shadow_block: 'shadow_block',
    unban: 'unban',
    unblock: 'unblock',
    user: 'user'
  }
end