1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* 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.10.20
* 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
}
}