Class: GetStream::Generated::Models::AddCommentRequest
- Defined in:
- lib/getstream_ruby/generated/models/add_comment_request.rb
Instance Attribute Summary collapse
-
#_object_id ⇒ String
ID of the object to comment on.
-
#attachments ⇒ Array<Attachment>
Media attachments for the reply.
-
#comment ⇒ String
Text content of the comment.
-
#copy_custom_to_notification ⇒ Object
deprecated
Deprecated.
This field is deprecated. @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
-
#create_notification_activity ⇒ Boolean
Whether to create a notification activity for this comment.
-
#custom ⇒ Object
Custom data for the comment.
-
#force_moderation ⇒ Boolean
If true, forces moderation to run for server-side requests.
-
#id ⇒ String
Optional custom ID for the comment (max 255 characters).
-
#mentioned_user_ids ⇒ Array<String>
List of users mentioned in the reply.
-
#object_type ⇒ String
Type of the object to comment on.
-
#parent_id ⇒ String
ID of parent comment for replies.
-
#skip_enrich_url ⇒ Boolean
Whether to skip URL enrichment for this comment.
- #skip_push ⇒ Boolean
- #user ⇒ UserRequest
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AddCommentRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AddCommentRequest
Initialize with attributes
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 60 def initialize(attributes = {}) super(attributes) @_object_id = attributes[:_object_id] || attributes['object_id'] || nil @comment = attributes[:comment] || attributes['comment'] || nil @copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil @force_moderation = attributes[:force_moderation] || attributes['force_moderation'] || nil @id = attributes[:id] || attributes['id'] || nil @object_type = attributes[:object_type] || attributes['object_type'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @mentioned_user_ids = attributes[:mentioned_user_ids] || attributes['mentioned_user_ids'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#_object_id ⇒ String
Returns ID of the object to comment on. Required for root comments.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 14 def _object_id @_object_id end |
#attachments ⇒ Array<Attachment>
Returns Media attachments for the reply.
48 49 50 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 48 def @attachments end |
#comment ⇒ String
Returns Text content of the comment.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 17 def comment @comment end |
#copy_custom_to_notification ⇒ Object
This field is deprecated. @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21 22 23 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 21 def copy_custom_to_notification @copy_custom_to_notification end |
#create_notification_activity ⇒ Boolean
Returns Whether to create a notification activity for this comment.
24 25 26 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 24 def create_notification_activity @create_notification_activity end |
#custom ⇒ Object
Returns Custom data for the comment.
54 55 56 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 54 def custom @custom end |
#force_moderation ⇒ Boolean
Returns If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
27 28 29 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 27 def force_moderation @force_moderation end |
#id ⇒ String
Returns Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated.
30 31 32 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 30 def id @id end |
#mentioned_user_ids ⇒ Array<String>
Returns List of users mentioned in the reply.
51 52 53 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 51 def mentioned_user_ids @mentioned_user_ids end |
#object_type ⇒ String
Returns Type of the object to comment on. Required for root comments.
33 34 35 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 33 def object_type @object_type end |
#parent_id ⇒ String
Returns ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment.
36 37 38 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 36 def parent_id @parent_id end |
#skip_enrich_url ⇒ Boolean
Returns Whether to skip URL enrichment for this comment.
39 40 41 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 39 def skip_enrich_url @skip_enrich_url end |
#skip_push ⇒ Boolean
42 43 44 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 42 def skip_push @skip_push end |
#user ⇒ UserRequest
57 58 59 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 57 def user @user end |
#user_id ⇒ String
45 46 47 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 45 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 80 def self.json_field_mappings { _object_id: 'object_id', comment: 'comment', copy_custom_to_notification: 'copy_custom_to_notification', create_notification_activity: 'create_notification_activity', force_moderation: 'force_moderation', id: 'id', object_type: 'object_type', parent_id: 'parent_id', skip_enrich_url: 'skip_enrich_url', skip_push: 'skip_push', user_id: 'user_id', attachments: 'attachments', mentioned_user_ids: 'mentioned_user_ids', custom: 'custom', user: 'user' } end |