Class: GetStream::Generated::Models::EnrichmentOptions

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/enrichment_options.rb

Overview

Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.

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 = {}) ⇒ EnrichmentOptions

Initialize with attributes



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 80

def initialize(attributes = {})
  super(attributes)
  @enrich_own_followings = attributes.fetch(:enrich_own_followings) { attributes.fetch('enrich_own_followings', nil) }
  @include_flat_activities = attributes.fetch(:include_flat_activities) { attributes.fetch('include_flat_activities', nil) }
  @include_ranking_config = attributes.fetch(:include_ranking_config) { attributes.fetch('include_ranking_config', nil) }
  @include_reasons = attributes.fetch(:include_reasons) { attributes.fetch('include_reasons', nil) }
  @include_score_vars = attributes.fetch(:include_score_vars) { attributes.fetch('include_score_vars', nil) }
  @skip_activity = attributes.fetch(:skip_activity) { attributes.fetch('skip_activity', nil) }
  @skip_activity_collections = attributes.fetch(:skip_activity_collections) { attributes.fetch('skip_activity_collections', nil) }
  @skip_activity_comments = attributes.fetch(:skip_activity_comments) { attributes.fetch('skip_activity_comments', nil) }
  @skip_activity_current_feed = attributes.fetch(:skip_activity_current_feed) { attributes.fetch('skip_activity_current_feed', nil) }
  @skip_activity_mentioned_users = attributes.fetch(:skip_activity_mentioned_users) { attributes.fetch('skip_activity_mentioned_users', nil) }
  @skip_activity_own_bookmarks = attributes.fetch(:skip_activity_own_bookmarks) { attributes.fetch('skip_activity_own_bookmarks', nil) }
  @skip_activity_parents = attributes.fetch(:skip_activity_parents) { attributes.fetch('skip_activity_parents', nil) }
  @skip_activity_poll = attributes.fetch(:skip_activity_poll) { attributes.fetch('skip_activity_poll', nil) }
  @skip_activity_reactions = attributes.fetch(:skip_activity_reactions) { attributes.fetch('skip_activity_reactions', nil) }
  @skip_activity_refresh_image_urls = attributes.fetch(:skip_activity_refresh_image_urls) { attributes.fetch('skip_activity_refresh_image_urls', nil) }
  @skip_all = attributes.fetch(:skip_all) { attributes.fetch('skip_all', nil) }
  @skip_feed_member_user = attributes.fetch(:skip_feed_member_user) { attributes.fetch('skip_feed_member_user', nil) }
  @skip_followers = attributes.fetch(:skip_followers) { attributes.fetch('skip_followers', nil) }
  @skip_following = attributes.fetch(:skip_following) { attributes.fetch('skip_following', nil) }
  @skip_own_capabilities = attributes.fetch(:skip_own_capabilities) { attributes.fetch('skip_own_capabilities', nil) }
  @skip_own_follows = attributes.fetch(:skip_own_follows) { attributes.fetch('skip_own_follows', nil) }
  @skip_pins = attributes.fetch(:skip_pins) { attributes.fetch('skip_pins', nil) }
end

Instance Attribute Details

#enrich_own_followings ⇒ Boolean

Returns Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds).

Returns:

  • (Boolean) —

    Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds).



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

def enrich_own_followings
  @enrich_own_followings
end

#include_flat_activities ⇒ Boolean

Returns Controls the top-level flat 'activities' array for aggregated feeds. For new apps, defaults to false (excluded); set to true to include. For older apps, defaults to true (included) for backward compatibility; set to false to exclude.

Returns:

  • (Boolean) —

    Controls the top-level flat 'activities' array for aggregated feeds. For new apps, defaults to false (excluded); set to true to include. For older apps, defaults to true (included) for backward compatibility; set to false to exclude.



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

def include_flat_activities
  @include_flat_activities
end

#include_ranking_config ⇒ Boolean

Returns Default: false. Server-side only. When true, the response includes ranking_config: the ranking configuration (from the feed view, or the feed group as fallback) used to rank this read.

Returns:

  • (Boolean) —

    Default: false. Server-side only. When true, the response includes ranking_config: the ranking configuration (from the feed view, or the feed group as fallback) used to rank this read.



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

def include_ranking_config
  @include_ranking_config
end

#include_reasons ⇒ Boolean

Returns Default: false. When true, For You activities include reasons: codes for why each was shown. Ignored with skip_all.

Returns:

  • (Boolean) —

    Default: false. When true, For You activities include reasons: codes for why each was shown. Ignored with skip_all.



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

def include_reasons
  @include_reasons
end

#include_score_vars ⇒ Boolean

Returns Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.

Returns:

  • (Boolean) —

    Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.



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

def include_score_vars
  @include_score_vars
end

#skip_activity ⇒ Boolean

Returns Default: false. When true, skips all activity enrichments.

Returns:

  • (Boolean) —

    Default: false. When true, skips all activity enrichments.



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

def skip_activity
  @skip_activity
end

#skip_activity_collections ⇒ Boolean

Returns Default: false. When true, skips enriching collections on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching collections on activities.



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

def skip_activity_collections
  @skip_activity_collections
end

#skip_activity_comments ⇒ Boolean

Returns Default: false. When true, skips enriching comments on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching comments on activities.



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

def skip_activity_comments
  @skip_activity_comments
end

#skip_activity_current_feed ⇒ Boolean

Returns Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped.



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

def skip_activity_current_feed
  @skip_activity_current_feed
end

#skip_activity_mentioned_users ⇒ Boolean

Returns Default: false. When true, skips enriching mentioned users on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching mentioned users on activities.



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

def skip_activity_mentioned_users
  @skip_activity_mentioned_users
end

#skip_activity_own_bookmarks ⇒ Boolean

Returns Default: false. When true, skips enriching own bookmarks on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching own bookmarks on activities.



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

def skip_activity_own_bookmarks
  @skip_activity_own_bookmarks
end

#skip_activity_parents ⇒ Boolean

Returns Default: false. When true, skips enriching parent activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching parent activities.



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

def skip_activity_parents
  @skip_activity_parents
end

#skip_activity_poll ⇒ Boolean

Returns Default: false. When true, skips enriching poll data on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching poll data on activities.



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

def skip_activity_poll
  @skip_activity_poll
end

#skip_activity_reactions ⇒ Boolean

Returns Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included.

Returns:

  • (Boolean) —

    Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included.



53
54
55
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 53

def skip_activity_reactions
  @skip_activity_reactions
end

#skip_activity_refresh_image_urls ⇒ Boolean

Returns Default: false. When true, skips refreshing image URLs on activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips refreshing image URLs on activities.



56
57
58
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 56

def skip_activity_refresh_image_urls
  @skip_activity_refresh_image_urls
end

#skip_all ⇒ Boolean

Returns Default: false. When true, skips all enrichments.

Returns:

  • (Boolean) —

    Default: false. When true, skips all enrichments.



59
60
61
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 59

def skip_all
  @skip_all
end

#skip_feed_member_user ⇒ Boolean

Returns Default: false. When true, skips enriching user data on feed members.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching user data on feed members.



62
63
64
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 62

def skip_feed_member_user
  @skip_feed_member_user
end

#skip_followers ⇒ Boolean

Returns Default: false. When true, skips fetching and enriching followers. Note: If followers_pagination is explicitly provided, followers will be fetched regardless of this setting.

Returns:

  • (Boolean) —

    Default: false. When true, skips fetching and enriching followers. Note: If followers_pagination is explicitly provided, followers will be fetched regardless of this setting.



65
66
67
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 65

def skip_followers
  @skip_followers
end

#skip_following ⇒ Boolean

Returns Default: false. When true, skips fetching and enriching following. Note: If following_pagination is explicitly provided, following will be fetched regardless of this setting.

Returns:

  • (Boolean) —

    Default: false. When true, skips fetching and enriching following. Note: If following_pagination is explicitly provided, following will be fetched regardless of this setting.



68
69
70
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 68

def skip_following
  @skip_following
end

#skip_own_capabilities ⇒ Boolean

Returns Default: false. When true, skips computing and including capabilities for feeds.

Returns:

  • (Boolean) —

    Default: false. When true, skips computing and including capabilities for feeds.



71
72
73
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 71

def skip_own_capabilities
  @skip_own_capabilities
end

#skip_own_follows ⇒ Boolean

Returns Default: false. When true, skips fetching and enriching own_follows (follows where user's feeds follow target feeds).

Returns:

  • (Boolean) —

    Default: false. When true, skips fetching and enriching own_follows (follows where user's feeds follow target feeds).



74
75
76
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 74

def skip_own_follows
  @skip_own_follows
end

#skip_pins ⇒ Boolean

Returns Default: false. When true, skips enriching pinned activities.

Returns:

  • (Boolean) —

    Default: false. When true, skips enriching pinned activities.



77
78
79
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 77

def skip_pins
  @skip_pins
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/getstream_ruby/generated/models/enrichment_options.rb', line 107

def self.json_field_mappings
  {
    enrich_own_followings: 'enrich_own_followings',
    include_flat_activities: 'include_flat_activities',
    include_ranking_config: 'include_ranking_config',
    include_reasons: 'include_reasons',
    include_score_vars: 'include_score_vars',
    skip_activity: 'skip_activity',
    skip_activity_collections: 'skip_activity_collections',
    skip_activity_comments: 'skip_activity_comments',
    skip_activity_current_feed: 'skip_activity_current_feed',
    skip_activity_mentioned_users: 'skip_activity_mentioned_users',
    skip_activity_own_bookmarks: 'skip_activity_own_bookmarks',
    skip_activity_parents: 'skip_activity_parents',
    skip_activity_poll: 'skip_activity_poll',
    skip_activity_reactions: 'skip_activity_reactions',
    skip_activity_refresh_image_urls: 'skip_activity_refresh_image_urls',
    skip_all: 'skip_all',
    skip_feed_member_user: 'skip_feed_member_user',
    skip_followers: 'skip_followers',
    skip_following: 'skip_following',
    skip_own_capabilities: 'skip_own_capabilities',
    skip_own_follows: 'skip_own_follows',
    skip_pins: 'skip_pins'
  }
end