// Path: server/src/main/java/io/pne/veth/server/handlers/IJsonHandler.java
// public interface IJsonHandler<I,O> {
// 
//     O handle(I aRequest);
// 
//     Class<I> getRequestClass();
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/dao/INetworkDao.java
// public interface INetworkDao {
// 
//     void addNetwork(TNetwork aNetwork);
// 
//     TNetwork findNetwork(String aNetworkId);
// 
//     void removeNetwork(String aNetworkId);
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/dao/TNetwork.java
// public class TNetwork {
// 
//     public final String id;
//     public final String gateway;
//     public final String pool;
//     public final String interfaceSuffix;
// 
//     public TNetwork(String id, String gateway, String pool, String aSuffix) {
//         this.id = id;
//         this.gateway = gateway;
//         this.pool = pool;
//         interfaceSuffix = aSuffix;
//     }
// 
//     @Override
//     public String toString() {
//         return "TNetwork{" +
//                 "id='" + id + '\'' +
//                 ", gateway='" + gateway + '\'' +
//                 ", pool='" + pool + '\'' +
//                 ", interfaceSuffix='" + interfaceSuffix + '\'' +
//                 '}';
//     }
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/model/CreateNetworkRequest.java
// public class CreateNetworkRequest {
// 
//     @SerializedName("NetworkID") public String              networkID;
//     @SerializedName("Options")   public Map<String, Object> options;
//     @SerializedName("IPv4Data")  public IPAMData[]          ipv4Data;
//     @SerializedName("IPv6Data")  public IPAMData[]          ipv6Data;
// 
// 
//     @Override
//     public String toString() {
//         return "CreateNetworkRequest{" +
//                 "NetworkID='" + networkID + '\'' +
//                 ", Options=" + options +
//                 ", IPv4Data=" + Arrays.toString(ipv4Data) +
//                 ", IPv6Data=" + Arrays.toString(ipv6Data) +
//                 '}';
//     }
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/model/SuccessResponse.java
// public class SuccessResponse {
// 
//     public static final SuccessResponse SUCCESS = new SuccessResponse();
// }


import io.pne.veth.server.handlers.IJsonHandler;
import io.pne.veth.server.handlers.dao.INetworkDao;
import io.pne.veth.server.handlers.dao.TNetwork;
import io.pne.veth.server.handlers.model.CreateNetworkRequest;
import io.pne.veth.server.handlers.model.SuccessResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
package io.pne.veth.server.handlers.location.networkdriver;



public class CreateNetworkHandler implements IJsonHandler<CreateNetworkRequest, SuccessResponse> {

    private static final Logger LOG = LoggerFactory.getLogger(CreateNetworkHandler.class);

    private final INetworkDao networkDao;

    public CreateNetworkHandler(INetworkDao networkDao) {
        this.networkDao = networkDao;
    }

    @Override
    public SuccessResponse handle(CreateNetworkRequest aRequest) {
        networkDao.addNetwork(new TNetwork(
// Path: server/src/main/java/io/pne/veth/server/handlers/IJsonHandler.java
// public interface IJsonHandler<I,O> {
// 
//     O handle(I aRequest);
// 
//     Class<I> getRequestClass();
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/dao/INetworkDao.java
// public interface INetworkDao {
// 
//     void addNetwork(TNetwork aNetwork);
// 
//     TNetwork findNetwork(String aNetworkId);
// 
//     void removeNetwork(String aNetworkId);
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/dao/TNetwork.java
// public class TNetwork {
// 
//     public final String id;
//     public final String gateway;
//     public final String pool;
//     public final String interfaceSuffix;
// 
//     public TNetwork(String id, String gateway, String pool, String aSuffix) {
//         this.id = id;
//         this.gateway = gateway;
//         this.pool = pool;
//         interfaceSuffix = aSuffix;
//     }
// 
//     @Override
//     public String toString() {
//         return "TNetwork{" +
//                 "id='" + id + '\'' +
//                 ", gateway='" + gateway + '\'' +
//                 ", pool='" + pool + '\'' +
//                 ", interfaceSuffix='" + interfaceSuffix + '\'' +
//                 '}';
//     }
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/model/CreateNetworkRequest.java
// public class CreateNetworkRequest {
// 
//     @SerializedName("NetworkID") public String              networkID;
//     @SerializedName("Options")   public Map<String, Object> options;
//     @SerializedName("IPv4Data")  public IPAMData[]          ipv4Data;
//     @SerializedName("IPv6Data")  public IPAMData[]          ipv6Data;
// 
// 
//     @Override
//     public String toString() {
//         return "CreateNetworkRequest{" +
//                 "NetworkID='" + networkID + '\'' +
//                 ", Options=" + options +
//                 ", IPv4Data=" + Arrays.toString(ipv4Data) +
//                 ", IPv6Data=" + Arrays.toString(ipv6Data) +
//                 '}';
//     }
// }
// 
// Path: server/src/main/java/io/pne/veth/server/handlers/model/SuccessResponse.java
// public class SuccessResponse {
// 
//     public static final SuccessResponse SUCCESS = new SuccessResponse();
// }


// Path: server/src/main/java/io/pne/veth/server/handlers/location/networkdriver/CreateNetworkHandler.java
import io.pne.veth.server.handlers.IJsonHandler;
import io.pne.veth.server.handlers.dao.INetworkDao;
import io.pne.veth.server.handlers.dao.TNetwork;
import io.pne.veth.server.handlers.model.CreateNetworkRequest;
import io.pne.veth.server.handlers.model.SuccessResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;

package io.pne.veth.server.handlers.location.networkdriver;



public class CreateNetworkHandler implements IJsonHandler<CreateNetworkRequest, SuccessResponse> {

    private static final Logger LOG = LoggerFactory.getLogger(CreateNetworkHandler.class);

    private final INetworkDao networkDao;

    public CreateNetworkHandler(INetworkDao networkDao) {
        this.networkDao = networkDao;
    }

    @Override
    public SuccessResponse handle(CreateNetworkRequest aRequest) {
        networkDao.addNetwork(new TNetwork(
                  aRequest.networkID