Class: GetStream::Generated::Models::TruncateChannelRequest

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

Initialize with attributes



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/truncate_channel_request.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @hard_delete = attributes[:hard_delete] || attributes['hard_delete'] || nil
  @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
  @truncated_at = attributes[:truncated_at] || attributes['truncated_at'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @member_ids = attributes[:member_ids] || attributes['member_ids'] || nil
  @message = attributes[:message] || attributes['message'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#hard_deleteBoolean

Returns Permanently delete channel data (messages, reactions, etc.).

Returns:

  • (Boolean)

    Permanently delete channel data (messages, reactions, etc.)



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

def hard_delete
  @hard_delete
end

#member_idsArray<String>

Returns List of member IDs to hide message history for. If empty, truncates the channel for all members.

Returns:

  • (Array<String>)

    List of member IDs to hide message history for. If empty, truncates the channel for all members



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

def member_ids
  @member_ids
end

#messageMessageRequest

Returns:



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

def message
  @message
end

#skip_pushBoolean

Returns When ‘message` is set disables all push notifications for it.

Returns:

  • (Boolean)

    When ‘message` is set disables all push notifications for it



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

def skip_push
  @skip_push
end

#truncated_atDateTime

Returns Truncate channel data up to ‘truncated_at`. The system message (if provided) creation time is always greater than `truncated_at`.

Returns:

  • (DateTime)

    Truncate channel data up to ‘truncated_at`. The system message (if provided) creation time is always greater than `truncated_at`



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

def truncated_at
  @truncated_at
end

#userUserRequest

Returns:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/truncate_channel_request.rb', line 47

def self.json_field_mappings
  {
    hard_delete: 'hard_delete',
    skip_push: 'skip_push',
    truncated_at: 'truncated_at',
    user_id: 'user_id',
    member_ids: 'member_ids',
    message: 'message',
    user: 'user'
  }
end