Class Summary

java.lang.Object
io.ably.lib.types.Summary

public class Summary extends Object
A summary of all the annotations that have been made to the message. Will always be populated for a message.annotations.summary, and may be populated for any other type (in particular a message retrieved from REST history will have its latest summary included). The keys of the map are the annotation types. The exact structure of the value of each key depends on the aggregation part of the annotation type, e.g. for a type of reaction:distinct.v1, the value will be a DistinctValues object. New aggregation methods might be added serverside, hence the 'unknown' part of the sum type.
  • Constructor Details

    • Summary

      public Summary(Map<String,com.google.gson.JsonObject> typeToSummaryJson)
  • Method Details

    • asSummaryDistinctV1

      public static Map<String,SummaryClientIdList> asSummaryDistinctV1(com.google.gson.JsonObject jsonObject)
    • asSummaryUniqueV1

      public static Map<String,SummaryClientIdList> asSummaryUniqueV1(com.google.gson.JsonObject jsonObject)
    • asSummaryMultipleV1

      public static Map<String,SummaryClientIdCounts> asSummaryMultipleV1(com.google.gson.JsonObject jsonObject)
    • asSummaryFlagV1

      public static SummaryClientIdList asSummaryFlagV1(com.google.gson.JsonObject jsonObject)
    • asSummaryTotalV1

      public static SummaryTotal asSummaryTotalV1(com.google.gson.JsonObject jsonObject)
    • get

      public com.google.gson.JsonObject get(String annotationType)
      Retrieves the JSON representation associated with a specified annotation type.
      Parameters:
      annotationType - the type of annotation to retrieve its JSON representation
      Returns:
      a JsonObject containing the JSON representation of the specified annotation type, or null if no representation exists for the given type