Class: GetStream::Generated::Models::AddCommentRequest

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

Returns ID of the object to comment on. Required for root comments.

Returns:

  • (String)

    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

#attachmentsArray<Attachment>

Returns Media attachments for the reply.

Returns:

  • (Array<Attachment>)

    Media attachments for the reply



48
49
50
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 48

def attachments
  @attachments
end

#commentString

Returns Text content of the comment.

Returns:

  • (String)

    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_notificationObject

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



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_activityBoolean

Returns Whether to create a notification activity for this comment.

Returns:

  • (Boolean)

    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

#customObject

Returns Custom data for the comment.

Returns:

  • (Object)

    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_moderationBoolean

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.

Returns:

  • (Boolean)

    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

#idString

Returns Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated.

Returns:

  • (String)

    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_idsArray<String>

Returns List of users mentioned in the reply.

Returns:

  • (Array<String>)

    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_typeString

Returns Type of the object to comment on. Required for root comments.

Returns:

  • (String)

    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_idString

Returns ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment.

Returns:

  • (String)

    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_urlBoolean

Returns Whether to skip URL enrichment for this comment.

Returns:

  • (Boolean)

    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_pushBoolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 42

def skip_push
  @skip_push
end

#userUserRequest

Returns:



57
58
59
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 57

def user
  @user
end

#user_idString

Returns:

  • (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_mappingsObject

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