// 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
// public enum ConnectionType {
//     DIALUP("Dialup"), CABLE_DSL("Cable/DSL"), CORPORATE("Corporate"), CELLULAR(
//             "Cellular");
// 
//     private final String name;
// 
//     ConnectionType(String name) {
//         this.name = name;
//     }
// 
//     /*
//      * (non-Javadoc)
//      *
//      * @see java.lang.Enum#toString()
//      */
//     @JsonValue
//     @Override
//     public String toString() {
//         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;
//         }
//     }
// }


import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonProperty;
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;
import com.maxmind.geoip2.model.ConnectionTypeResponse.ConnectionType;
package com.maxmind.geoip2.record;


/**
 * Contains data for the traits record associated with an IP address.
 */
public final class Traits extends AbstractRecord {

    private final Long autonomousSystemNumber;
    private final String autonomousSystemOrganization;
// 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
// public enum ConnectionType {
//     DIALUP("Dialup"), CABLE_DSL("Cable/DSL"), CORPORATE("Corporate"), CELLULAR(
//             "Cellular");
// 
//     private final String name;
// 
//     ConnectionType(String name) {
//         this.name = name;
//     }
// 
//     /*
//      * (non-Javadoc)
//      *
//      * @see java.lang.Enum#toString()
//      */
//     @JsonValue
//     @Override
//     public String toString() {
//         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;
//         }
//     }
// }


// Path: src/main/java/com/maxmind/geoip2/record/Traits.java
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonProperty;
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;
import com.maxmind.geoip2.model.ConnectionTypeResponse.ConnectionType;

package com.maxmind.geoip2.record;


/**
 * Contains data for the traits record associated with an IP address.
 */
public final class Traits extends AbstractRecord {

    private final Long autonomousSystemNumber;
    private final String autonomousSystemOrganization;
    private final ConnectionType connectionType;