Class: GetStream::Generated::Models::AggregatedActivityResponse

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @activity_count = attributes[:activity_count] || attributes['activity_count']
  @created_at = attributes[:created_at] || attributes['created_at']
  @group = attributes[:group] || attributes['group']
  @score = attributes[:score] || attributes['score']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @user_count = attributes[:user_count] || attributes['user_count']
  @user_count_truncated = attributes[:user_count_truncated] || attributes['user_count_truncated']
  @activities = attributes[:activities] || attributes['activities']
  @is_read = attributes[:is_read] || attributes['is_read'] || nil
  @is_seen = attributes[:is_seen] || attributes['is_seen'] || nil
  @is_watched = attributes[:is_watched] || attributes['is_watched'] || nil
end

Instance Attribute Details

#activities ⇒ Array<ActivityResponse>

Returns List of activities in this aggregation.

Returns:



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

def activities
  @activities
end

#activity_count ⇒ Integer

Returns Number of activities in this aggregation.

Returns:

  • (Integer) —

    Number of activities in this aggregation



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

def activity_count
  @activity_count
end

#created_at ⇒ DateTime

Returns When the aggregation was created.

Returns:

  • (DateTime) —

    When the aggregation was created



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

def created_at
  @created_at
end

#group ⇒ String

Returns Grouping identifier.

Returns:

  • (String) —

    Grouping identifier



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

def group
  @group
end

#is_read ⇒ Boolean

Returns Whether this aggregated group has been read. Only set for feed groups with notification config (track_seen/track_read enabled).

Returns:

  • (Boolean) —

    Whether this aggregated group has been read. Only set for feed groups with notification config (track_seen/track_read enabled).



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

def is_read
  @is_read
end

#is_seen ⇒ Boolean

Returns Whether this aggregated group has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).

Returns:

  • (Boolean) —

    Whether this aggregated group has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).



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

def is_seen
  @is_seen
end

#is_watched ⇒ Boolean

Returns:

  • (Boolean)


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

def is_watched
  @is_watched
end

#score ⇒ Float

Returns Ranking score for this aggregation.

Returns:

  • (Float) —

    Ranking score for this aggregation



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

def score
  @score
end

#updated_at ⇒ DateTime

Returns When the aggregation was last updated.

Returns:

  • (DateTime) —

    When the aggregation was last updated



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

def updated_at
  @updated_at
end

#user_count ⇒ Integer

Returns Number of unique users in this aggregation.

Returns:

  • (Integer) —

    Number of unique users in this aggregation



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

def user_count
  @user_count
end

#user_count_truncated ⇒ Boolean

Returns Whether this activity group has been truncated due to exceeding the group size limit.

Returns:

  • (Boolean) —

    Whether this activity group has been truncated due to exceeding the group size limit



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

def user_count_truncated
  @user_count_truncated
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    activity_count: 'activity_count',
    created_at: 'created_at',
    group: 'group',
    score: 'score',
    updated_at: 'updated_at',
    user_count: 'user_count',
    user_count_truncated: 'user_count_truncated',
    activities: 'activities',
    is_read: 'is_read',
    is_seen: 'is_seen',
    is_watched: 'is_watched'
  }
end