package be.iminds.jfed.gts_highlevel;

import be.iminds.ilabt.jfed.lowlevel.JFedException;
import be.iminds.ilabt.jfed.lowlevel.api.RestApi;
import be.iminds.ilabt.jfed.lowlevel.connection.HttpConnection;

import java.util.List;

/**
 * User: twalcari
 * Date: 9/23/2015
 * Time: 11:24
 */
public interface GtsService {
    RestApi.RestReply<String> login(HttpConnection con) throws JFedException;

    RestApi.RestReply<String> queryUser(HttpConnection con, String gtsAuthenticationToken, String login) throws JFedException;

    RestApi.RestReply<String> queryUsers(HttpConnection con, String gtsAuthenticationToken) throws JFedException;

    RestApi.RestReply<String> queryProject(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;

    RestApi.RestReply<String> queryProjects(HttpConnection con, String gtsAuthenticationToken) throws JFedException;

    RestApi.RestReply<String> addProject(HttpConnection con,
                                         String gtsAuthenticationToken,
                                         String projectName,
                                         String vpnUserName,
                                         String vpnPassword,
                                         List<String> users,
                                         String icon) throws JFedException;

    RestApi.RestReply<String> updateProject(HttpConnection con,
                                            String gtsAuthenticationToken,
                                            String projectName,
                                            String vpnUserName,
                                            String vpnPassword,
                                            List<String> users,
                                            String icon) throws JFedException;

    RestApi.RestReply<String> removeProject(HttpConnection con,
                                            String gtsAuthenticationToken,
                                            String project) throws JFedException;

    RestApi.RestReply<String> queryRCA(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;

    RestApi.RestReply<String> queryRCAs(HttpConnection con, String gtsAuthenticationToken) throws JFedException;

    RestApi.RestReply<String> queryType(HttpConnection con, String gtsAuthenticationToken, String project, String type) throws JFedException;

    RestApi.RestReply<String> queryTypes(HttpConnection con, String gtsAuthenticationToken, String project) throws JFedException;

    RestApi.RestReply<String> addType(HttpConnection con, String gtsAuthenticationToken, String project, String script) throws JFedException;

    RestApi.RestReply<String> removeType(HttpConnection con, String gtsAuthenticationToken, String project, String type) throws JFedException;

    RestApi.RestReply<String> queryLdapResources(HttpConnection con, String gtsAuthenticationToken, String ldap, String project) throws JFedException;

    RestApi.RestReply<String> queryReservations(HttpConnection con, String gtsAuthenticationToken, String project) throws JFedException;

    RestApi.RestReply<String> queryProjectResources(HttpConnection con, String gtsAuthenticationToken, String project) throws JFedException;

    RestApi.RestReply<String> queryAllResources(HttpConnection con, String gtsAuthenticationToken) throws JFedException;

    RestApi.RestReply<String> queryResource(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;

    RestApi.RestReply<String> reserveResource(HttpConnection con, String gtsAuthenticationToken, String id, String project) throws JFedException;

    RestApi.RestReply<String> reserveType(HttpConnection con, String gtsAuthenticationToken, String type, String project) throws JFedException;

    RestApi.RestReply<String> activateReservation(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;

    RestApi.RestReply<String> deactivateReservation(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;

    RestApi.RestReply<String> releaseReservation(HttpConnection con, String gtsAuthenticationToken, String id) throws JFedException;
}
