docs: @SuppressWarnings({"deprecation", "InconsistentOverloads"})
    public static SpanData create(
        SpanContext context,
        @Nullable SpanId parentSpanId,
        @Nullable Boolean hasRemoteParent,
        String name,
        @Nullable Kind kind,
        Timestamp startTimestamp,
        Attributes attributes,
        TimedEvents<Annotation> annotations,
        TimedEvents<? extends io.opencensus.trace.BaseMessageEvent> messageOrNetworkEvents,
        Links links,
        @Nullable Integer childSpanCount,
        @Nullable Status status,
        @Nullable Timestamp endTimestamp) {
      Utils.checkNotNull(messageOrNetworkEvents, "messageOrNetworkEvents");
      List<TimedEvent<MessageEvent>> messageEventsList = new ArrayList<TimedEvent<MessageEvent>>();
      for (TimedEvent<? extends io.opencensus.trace.BaseMessageEvent> timedEvent :
          messageOrNetworkEvents.getEvents()) {
        io.opencensus.trace.BaseMessageEvent event = timedEvent.getEvent();
        if (event instanceof MessageEvent) {
          @SuppressWarnings("unchecked")
          TimedEvent<MessageEvent> timedMessageEvent = (TimedEvent<MessageEvent>) timedEvent;
          messageEventsList.add(timedMessageEvent);
        } else {
          messageEventsList.add(
              TimedEvent.<MessageEvent>create(
                  timedEvent.getTimestamp(), BaseMessageEventUtils.asMessageEvent(event)));
        }
      }
      TimedEvents<MessageEvent> messageEvents =
          TimedEvents.<MessageEvent>create(
              messageEventsList, messageOrNetworkEvents.getDroppedEventsCount());
      return new AutoValue_SpanData(
          context,
          parentSpanId,
          hasRemoteParent,
          name,
          kind,
          startTimestamp,
          attributes,
          annotations,
          messageEvents,
          links,
          childSpanCount,
          status,
          endTimestamp);
    }