code: public static Message buildSnapshot(Zxid lastZxid) {
      ZabMessage.Zxid zxid = toProtoZxid(lastZxid);
      Snapshot snapshot = Snapshot.newBuilder().setLastZxid(zxid).build();
  
      return Message.newBuilder().setType(MessageType.SNAPSHOT)
                                 .setSnapshot(snapshot)
                                 .build();
    }
docs: Creates a SNAPSHOT message.
  
  @param lastZxid the last zxid of the sender.
  @return a protobuf message.