// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


import com.google.cloudsearch.exceptions.InvalidConfigException;
import com.google.common.collect.Multimap;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import org.apache.log4j.Logger;
package com.google.cloudsearch.ai;


/**
 * Class Custom Skill provides the support for invoking
 * custom function written in Cloud Functions.
 */
public class CustomSkill extends BaseAISkill {

    private JSONObject input = new JSONObject();
    private String cloudFunctionURL = "";
    HttpURLConnection connection;
    private Logger log = Logger.getLogger(StandardSkillCategoryExtraction.class.getName());

  /**
   * Constructor
   * @param aiSkill     The JSON Object in Configuration containing Category Extraction skill related
   *                    information.
   * @param schema      The CloudSearch Schema.
   * @throws InvalidConfigException
   */
// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


// Path: indexer/ai/src/main/java/com/google/cloudsearch/ai/CustomSkill.java
import com.google.cloudsearch.exceptions.InvalidConfigException;
import com.google.common.collect.Multimap;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import org.apache.log4j.Logger;

package com.google.cloudsearch.ai;


/**
 * Class Custom Skill provides the support for invoking
 * custom function written in Cloud Functions.
 */
public class CustomSkill extends BaseAISkill {

    private JSONObject input = new JSONObject();
    private String cloudFunctionURL = "";
    HttpURLConnection connection;
    private Logger log = Logger.getLogger(StandardSkillCategoryExtraction.class.getName());

  /**
   * Constructor
   * @param aiSkill     The JSON Object in Configuration containing Category Extraction skill related
   *                    information.
   * @param schema      The CloudSearch Schema.
   * @throws InvalidConfigException
   */
    public CustomSkill(JSONObject aiSkill, JSONObject schema) throws InvalidConfigException {