code: public ServiceCall<CreateEventResponse> createEvent(CreateEventOptions createEventOptions) {
      Validator.notNull(createEventOptions, "createEventOptions cannot be null");
      String[] pathSegments = { "v1/events" };
      RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createEvent");
      for (Entry<String, String> header : sdkHeaders.entrySet()) {
        builder.header(header.getKey(), header.getValue());
      }
      builder.header("Accept", "application/json");
      final JsonObject contentJson = new JsonObject();
      contentJson.addProperty("type", createEventOptions.type());
      contentJson.add("data", GsonSingleton.getGson().toJsonTree(createEventOptions.data()));
      builder.bodyJson(contentJson);
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(CreateEventResponse.class));
    }
docs: Create event.
  
  The **Events** API can be used to create log entries that are associated with specific queries. For example, you
  can record which documents in the results set were \"clicked\" by a user and when that click occured.
  
  @param createEventOptions the {@link CreateEventOptions} containing the options for the call
  @return a {@link ServiceCall} with a response type of {@link CreateEventResponse}