Class: GetStream::Generated::Models::FollowRequest

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

Initialize with attributes



48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 48

def initialize(attributes = {})
  super(attributes)
  @source = attributes[:source] || attributes['source']
  @target = attributes[:target] || attributes['target']
  @activity_copy_limit = attributes[:activity_copy_limit] || attributes['activity_copy_limit'] || 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
  @create_users = attributes[:create_users] || attributes['create_users'] || nil
  @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil
  @push_preference = attributes[:push_preference] || attributes['push_preference'] || nil
  @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
  @status = attributes[:status] || attributes['status'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
end

Instance Attribute Details

#activity_copy_limitInteger

Returns Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.

Returns:

  • (Integer)

    Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.



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

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



24
25
26
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 24

def copy_custom_to_notification
  @copy_custom_to_notification
end

#create_notification_activityBoolean

Returns Whether to create a notification activity for this follow.

Returns:

  • (Boolean)

    Whether to create a notification activity for this follow



27
28
29
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 27

def create_notification_activity
  @create_notification_activity
end

#create_usersBoolean

Returns If true, auto-creates users referenced by the source and target FIDs when they don’t already exist. Server-side only. Defaults to false. For FollowBatch/GetOrCreateFollows, use the top-level create_users field; per-item follows.create_users is rejected.

Returns:

  • (Boolean)

    If true, auto-creates users referenced by the source and target FIDs when they don’t already exist. Server-side only. Defaults to false. For FollowBatch/GetOrCreateFollows, use the top-level create_users field; per-item follows.create_users is rejected.



30
31
32
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 30

def create_users
  @create_users
end

#customObject

Returns Custom data for the follow relationship.

Returns:

  • (Object)

    Custom data for the follow relationship



45
46
47
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 45

def custom
  @custom
end

#enrich_own_fieldsBoolean

Returns If true, enriches the follow’s source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.

Returns:

  • (Boolean)

    If true, enriches the follow’s source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.



33
34
35
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 33

def enrich_own_fields
  @enrich_own_fields
end

#push_preferenceString

Returns Push preference for the follow relationship.

Returns:

  • (String)

    Push preference for the follow relationship



36
37
38
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 36

def push_preference
  @push_preference
end

#skip_pushBoolean

Returns Whether to skip push for this follow.

Returns:

  • (Boolean)

    Whether to skip push for this follow



39
40
41
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 39

def skip_push
  @skip_push
end

#sourceString

Returns Fully qualified ID of the source feed.

Returns:

  • (String)

    Fully qualified ID of the source feed



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

def source
  @source
end

#statusString

Returns Status of the follow relationship. One of: accepted, pending, rejected.

Returns:

  • (String)

    Status of the follow relationship. One of: accepted, pending, rejected



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

def status
  @status
end

#targetString

Returns Fully qualified ID of the target feed.

Returns:

  • (String)

    Fully qualified ID of the target feed



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

def target
  @target
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/getstream_ruby/generated/models/follow_request.rb', line 64

def self.json_field_mappings
  {
    source: 'source',
    target: 'target',
    activity_copy_limit: 'activity_copy_limit',
    copy_custom_to_notification: 'copy_custom_to_notification',
    create_notification_activity: 'create_notification_activity',
    create_users: 'create_users',
    enrich_own_fields: 'enrich_own_fields',
    push_preference: 'push_preference',
    skip_push: 'skip_push',
    status: 'status',
    custom: 'custom'
  }
end