// Path: src/main/java/org/rundeck/plugin/salt/output/SaltApiResponseOutput.java
// public class SaltApiResponseOutput {
//     protected String jid;
//     protected List<String> minions;
// 
//     public String getJid() {
//         return jid;
//     }
// 
//     public List<String> getMinions() {
//         return minions == null ? Collections.<String>emptyList() : Collections.unmodifiableList(minions);
//     }
// }


import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.rundeck.plugin.salt.SaltApiException;
import org.rundeck.plugin.salt.output.SaltApiResponseOutput;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
package org.rundeck.plugin.salt.version;




/**
 * The interaction handler responsible for dealing with salt-api responses pre
 * 0.8.2
 * 
 * Backwards incompatible end points: - POST to /minions
 */
public class Pre082SaltInteractionHandler implements SaltInteractionHandler {
    
    protected static final String SALT_OUTPUT_RETURN_KEY = "return";
    protected static final Type MINION_RESPONSE_TYPE = new TypeToken<List<Map<String, Object>>>() {}.getType();
    
    @Override
// Path: src/main/java/org/rundeck/plugin/salt/output/SaltApiResponseOutput.java
// public class SaltApiResponseOutput {
//     protected String jid;
//     protected List<String> minions;
// 
//     public String getJid() {
//         return jid;
//     }
// 
//     public List<String> getMinions() {
//         return minions == null ? Collections.<String>emptyList() : Collections.unmodifiableList(minions);
//     }
// }


// Path: src/main/java/org/rundeck/plugin/salt/version/Pre082SaltInteractionHandler.java
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.rundeck.plugin.salt.SaltApiException;
import org.rundeck.plugin.salt.output.SaltApiResponseOutput;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

package org.rundeck.plugin.salt.version;




/**
 * The interaction handler responsible for dealing with salt-api responses pre
 * 0.8.2
 * 
 * Backwards incompatible end points: - POST to /minions
 */
public class Pre082SaltInteractionHandler implements SaltInteractionHandler {
    
    protected static final String SALT_OUTPUT_RETURN_KEY = "return";
    protected static final Type MINION_RESPONSE_TYPE = new TypeToken<List<Map<String, Object>>>() {}.getType();
    
    @Override
    public SaltApiResponseOutput extractOutputForJobSubmissionResponse(String json) throws SaltApiException {