package com.filestack.util;

import com.filestack.responses.CompleteResponse;
import com.filestack.responses.StartResponse;
import com.filestack.responses.StoreResponse;
import com.filestack.responses.UploadResponse;
import com.google.gson.JsonObject;
import java.util.Map;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;

/** Combines all REST services into a single service. */
public class FsService {
  // An instance of this class can hold individual custom services
  // It doesn't contain singletons though, so we specify these as custom
  private FsApiService customApiService;
  private FsCdnService customCdnService;
  private FsUploadService customUploadService;
  private FsCloudService customCloudService;

  /** Constructs instance using singleton REST services. */
  public FsService() { }

  /** Constructs instance using custom REST services. */
  public FsService(FsApiService api, FsCdnService cdn, FsUploadService upload,
                   FsCloudService cloud) {
    this.customApiService = api;
    this.customCdnService = cdn;
    this.customUploadService = upload;
    this.customCloudService = cloud;
  }
  
  public FsApiService api() {
    if (customApiService != null) {
      return customApiService;
    } else {
      return Networking.getFsApiService();
    }
  }

  public FsCdnService cdn() {
    if (customCdnService != null) {
      return customCdnService;
    } else {
      return Networking.getFsCdnService();
    }
  }

  public FsUploadService upload() {
    if (customUploadService != null) {
      return customUploadService;
    } else {
      return Networking.getFsUploadService();
    }
  }

  public FsCloudService cloud() {
    if (customCloudService != null) {
      return customCloudService;
    } else {
      return Networking.getFsCloudService();
    }
  }
}

@@ -1156,18 +1156,120 @@
 ud;%0A  %7D%0A
+%0A
   
+/**%0A   * Returns %7B@link FsApiService%7D instance, custom if provided, global singleton otherwise.%0A   */
 %0A  publi
@@ -1417,32 +1417,136 @@
 e();%0A    %7D%0A  %7D%0A%0A
+  /**%0A   * Returns %7B@link FsCdnService%7D instance, custom if provided, global singleton otherwise.%0A   */%0A
   public FsCdnSe
@@ -1685,32 +1685,139 @@
 e();%0A    %7D%0A  %7D%0A%0A
+  /**%0A   * Returns %7B@link FsUploadService%7D instance, custom if provided, global singleton otherwise.%0A   */%0A
   public FsUploa
@@ -1979,16 +1979,122 @@
  %7D%0A  %7D%0A%0A
+  /**%0A   * Returns %7B@link FsCloudService%7D instance, custom if provided, global singleton otherwise.%0A   */%0A
   public

Add javadoc to FsService