public static AnalyticsEvent createFromEvent(
     PinpointContext context, String sessionId, long timestamp, AnalyticsEvent copyEvent) {
   return new AnalyticsEvent(
       copyEvent.getEventId(),
       copyEvent.getEventType(),
       copyEvent.getAllAttributes(),
       copyEvent.getAllMetrics(),
       context.getSDKInfo(),
       sessionId,
       copyEvent.getSession().getSessionStart(),
       copyEvent.getSession().getSessionStop(),
       copyEvent.getSession().getSessionDuration(),
       timestamp,
       context.getUniqueId(),
       context.getSystem().getAppDetails(),
       context.getSystem().getDeviceDetails());
 }
 public static AnalyticsEvent newInstance(
     PinpointContext context,
     String sessionId,
     Long sessionStart,
     Long sessionEnd,
     Long duration,
     long timestamp,
     final String eventType) {
   return new AnalyticsEvent(
       eventType,
       null,
       null,
       context.getSDKInfo(),
       sessionId,
       sessionStart,
       sessionEnd,
       duration,
       timestamp,
       context.getUniqueId(),
       context.getSystem().getAppDetails(),
       context.getSystem().getDeviceDetails());
 }