use crate::model;
use crate::models::KnownValues;
pub const APPROVAL_LEVELS: &[&str] = &["not-approved", "approved:auto", "approved:manual"];
pub const KNOWN_VALUES: &[KnownValues] = &[("ServiceHostInfo.approvalLevel", APPROVAL_LEVELS)];
model! {
VipServiceInfo as "VIPServiceInfo" {
name: "name" => String,
display_name: "displayName" => String,
addrs: "addrs" => Vec<String>,
comment: "comment" => String,
ports: "ports" => Vec<String>,
tags: "tags" => Vec<String>,
}
VipServiceInfoPut as "VIPServiceInfoPut" is VipServiceInfo;
ServiceHostInfo {
stable_node_id: "stableNodeID" => String,
approval_level: "approvalLevel" => String,
configured: "configured" => String,
}
VipServiceApproval as "VIPServiceApproval" {
approved: "approved" => bool,
auto_approved: "autoApproved" => bool,
}
VipServiceList as "GET /tailnet/{tailnet}/services 200" {
vip_services: "vipServices" => Vec<VipServiceInfo>,
}
ServiceHostList as "GET /tailnet/{tailnet}/services/{serviceName}/devices 200" {
hosts: "hosts" => Vec<ServiceHostInfo>,
}
ServiceApprovalRequest
as "POST /tailnet/{tailnet}/services/{serviceName}/device/{deviceId}/approved body" {
approved: "approved" => bool,
}
}