Class: GetStream::Generated::Models::ScheduledActivityPreview

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

Overview

The activity a scheduled activity will publish

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

Initialize with attributes



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/getstream_ruby/generated/models/scheduled_activity_preview.rb', line 68

def initialize(attributes = {})
  super(attributes)
  @type = attributes.fetch(:type) { attributes.fetch('type', nil) }
  @feeds = attributes.fetch(:feeds) { attributes.fetch('feeds', nil) }
  @expires_at = attributes.fetch(:expires_at) { attributes.fetch('expires_at', 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) }
  @text = attributes.fetch(:text) { attributes.fetch('text', 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) }
  @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 Attachments of the activity.

Returns:

  • (Array<Attachment>) —

    Attachments of the activity



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

def attachments
  @attachments
end

#collection_refs ⇒ Array<String>

Returns Collections referenced by the activity.

Returns:

  • (Array<String>) —

    Collections referenced by the activity



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

def collection_refs
  @collection_refs
end

#custom ⇒ Object

Returns Custom data of the activity.

Returns:

  • (Object) —

    Custom data of the activity



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

def custom
  @custom
end

#expires_at ⇒ DateTime

Returns When the published activity expires.

Returns:

  • (DateTime) —

    When the published activity expires



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

def expires_at
  @expires_at
end

#feeds ⇒ Array<String>

Returns Feeds the activity will be added to.

Returns:

  • (Array<String>) —

    Feeds the activity will be added to



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

def feeds
  @feeds
end

#filter_tags ⇒ Array<String>

Returns Filter tags of the activity.

Returns:

  • (Array<String>) —

    Filter tags of the activity



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

def filter_tags
  @filter_tags
end

#id ⇒ String

Returns ID the activity gets when published.

Returns:

  • (String) —

    ID the activity gets when published



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

def id
  @id
end

#interest_tags ⇒ Array<String>

Returns Interest tags of the activity.

Returns:

  • (Array<String>) —

    Interest tags of the activity



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

def interest_tags
  @interest_tags
end

#location ⇒ Location

Returns:



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

def location
  @location
end

#mentioned_user_ids ⇒ Array<String>

Returns Users mentioned in the activity.

Returns:

  • (Array<String>) —

    Users mentioned in the activity



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

def mentioned_user_ids
  @mentioned_user_ids
end

#parent_id ⇒ String

Returns ID of the parent activity.

Returns:

  • (String) —

    ID of the parent activity



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

def parent_id
  @parent_id
end

#poll_id ⇒ String

Returns ID of the poll attached to the activity.

Returns:

  • (String) —

    ID of the poll attached to the activity



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

def poll_id
  @poll_id
end

#restrict_replies ⇒ RestrictReplies

Returns Who may reply to the activity.

Returns:



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

def restrict_replies
  @restrict_replies
end

#search_data ⇒ Object

Returns Search data of the activity.

Returns:

  • (Object) —

    Search data of the activity



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

def search_data
  @search_data
end

#text ⇒ String

Returns Text content of the activity.

Returns:

  • (String) —

    Text content of the activity



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

def text
  @text
end

#type ⇒ String

Returns Type of activity.

Returns:

  • (String) —

    Type of activity



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

def type
  @type
end

#visibility ⇒ ActivityVisibility

Returns Visibility of the activity.

Returns:



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

def visibility
  @visibility
end

#visibility_tag ⇒ String

Returns Visibility tag of the activity.

Returns:

  • (String) —

    Visibility tag of the activity



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

def visibility_tag
  @visibility_tag
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/getstream_ruby/generated/models/scheduled_activity_preview.rb', line 91

def self.json_field_mappings
  {
    type: 'type',
    feeds: 'feeds',
    expires_at: 'expires_at',
    id: 'id',
    parent_id: 'parent_id',
    poll_id: 'poll_id',
    restrict_replies: 'restrict_replies',
    text: 'text',
    visibility: 'visibility',
    visibility_tag: 'visibility_tag',
    attachments: 'attachments',
    collection_refs: 'collection_refs',
    filter_tags: 'filter_tags',
    interest_tags: 'interest_tags',
    mentioned_user_ids: 'mentioned_user_ids',
    custom: 'custom',
    location: 'location',
    search_data: 'search_data'
  }
end