// Path: src/main/java/com/tempodb/WriteRequest.java
// public class WriteRequest implements Iterable<WritableDataPoint> {
// 
//   private final List<WritableDataPoint> data;
// 
//   /**
//    *  Base constructor
//    *  @since 1.0.0
//    */
//   public WriteRequest() {
//     this.data = new ArrayList<WritableDataPoint>();
//   }
// 
//   /**
//    *  Adds a DataPoint to the request for a Series.
//    *  @param series The Series to write to.
//    *  @param datapoint The DataPoint to write.
//    *  @return The updated request.
//    *  @since 1.0.0
//    */
//   public WriteRequest add(Series series, DataPoint datapoint) {
//     WritableDataPoint mdp = new WritableDataPoint(series, datapoint.getTimestamp(), datapoint.getValue());
//     data.add(mdp);
//     return this;
//   }
// 
//   /**
//    *  Adds a list of DataPoints to the request for a Series.
//    *  @param series The Series to write to.
//    *  @param datapoints The list of DataPoints to write.
//    *  @return The updated request.
//    *  @since 1.0.0
//    */
//   public WriteRequest add(Series series, List<DataPoint> datapoints) {
//     for(DataPoint datapoint : datapoints) {
//       WritableDataPoint mdp = new WritableDataPoint(series, datapoint.getTimestamp(), datapoint.getValue());
//       data.add(mdp);
//     }
//     return this;
//   }
// 
//   @Override
//   public Iterator<WritableDataPoint> iterator() {
//     return data.iterator();
//   }
// 
//   @Override
//   public int hashCode() {
//     return new HashCodeBuilder(257, 263)
//       .append(data)
//       .toHashCode();
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if(obj == null) return false;
//     if(obj == this) return true;
//     if(!(obj instanceof WriteRequest)) return false;
// 
//     WriteRequest rhs = (WriteRequest)obj;
//     return new EqualsBuilder()
//       .append(data, rhs.data)
//       .isEquals();
//   }
// }


import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer;
import com.tempodb.WriteRequest;
package com.tempodb.json;





public class WriteRequestModule extends SimpleModule {
  public WriteRequestModule() {
    addSerializer(WriteRequest.class, new WriteRequestSerializer());
  }

  private static class WriteRequestSerializer extends StdScalarSerializer<WriteRequest> {
// Path: src/main/java/com/tempodb/WriteRequest.java
// public class WriteRequest implements Iterable<WritableDataPoint> {
// 
//   private final List<WritableDataPoint> data;
// 
//   /**
//    *  Base constructor
//    *  @since 1.0.0
//    */
//   public WriteRequest() {
//     this.data = new ArrayList<WritableDataPoint>();
//   }
// 
//   /**
//    *  Adds a DataPoint to the request for a Series.
//    *  @param series The Series to write to.
//    *  @param datapoint The DataPoint to write.
//    *  @return The updated request.
//    *  @since 1.0.0
//    */
//   public WriteRequest add(Series series, DataPoint datapoint) {
//     WritableDataPoint mdp = new WritableDataPoint(series, datapoint.getTimestamp(), datapoint.getValue());
//     data.add(mdp);
//     return this;
//   }
// 
//   /**
//    *  Adds a list of DataPoints to the request for a Series.
//    *  @param series The Series to write to.
//    *  @param datapoints The list of DataPoints to write.
//    *  @return The updated request.
//    *  @since 1.0.0
//    */
//   public WriteRequest add(Series series, List<DataPoint> datapoints) {
//     for(DataPoint datapoint : datapoints) {
//       WritableDataPoint mdp = new WritableDataPoint(series, datapoint.getTimestamp(), datapoint.getValue());
//       data.add(mdp);
//     }
//     return this;
//   }
// 
//   @Override
//   public Iterator<WritableDataPoint> iterator() {
//     return data.iterator();
//   }
// 
//   @Override
//   public int hashCode() {
//     return new HashCodeBuilder(257, 263)
//       .append(data)
//       .toHashCode();
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if(obj == null) return false;
//     if(obj == this) return true;
//     if(!(obj instanceof WriteRequest)) return false;
// 
//     WriteRequest rhs = (WriteRequest)obj;
//     return new EqualsBuilder()
//       .append(data, rhs.data)
//       .isEquals();
//   }
// }


// Path: src/main/java/com/tempodb/json/WriteRequestModule.java
import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer;
import com.tempodb.WriteRequest;

package com.tempodb.json;





public class WriteRequestModule extends SimpleModule {
  public WriteRequestModule() {
    addSerializer(WriteRequest.class, new WriteRequestSerializer());
  }

  private static class WriteRequestSerializer extends StdScalarSerializer<WriteRequest> {
    public WriteRequestSerializer() { super(WriteRequest.class); }