package org.realityforge.replicant.client.transport;

import arez.Arez;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * Summary describing the result of a data load action.
 */
final class DataLoadStatus
{
  /**
   * A key that uniquely identifies the data source that initiated the data load.
   */
  @Nonnull
  private final String _systemKey;
  private final int _sequence;
  @Nullable
  private final String _requestID;
  @Nonnull
  private final List<ChannelChangeStatus> _channelAdds;
  @Nonnull
  private final List<ChannelChangeStatus> _channelUpdates;
  @Nonnull
  private final List<ChannelChangeStatus> _channelRemoves;

  // The number of entities created or updated as part of change message
  private final int _entityUpdateCount;
  // The number of entities removed as part of change message
  private final int _entityRemoveCount;
  // The number of entities where link() was invoked
  private final int _entityLinkCount;

  DataLoadStatus( @Nonnull final String systemKey,
                  final int sequence,
                  @Nullable final String requestID,
                  @Nonnull final List<ChannelChangeStatus> channelAdds,
                  @Nonnull final List<ChannelChangeStatus> channelUpdates,
                  @Nonnull final List<ChannelChangeStatus> channelRemoves,
                  final int entityUpdateCount,
                  final int entityRemoveCount,
                  final int entityLinkCount )
  {
    _systemKey = systemKey;
    _sequence = sequence;
    _requestID = requestID;
    _channelAdds = channelAdds;
    _channelUpdates = channelUpdates;
    _channelRemoves = channelRemoves;
    _entityUpdateCount = entityUpdateCount;
    _entityRemoveCount = entityRemoveCount;
    _entityLinkCount = entityLinkCount;
  }

  @Nonnull
  String getSystemKey()
  {
    return _systemKey;
  }

  private int getSequence()
  {
    return _sequence;
  }

  @Nullable
  String getRequestID()
  {
    return _requestID;
  }

  @Nonnull
  List<ChannelChangeStatus> getChannelAdds()
  {
    return _channelAdds;
  }

  @Nonnull
  List<ChannelChangeStatus> getChannelUpdates()
  {
    return _channelUpdates;
  }

  @Nonnull
  List<ChannelChangeStatus> getChannelRemoves()
  {
    return _channelRemoves;
  }

  int getEntityUpdateCount()
  {
    return _entityUpdateCount;
  }

  int getEntityRemoveCount()
  {
    return _entityRemoveCount;
  }

  int getEntityLinkCount()
  {
    return _entityLinkCount;
  }

  @Override
  public String toString()
  {
    if ( Arez.areNamesEnabled() )
    {
      return "[" +
             getSystemKey() + ": ChangeSet " + getSequence() + " involved " +
             getChannelAdds().size() + " subscribes, " +
             getChannelUpdates().size() + " subscription updates, " +
             getChannelRemoves().size() + " un-subscribes, " +
             getEntityUpdateCount() + " updates, " +
             getEntityRemoveCount() + " removes and " +
             getEntityLinkCount() + " links" +
             "]";
    }
    else
    {
      return super.toString();
    }
  }
}

@@ -220,16 +220,23 @@
 on.%0A */%0A
+public 
 final cl
@@ -991,16 +991,23 @@
 unt;%0A%0A  
+public 
 DataLoad
@@ -1057,32 +1057,39 @@
                 
+       
 final int sequen
@@ -1110,16 +1110,23 @@
         
+  
+     
 @Nullabl
@@ -1151,16 +1151,23 @@
 uestID,%0A
+       
         
@@ -1240,32 +1240,39 @@
                 
+    
+   
 @Nonnull final L
@@ -1308,24 +1308,31 @@
 nelUpdates,%0A
+       
             
@@ -1404,32 +1404,39 @@
                 
+      
+ 
 final int entity
@@ -1440,32 +1440,39 @@
 ityUpdateCount,%0A
+       
                 
@@ -1494,32 +1494,39 @@
 ityRemoveCount,%0A
+       
                 
@@ -1895,16 +1895,23 @@
 nnull%0A  
+public 
 String g
@@ -1959,22 +1959,21 @@
   %7D%0A%0A  p
-rivate
+ublic
  int get
@@ -2028,16 +2028,23 @@
 lable%0A  
+public 
 String g
@@ -2094,32 +2094,39 @@
 %7D%0A%0A  @Nonnull%0A  
+public 
 List%3CChannelChan
@@ -2191,32 +2191,39 @@
 %7D%0A%0A  @Nonnull%0A  
+public 
 List%3CChannelChan
@@ -2302,16 +2302,23 @@
 nnull%0A  
+public 
 List%3CCha
@@ -2386,32 +2386,39 @@
 Removes;%0A  %7D%0A%0A  
+public 
 int getEntityUpd
@@ -2462,32 +2462,39 @@
 teCount;%0A  %7D%0A%0A  
+public 
 int getEntityRem
@@ -2546,16 +2546,23 @@
 %0A  %7D%0A%0A  
+public 
 int getE

Make class publically accessible