use serde_json::Value;
use crate::model;
use crate::models::KnownValues;
pub const PREVIEW_SUBJECTS: &[&str] = &["user", "ipport"];
pub const KNOWN_VALUES: &[KnownValues] =
&[("/tailnet/{tailnet}/acl/preview ?type", PREVIEW_SUBJECTS)];
model! {
PolicyPreview as "POST /tailnet/{tailnet}/acl/preview 200" {
matches: "matches" => Vec<PolicyMatch>,
subject_type: "type" => String,
preview_for: "previewFor" => String,
}
PolicyMatch as "POST /tailnet/{tailnet}/acl/preview 200.matches[]" {
users: "users" => Vec<String>,
ports: "ports" => Vec<String>,
line_number: "lineNumber" => i64,
}
PolicyValidation as "POST /tailnet/{tailnet}/acl/validate 200" {
message: "message" => String,
data: "data" => Vec<Value>,
}
PolicyTest as "POST /tailnet/{tailnet}/acl/validate body (application/json)|oneOf[0][]" {
src: "src" => String,
src_posture_attrs: "srcPostureAttrs" => std::collections::BTreeMap<String, Value>,
proto: "proto" => String,
accept: "accept" => Vec<String>,
deny: "deny" => Vec<String>,
}
}