code: public ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions) {
      Validator.notNull(updateCollectionOptions, "updateCollectionOptions cannot be null");
      String[] pathSegments = { "v1/environments", "collections" };
      String[] pathParameters = { updateCollectionOptions.environmentId(), updateCollectionOptions.collectionId() };
      RequestBuilder builder = RequestBuilder.put(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
          pathParameters));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "updateCollection");
      for (Entry<String, String> header : sdkHeaders.entrySet()) {
        builder.header(header.getKey(), header.getValue());
      }
      builder.header("Accept", "application/json");
      final JsonObject contentJson = new JsonObject();
      if (updateCollectionOptions.name() != null) {
        contentJson.addProperty("name", updateCollectionOptions.name());
      }
      if (updateCollectionOptions.description() != null) {
        contentJson.addProperty("description", updateCollectionOptions.description());
      }
      if (updateCollectionOptions.configurationId() != null) {
        contentJson.addProperty("configuration_id", updateCollectionOptions.configurationId());
      }
      builder.bodyJson(contentJson);
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Collection.class));
    }
docs: Update a collection.
  
  @param updateCollectionOptions the {@link UpdateCollectionOptions} containing the options for the call
  @return a {@link ServiceCall} with a response type of {@link Collection}