vpndetection 5.3.3

The official Rust client library for the VPNDetection API: anonymity detection covering VPNs, residential proxies, Tor nodes, hosting servers, CDNs and relays.
Documentation
/*
 * VPNDetection API
 *
 * The VPNDetection API: classify any IP address, and download the databases behind the answers.  See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
 *
 * The version of the OpenAPI document: 2026.09.26
 * Contact: support@vpndetection.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EntitlementPlan {
    /// The plan the organization is on.
    #[serde(rename = "key")]
    pub key: String,
    /// The field tier, which decides how much of a lookup answer comes back. What each tier includes is documented on the lookup endpoint rather than repeated here, so there is one place it can be wrong.
    #[serde(rename = "tier")]
    pub tier: Tier,
}

impl EntitlementPlan {
    pub fn new(key: String, tier: Tier) -> EntitlementPlan {
        EntitlementPlan { key, tier }
    }
}
/// The field tier, which decides how much of a lookup answer comes back. What each tier includes is documented on the lookup endpoint rather than repeated here, so there is one place it can be wrong.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Tier {
    #[serde(rename = "free")]
    Free,
    #[serde(rename = "starter")]
    Starter,
    #[serde(rename = "scale")]
    Scale,
    #[serde(rename = "max")]
    Max,
}

impl Default for Tier {
    fn default() -> Tier {
        Self::Free
    }
}