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



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/aggregated_activity_response.rb', line 41

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_watched = attributes[:is_watched] || attributes['is_watched'] || nil
end

Instance Attribute Details

#activitiesArray<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_countInteger

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_atDateTime

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

#groupString

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_watchedBoolean

Returns:

  • (Boolean)


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

def is_watched
  @is_watched
end

#scoreFloat

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_atDateTime

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_countInteger

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_truncatedBoolean

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_mappingsObject

Override field mappings for JSON serialization



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/getstream_ruby/generated/models/aggregated_activity_response.rb', line 55

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_watched: 'is_watched'
  }
end