Class: GetStream::Generated::Models::AddActivityRequest

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

Initialize with attributes



102
103
104
105
106
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
133
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 102

def initialize(attributes = {})
  super(attributes)
  @type = attributes.fetch(:type) { attributes.fetch('type', nil) }
  @feeds = attributes.fetch(:feeds) { attributes.fetch('feeds', nil) }
  @copy_custom_to_notification = attributes.fetch(:copy_custom_to_notification) { attributes.fetch('copy_custom_to_notification', nil) }
  @create_notification_activity = attributes.fetch(:create_notification_activity) { attributes.fetch('create_notification_activity', nil) }
  @create_system_feeds = attributes.fetch(:create_system_feeds) { attributes.fetch('create_system_feeds', nil) }
  @create_users = attributes.fetch(:create_users) { attributes.fetch('create_users', nil) }
  @enrich_own_fields = attributes.fetch(:enrich_own_fields) { attributes.fetch('enrich_own_fields', nil) }
  @expires_at = attributes.fetch(:expires_at) { attributes.fetch('expires_at', nil) }
  @force_moderation = attributes.fetch(:force_moderation) { attributes.fetch('force_moderation', nil) }
  @id = attributes.fetch(:id) { attributes.fetch('id', nil) }
  @parent_id = attributes.fetch(:parent_id) { attributes.fetch('parent_id', nil) }
  @poll_id = attributes.fetch(:poll_id) { attributes.fetch('poll_id', nil) }
  @restrict_replies = attributes.fetch(:restrict_replies) { attributes.fetch('restrict_replies', nil) }
  @skip_enrich_url = attributes.fetch(:skip_enrich_url) { attributes.fetch('skip_enrich_url', nil) }
  @skip_existing = attributes.fetch(:skip_existing) { attributes.fetch('skip_existing', nil) }
  @skip_push = attributes.fetch(:skip_push) { attributes.fetch('skip_push', nil) }
  @text = attributes.fetch(:text) { attributes.fetch('text', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @visibility = attributes.fetch(:visibility) { attributes.fetch('visibility', nil) }
  @visibility_tag = attributes.fetch(:visibility_tag) { attributes.fetch('visibility_tag', nil) }
  @attachments = attributes.fetch(:attachments) { attributes.fetch('attachments', nil) }
  @collection_refs = attributes.fetch(:collection_refs) { attributes.fetch('collection_refs', nil) }
  @collections = attributes.fetch(:collections) { attributes.fetch('collections', nil) }
  @filter_tags = attributes.fetch(:filter_tags) { attributes.fetch('filter_tags', nil) }
  @interest_tags = attributes.fetch(:interest_tags) { attributes.fetch('interest_tags', nil) }
  @mentioned_user_ids = attributes.fetch(:mentioned_user_ids) { attributes.fetch('mentioned_user_ids', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
  @location = attributes.fetch(:location) { attributes.fetch('location', nil) }
  @search_data = attributes.fetch(:search_data) { attributes.fetch('search_data', nil) }
end

Instance Attribute Details

#attachments ⇒ Array<Attachment>

Returns List of attachments for the activity.

Returns:

  • (Array<Attachment>) —

    List of attachments for the activity



75
76
77
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 75

def attachments
  @attachments
end

#collection_refs ⇒ Array<String>

Returns Collections that this activity references.

Returns:

  • (Array<String>) —

    Collections that this activity references



78
79
80
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 78

def collection_refs
  @collection_refs
end

#collections ⇒ Array<CollectionRequest>

Returns Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.

Returns:

  • (Array<CollectionRequest>) —

    Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.



81
82
83
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 81

def collections
  @collections
end

#copy_custom_to_notification ⇒ Object

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



21
22
23
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 21

def copy_custom_to_notification
  @copy_custom_to_notification
end

#create_notification_activity ⇒ Boolean

Returns Whether to create notification activities for mentioned users.

Returns:

  • (Boolean) —

    Whether to create notification activities for mentioned users



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

def create_notification_activity
  @create_notification_activity
end

#create_system_feeds ⇒ Boolean

Returns:

  • (Boolean)


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

def create_system_feeds
  @create_system_feeds
end

#create_users ⇒ Boolean

Returns:

  • (Boolean)


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

def create_users
  @create_users
end

#custom ⇒ Object

Returns Custom data for the activity.

Returns:

  • (Object) —

    Custom data for the activity



93
94
95
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 93

def custom
  @custom
end

#enrich_own_fields ⇒ Boolean

Returns:

  • (Boolean)


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

def enrich_own_fields
  @enrich_own_fields
end

#expires_at ⇒ String

Returns Expiration time for the activity.

Returns:

  • (String) —

    Expiration time for the activity



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

def expires_at
  @expires_at
end

#feeds ⇒ Array<String>

Returns List of feeds to add the activity to with a default max limit of 25 feeds.

Returns:

  • (Array<String>) —

    List of feeds to add the activity to with a default max limit of 25 feeds



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

def feeds
  @feeds
end

#filter_tags ⇒ Array<String>

Returns Tags for filtering activities.

Returns:

  • (Array<String>) —

    Tags for filtering activities



84
85
86
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 84

def filter_tags
  @filter_tags
end

#force_moderation ⇒ Boolean

Returns:

  • (Boolean)


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

def force_moderation
  @force_moderation
end

#id ⇒ String

Returns Optional ID for the activity.

Returns:

  • (String) —

    Optional ID for the activity



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

def id
  @id
end

#interest_tags ⇒ Array<String>

Returns Tags for indicating user interests.

Returns:

  • (Array<String>) —

    Tags for indicating user interests



87
88
89
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 87

def interest_tags
  @interest_tags
end

#location ⇒ Location

Returns:



96
97
98
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 96

def location
  @location
end

#mentioned_user_ids ⇒ Array<String>

Returns List of users mentioned in the activity.

Returns:

  • (Array<String>) —

    List of users mentioned in the activity



90
91
92
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 90

def mentioned_user_ids
  @mentioned_user_ids
end

#parent_id ⇒ String

Returns ID of parent activity for replies/comments.

Returns:

  • (String) —

    ID of parent activity for replies/comments



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

def parent_id
  @parent_id
end

#poll_id ⇒ String

Returns ID of a poll to attach to activity.

Returns:

  • (String) —

    ID of a poll to attach to activity



48
49
50
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 48

def poll_id
  @poll_id
end

#restrict_replies ⇒ RestrictReplies

Returns Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody.

Returns:

  • (RestrictReplies) —

    Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody



51
52
53
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 51

def restrict_replies
  @restrict_replies
end

#search_data ⇒ Object

Returns Additional data for search indexing.

Returns:

  • (Object) —

    Additional data for search indexing



99
100
101
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 99

def search_data
  @search_data
end

#skip_enrich_url ⇒ Boolean

Returns Whether to skip URL enrichment for the activity.

Returns:

  • (Boolean) —

    Whether to skip URL enrichment for the activity



54
55
56
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 54

def skip_enrich_url
  @skip_enrich_url
end

#skip_existing ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 57

def skip_existing
  @skip_existing
end

#skip_push ⇒ Boolean

Returns Whether to skip push notifications.

Returns:

  • (Boolean) —

    Whether to skip push notifications



60
61
62
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 60

def skip_push
  @skip_push
end

#text ⇒ String

Returns Text content of the activity.

Returns:

  • (String) —

    Text content of the activity



63
64
65
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 63

def text
  @text
end

#type ⇒ String

Returns Type of activity.

Returns:

  • (String) —

    Type of activity



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

def type
  @type
end

#user_id ⇒ String

Returns ID of the user creating the activity.

Returns:

  • (String) —

    ID of the user creating the activity



66
67
68
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 66

def user_id
  @user_id
end

#visibility ⇒ ActivityVisibility

Returns Visibility setting for the activity. One of: public, private, tag.

Returns:

  • (ActivityVisibility) —

    Visibility setting for the activity. One of: public, private, tag



69
70
71
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 69

def visibility
  @visibility
end

#visibility_tag ⇒ String

Returns If visibility is 'tag', this is the tag name and is required.

Returns:

  • (String) —

    If visibility is 'tag', this is the tag name and is required



72
73
74
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 72

def visibility_tag
  @visibility_tag
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 136

def self.json_field_mappings
  {
    type: 'type',
    feeds: 'feeds',
    copy_custom_to_notification: 'copy_custom_to_notification',
    create_notification_activity: 'create_notification_activity',
    create_system_feeds: 'create_system_feeds',
    create_users: 'create_users',
    enrich_own_fields: 'enrich_own_fields',
    expires_at: 'expires_at',
    force_moderation: 'force_moderation',
    id: 'id',
    parent_id: 'parent_id',
    poll_id: 'poll_id',
    restrict_replies: 'restrict_replies',
    skip_enrich_url: 'skip_enrich_url',
    skip_existing: 'skip_existing',
    skip_push: 'skip_push',
    text: 'text',
    user_id: 'user_id',
    visibility: 'visibility',
    visibility_tag: 'visibility_tag',
    attachments: 'attachments',
    collection_refs: 'collection_refs',
    collections: 'collections',
    filter_tags: 'filter_tags',
    interest_tags: 'interest_tags',
    mentioned_user_ids: 'mentioned_user_ids',
    custom: 'custom',
    location: 'location',
    search_data: 'search_data'
  }
end