I am trying to follow the documentation here: https://www.docs.developers.amplitude.com/data/sdks/java/ampli/#track
generating code into a backend kotlin project, similar to this example https://github.com/amplitude/ampli-examples/tree/main/jre/kotlin/AmpliApp
However when I generate the code there is a compilation error in the generated file Ampli.kt, line 207
open fun identify(userId: String?, event: Identify? = null, options: EventOptions? = null, extra: MiddlewareExtra? = null) {
if (!this.isInitializedAndEnabled()) {
return
}
val amplitudeEvent = this.createAmplitudeEvent(event?.eventType, event?.options, options, userId)
amplitudeEvent.userProperties = this.getEventPropertiesJson(event)
this._client?.logEvent(amplitudeEvent, extra)
}
the problem is that event is a nullable type.
In the example repo i pasted above, this argument is non-nullable