All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.maxmind.geoip2.record.RepresentedCountry Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package com.maxmind.geoip2.record;

import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.maxmind.db.MaxMindDbConstructor;
import com.maxmind.db.MaxMindDbParameter;

import java.util.List;
import java.util.Map;

/**
 * 

* Contains data for the represented country associated with an IP address. *

*

* This class contains the country-level data associated with an IP address for * the IP's represented country. The represented country is the country * represented by something like a military base. *

*

* Do not use any of the country names as a database or map key. Use the value * returned by {@link #getGeoNameId} or {@link #getIsoCode} instead. *

*/ public final class RepresentedCountry extends Country { private final String type; public RepresentedCountry() { this(null, null, null, false, null, null, null); } @MaxMindDbConstructor public RepresentedCountry( @JacksonInject("locales") @MaxMindDbParameter(name = "locales") List locales, @JsonProperty("confidence") @MaxMindDbParameter(name = "confidence") Integer confidence, @JsonProperty("geoname_id") @MaxMindDbParameter(name = "geoname_id") Long geoNameId, @JsonProperty("is_in_european_union") @MaxMindDbParameter(name = "is_in_european_union") Boolean isInEuropeanUnion, @JsonProperty("iso_code") @MaxMindDbParameter(name = "iso_code") String isoCode, @JsonProperty("names") @MaxMindDbParameter(name = "names") Map names, @JsonProperty("type") @MaxMindDbParameter(name = "type") String type ) { super(locales, confidence, geoNameId, isInEuropeanUnion, isoCode, names); this.type = type; } public RepresentedCountry( RepresentedCountry country, List locales ) { this( locales, country.getConfidence(), country.getGeoNameId(), country.isInEuropeanUnion(), country.getIsoCode(), country.getNames(), country.getType() ); } /** * @return A string indicating the type of entity that is representing the * country. Currently, we only return {@code military} but this could * expand to include other types in the future. */ public String getType() { return this.type; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy