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) {<br /> if (!this.isInitializedAndEnabled()) {<br /> return<br /> }<br /> val amplitudeEvent = this.createAmplitudeEvent(event?.eventType, event?.options, options, userId)<br /> amplitudeEvent.userProperties = this.getEventPropertiesJson(event)<br /><br /> this._client?.logEvent(amplitudeEvent, extra)<br /> }
the problem is that event is a nullable type.
In the example repo i pasted above, this argument is non-nullable