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



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/getstream_ruby/generated/models/add_comment_request.rb', line 53

def initialize(attributes = {})
  super(attributes)
  @comment = attributes[:comment] || attributes['comment'] || nil
  @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @object_id = attributes[:object_id] || attributes['object_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

#attachmentsArray<Attachment>

Returns Media attachments for the reply.

Returns:

  • (Array<Attachment>)

    Media attachments for the reply



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

def attachments
  @attachments
end

#commentString

Returns Text content of the comment.

Returns:

  • (String)

    Text content of the comment



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

def comment
  @comment
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



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

def create_notification_activity
  @create_notification_activity
end

#customObject

Returns Custom data for the comment.

Returns:

  • (Object)

    Custom data for the comment



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

def custom
  @custom
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.



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

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



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

def mentioned_user_ids
  @mentioned_user_ids
end

#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



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

def object_id
  @object_id
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



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

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.



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

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



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

def skip_enrich_url
  @skip_enrich_url
end

#skip_pushBoolean

Returns:

  • (Boolean)


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

def skip_push
  @skip_push
end

#userUserRequest

Returns:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    comment: 'comment',
    create_notification_activity: 'create_notification_activity',
    id: 'id',
    object_id: 'object_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