1111import org .jetbrains .annotations .NotNull ;
1212import org .jetbrains .annotations .Nullable ;
1313
14- @ ApiStatus .Internal
1514public final class SentryEnvelope {
1615
1716 // types: session_batch, session, event, attachment
1817 // an envelope cannot have 2 events, but eg multiple sessions
1918 private final @ NotNull SentryEnvelopeHeader header ;
2019 private final @ NotNull Iterable <SentryEnvelopeItem > items ;
2120
21+ @ ApiStatus .Internal
2222 public @ NotNull Iterable <SentryEnvelopeItem > getItems () {
2323 return items ;
2424 }
2525
26+ @ ApiStatus .Internal
2627 public @ NotNull SentryEnvelopeHeader getHeader () {
2728 return header ;
2829 }
2930
31+ @ ApiStatus .Internal
3032 public SentryEnvelope (
3133 final @ NotNull SentryEnvelopeHeader header ,
3234 final @ NotNull Iterable <SentryEnvelopeItem > items ) {
3335 this .header = Objects .requireNonNull (header , "SentryEnvelopeHeader is required." );
3436 this .items = Objects .requireNonNull (items , "SentryEnvelope items are required." );
3537 }
3638
39+ @ ApiStatus .Internal
3740 public SentryEnvelope (
3841 final @ Nullable SentryId eventId ,
3942 final @ Nullable SdkVersion sdkVersion ,
@@ -42,6 +45,7 @@ public SentryEnvelope(
4245 this .items = Objects .requireNonNull (items , "SentryEnvelope items are required." );
4346 }
4447
48+ @ ApiStatus .Internal
4549 public SentryEnvelope (
4650 final @ Nullable SentryId eventId ,
4751 final @ Nullable SdkVersion sdkVersion ,
@@ -54,6 +58,7 @@ public SentryEnvelope(
5458 this .items = items ;
5559 }
5660
61+ @ ApiStatus .Internal
5762 public static @ NotNull SentryEnvelope from (
5863 final @ NotNull ISerializer serializer ,
5964 final @ NotNull Session session ,
@@ -66,6 +71,7 @@ public SentryEnvelope(
6671 null , sdkVersion , SentryEnvelopeItem .fromSession (serializer , session ));
6772 }
6873
74+ @ ApiStatus .Internal
6975 public static @ NotNull SentryEnvelope from (
7076 final @ NotNull ISerializer serializer ,
7177 final @ NotNull SentryBaseEvent event ,
@@ -78,6 +84,7 @@ public SentryEnvelope(
7884 event .getEventId (), sdkVersion , SentryEnvelopeItem .fromEvent (serializer , event ));
7985 }
8086
87+ @ ApiStatus .Internal
8188 public static @ NotNull SentryEnvelope from (
8289 final @ NotNull ISerializer serializer ,
8390 final @ NotNull ProfilingTraceData profilingTraceData ,
0 commit comments