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
/*
* 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.16
* 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 Entitlement {
/// The organization the key belongs to.
#[serde(rename = "org_id")]
pub org_id: uuid::Uuid,
#[serde(rename = "apikey")]
pub apikey: Box<models::EntitlementApikey>,
#[serde(rename = "plan")]
pub plan: Box<models::EntitlementPlan>,
#[serde(rename = "usage")]
pub usage: Box<models::EntitlementUsage>,
}
impl Entitlement {
pub fn new(
org_id: uuid::Uuid,
apikey: models::EntitlementApikey,
plan: models::EntitlementPlan,
usage: models::EntitlementUsage,
) -> Entitlement {
Entitlement {
org_id,
apikey: Box::new(apikey),
plan: Box::new(plan),
usage: Box::new(usage),
}
}
}