// Path: src/main/java/com/maxmind/geoip2/NetworkDeserializer.java
// public class NetworkDeserializer extends StdDeserializer<Network> {
// 
//     public NetworkDeserializer() {
//         this(null);
//     }
// 
//     public NetworkDeserializer(Class<?> vc) {
//         super(vc);
//     }
// 
//     @Override
//     public Network deserialize(
//             JsonParser jsonparser, DeserializationContext context)
//             throws IOException {
// 
//         String cidr = jsonparser.getText();
//         if (cidr == null) {
//             return null;
//         }
//         String[] parts = cidr.split("/", 2);
//         if (parts.length != 2) {
//             throw new RuntimeException("Invalid cidr format: " + cidr);
//         }
//         int prefixLength = Integer.parseInt(parts[1]);
//         try {
//             return new Network(InetAddress.getByName(parts[0]), prefixLength);
//         } catch (UnknownHostException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.maxmind.db.MaxMindDbConstructor;
import com.maxmind.db.MaxMindDbParameter;
import com.maxmind.db.Network;
import com.maxmind.geoip2.NetworkDeserializer;
            return this.name;
        }

        public static ConnectionType fromString(String s) {
            if (s == null) {
                return null;
            }

            switch (s) {
                case "Dialup":
                    return ConnectionType.DIALUP;
                case "Cable/DSL":
                    return ConnectionType.CABLE_DSL;
                case "Corporate":
                    return ConnectionType.CORPORATE;
                case "Cellular":
                    return ConnectionType.CELLULAR;
                default:
                    return null;
            }
        }
    }

    private final ConnectionType connectionType;
    private final String ipAddress;
    private final Network network;

    public ConnectionTypeResponse(
            @JsonProperty("connection_type") ConnectionType connectionType,
            @JacksonInject("ip_address") @JsonProperty("ip_address") String ipAddress,
// Path: src/main/java/com/maxmind/geoip2/NetworkDeserializer.java
// public class NetworkDeserializer extends StdDeserializer<Network> {
// 
//     public NetworkDeserializer() {
//         this(null);
//     }
// 
//     public NetworkDeserializer(Class<?> vc) {
//         super(vc);
//     }
// 
//     @Override
//     public Network deserialize(
//             JsonParser jsonparser, DeserializationContext context)
//             throws IOException {
// 
//         String cidr = jsonparser.getText();
//         if (cidr == null) {
//             return null;
//         }
//         String[] parts = cidr.split("/", 2);
//         if (parts.length != 2) {
//             throw new RuntimeException("Invalid cidr format: " + cidr);
//         }
//         int prefixLength = Integer.parseInt(parts[1]);
//         try {
//             return new Network(InetAddress.getByName(parts[0]), prefixLength);
//         } catch (UnknownHostException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: src/main/java/com/maxmind/geoip2/model/ConnectionTypeResponse.java
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.maxmind.db.MaxMindDbConstructor;
import com.maxmind.db.MaxMindDbParameter;
import com.maxmind.db.Network;
import com.maxmind.geoip2.NetworkDeserializer;

            return this.name;
        }

        public static ConnectionType fromString(String s) {
            if (s == null) {
                return null;
            }

            switch (s) {
                case "Dialup":
                    return ConnectionType.DIALUP;
                case "Cable/DSL":
                    return ConnectionType.CABLE_DSL;
                case "Corporate":
                    return ConnectionType.CORPORATE;
                case "Cellular":
                    return ConnectionType.CELLULAR;
                default:
                    return null;
            }
        }
    }

    private final ConnectionType connectionType;
    private final String ipAddress;
    private final Network network;

    public ConnectionTypeResponse(
            @JsonProperty("connection_type") ConnectionType connectionType,
            @JacksonInject("ip_address") @JsonProperty("ip_address") String ipAddress,
            @JacksonInject("network") @JsonProperty("network") @JsonDeserialize(using = NetworkDeserializer.class) Network network