docs: public ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions) {
      Validator.notNull(createCollectionOptions, "createCollectionOptions cannot be null");
      String[] pathSegments = { "v1/environments", "collections" };
      String[] pathParameters = { createCollectionOptions.environmentId() };
      RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
          pathParameters));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createCollection");
      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("name", createCollectionOptions.name());
      if (createCollectionOptions.description() != null) {
        contentJson.addProperty("description", createCollectionOptions.description());
      }
      if (createCollectionOptions.configurationId() != null) {
        contentJson.addProperty("configuration_id", createCollectionOptions.configurationId());
      }
      if (createCollectionOptions.language() != null) {
        contentJson.addProperty("language", createCollectionOptions.language());
      }
      builder.bodyJson(contentJson);
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Collection.class));
    }