Class: GetStream::Generated::Models::ForkChannelRequest

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

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/fork_channel_request.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) }
  @channel = attributes.fetch(:channel) { attributes.fetch('channel', nil) }
  @exclude_attachments = attributes.fetch(:exclude_attachments) { attributes.fetch('exclude_attachments', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#channel ⇒ ForkChannelTarget

Returns The channel a fork creates.

Returns:



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

def channel
  @channel
end

#exclude_attachments ⇒ Boolean

Returns When true, the copied messages carry no attachments. By default attachments are copied.

Returns:

  • (Boolean) —

    When true, the copied messages carry no attachments. By default attachments are copied



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

def exclude_attachments
  @exclude_attachments
end

#message_id ⇒ String

Returns ID of the top-level message to fork at. The fork copies the visible messages created up to it, itself included, and their replies up to it. Fork only at a message the agent has finished writing: a message still being streamed is copied as it is at the time of the fork.

Returns:

  • (String) —

    ID of the top-level message to fork at. The fork copies the visible messages created up to it, itself included, and their replies up to it. Fork only at a message the agent has finished writing: a message still being streamed is copied as it is at the time of the fork



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

def message_id
  @message_id
end

#user ⇒ UserRequest

Returns User request object.

Returns:



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

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/fork_channel_request.rb', line 39

def self.json_field_mappings
  {
    message_id: 'message_id',
    channel: 'channel',
    exclude_attachments: 'exclude_attachments',
    user_id: 'user_id',
    user: 'user'
  }
end