Package io.sentry.protocol
Class SdkVersion
- java.lang.Object
-
- io.sentry.protocol.SdkVersion
-
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
public final class SdkVersion extends java.lang.Object implements JsonUnknown, JsonSerializable
The SDK Interface describes the Sentry SDK and its configuration used to capture and transmit an event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SdkVersion.Deserializer
static class
SdkVersion.JsonKeys
-
Constructor Summary
Constructors Constructor Description SdkVersion(@NotNull java.lang.String name, @NotNull java.lang.String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIntegration(@NotNull java.lang.String integration)
void
addPackage(@NotNull java.lang.String name, @NotNull java.lang.String version)
@Nullable java.util.List<java.lang.String>
getIntegrations()
@NotNull java.lang.String
getName()
@Nullable java.util.List<SentryPackage>
getPackages()
@Nullable java.util.Map<java.lang.String,java.lang.Object>
getUnknown()
@NotNull java.lang.String
getVersion()
void
serialize(@NotNull JsonObjectWriter writer, @NotNull ILogger logger)
void
setName(@NotNull java.lang.String name)
void
setUnknown(@Nullable java.util.Map<java.lang.String,java.lang.Object> unknown)
void
setVersion(@NotNull java.lang.String version)
static @NotNull SdkVersion
updateSdkVersion(@Nullable SdkVersion sdk, @NotNull java.lang.String name, @NotNull java.lang.String version)
Updates the Sdk name and version or create a new one with the given values
-
-
-
Method Detail
-
getVersion
@NotNull public @NotNull java.lang.String getVersion()
-
setVersion
public void setVersion(@NotNull @NotNull java.lang.String version)
-
getName
@NotNull public @NotNull java.lang.String getName()
-
setName
public void setName(@NotNull @NotNull java.lang.String name)
-
addPackage
public void addPackage(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String version)
-
addIntegration
public void addIntegration(@NotNull @NotNull java.lang.String integration)
-
getPackages
@Nullable public @Nullable java.util.List<SentryPackage> getPackages()
-
getIntegrations
@Nullable public @Nullable java.util.List<java.lang.String> getIntegrations()
-
updateSdkVersion
@NotNull public static @NotNull SdkVersion updateSdkVersion(@Nullable @Nullable SdkVersion sdk, @NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String version)
Updates the Sdk name and version or create a new one with the given values- Parameters:
sdk
- the SdkVersion object or nullname
- the sdk nameversion
- the sdk version- Returns:
- the SdkVersion
-
getUnknown
@Nullable public @Nullable java.util.Map<java.lang.String,java.lang.Object> getUnknown()
- Specified by:
getUnknown
in interfaceJsonUnknown
-
setUnknown
public void setUnknown(@Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> unknown)
- Specified by:
setUnknown
in interfaceJsonUnknown
-
serialize
public void serialize(@NotNull @NotNull JsonObjectWriter writer, @NotNull @NotNull ILogger logger) throws java.io.IOException
- Specified by:
serialize
in interfaceJsonSerializable
- Throws:
java.io.IOException
-
-