The user type associated with the IP
* address. This can be one of the following values:
*
* - business
*
- cafe
*
- cellular
*
- college
*
- content_delivery_network
*
- dialup
*
- government
*
- hosting
*
- library
*
- military
*
- residential
*
- router
*
- school
*
- search_engine_spider
*
- traveler
*
*
* This attribute is only available from the Insights web service and the
* GeoIP2 Enterprise database.
*
*/
class Traits extends AbstractRecord
{
/**
* @ignore
*
* @var array
*/
protected $validAttributes = [
'autonomousSystemNumber',
'autonomousSystemOrganization',
'connectionType',
'domain',
'ipAddress',
'isAnonymous',
'isAnonymousProxy',
'isAnonymousVpn',
'isHostingProvider',
'isLegitimateProxy',
'isp',
'isPublicProxy',
'isResidentialProxy',
'isSatelliteProvider',
'isTorExitNode',
'mobileCountryCode',
'mobileNetworkCode',
'network',
'organization',
'staticIpScore',
'userCount',
'userType',
];
public function __construct(?array $record)
{
if (!isset($record['network']) && isset($record['ip_address'], $record['prefix_len'])) {
$record['network'] = Util::cidr($record['ip_address'], $record['prefix_len']);
}
parent::__construct($record);
}
}