class SpanDataBuilder implements SpanData {

  public static SpanDataBuilder.Builder newBuilder(SpanData spanData) {
    return new AutoValue_SpanDataBuilder.Builder()
        .setTraceId(spanData.getTraceId())
        .setSpanId(spanData.getSpanId())
        .setSampled(spanData.isSampled())
        .setTraceState(spanData.getTraceState())
        .setParentSpanId(spanData.getParentSpanId())
        .setResource(spanData.getResource())
        .setInstrumentationLibraryInfo(spanData.getInstrumentationLibraryInfo())
        .setName(spanData.getName())
        .setKind(spanData.getKind())
        .setStartEpochNanos(spanData.getStartEpochNanos())
        .setAttributes(spanData.getAttributes())
        .setEvents(spanData.getEvents())
        .setLinks(spanData.getLinks())
        .setStatus(spanData.getStatus())
        .setEndEpochNanos(spanData.getEndEpochNanos())
        .setHasRemoteParent(spanData.getHasRemoteParent())
        .setHasEnded(spanData.getHasEnded())
        .setTotalRecordedEvents(spanData.getTotalRecordedEvents())
        .setTotalRecordedLinks(spanData.getTotalRecordedLinks())
        .setTotalAttributeCount(spanData.getTotalAttributeCount());
  }

}