code: public ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions) {
      Validator.notNull(listCollectionsOptions, "listCollectionsOptions cannot be null");
      String[] pathSegments = { "v1/environments", "collections" };
      String[] pathParameters = { listCollectionsOptions.environmentId() };
      RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
          pathParameters));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listCollections");
      for (Entry<String, String> header : sdkHeaders.entrySet()) {
        builder.header(header.getKey(), header.getValue());
      }
      builder.header("Accept", "application/json");
      if (listCollectionsOptions.name() != null) {
        builder.query("name", listCollectionsOptions.name());
      }
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(ListCollectionsResponse.class));
    }
docs: List collections.
  
  Lists existing collections for the service instance.
  
  @param listCollectionsOptions the {@link ListCollectionsOptions} containing the options for the call
  @return a {@link ServiceCall} with a response type of {@link ListCollectionsResponse}