use crate::Secret;
use crate::model;
use crate::models::KnownValues;
pub const ROLES_ALLOWED_TO_JOIN: &[&str] = &["none", "admin", "member"];
pub const KNOWN_VALUES: &[KnownValues] = &[(
"TailnetSettings.usersRoleAllowedToJoinExternalTailnets",
ROLES_ALLOWED_TO_JOIN,
)];
model! {
Error {
message: "message" => String,
}
TailnetSettings {
acls_externally_managed_on: "aclsExternallyManagedOn" => bool,
acls_external_link: "aclsExternalLink" => String,
devices_approval_on: "devicesApprovalOn" => bool,
devices_auto_updates_on: "devicesAutoUpdatesOn" => bool,
devices_key_duration_days: "devicesKeyDurationDays" => i64,
users_approval_on: "usersApprovalOn" => bool,
users_role_allowed_to_join_external_tailnets:
"usersRoleAllowedToJoinExternalTailnets" => String,
network_flow_logging_on: "networkFlowLoggingOn" => bool,
regional_routing_on: "regionalRoutingOn" => bool,
posture_identity_collection_on: "postureIdentityCollectionOn" => bool,
https_enabled: "httpsEnabled" => bool,
}
OAuthApp {
id: "id" => String,
name: "name" => String,
description: "description" => String,
redirect_uris: "redirectURIs" => Vec<String>,
scopes: "scopes" => Vec<String>,
allowed_node_attributes: "allowedNodeAttributes" => Vec<String>,
client_secret: "clientSecret" => Secret,
created: "created" => String,
updated: "updated" => String,
}
OAuthAppList as "GET /tailnet/{tailnet}/oauth-apps 200" {
oauth_apps: "oauthApps" => Vec<OAuthApp>,
}
CreateOAuthAppRequest as "POST /tailnet/{tailnet}/oauth-apps body" {
name: "name" => String,
description: "description" => String,
redirect_uris: "redirectURIs" => Vec<String>,
scopes: "scopes" => Vec<String>,
allowed_node_attributes: "allowedNodeAttributes" => Vec<String>,
}
UpdateOAuthAppRequest as "PUT /tailnet/{tailnet}/oauth-apps/{appId} body"
is CreateOAuthAppRequest;
OrganizationTailnet {
id: "id" => String,
display_name: "displayName" => String,
org_id: "orgId" => String,
created_at: "createdAt" => String,
}
ListOrganizationTailnetsResponse {
tailnets: "tailnets" => Vec<OrganizationTailnet>,
cursor: "cursor" => String,
total_count: "totalCount" => i64,
}
CreateOrganizationTailnetRequest {
display_name: "displayName" => String,
}
TailnetOAuthClient {
id: "id" => String,
secret: "secret" => Secret,
}
CreateOrganizationTailnetResponse {
id: "id" => String,
display_name: "displayName" => String,
org_id: "orgId" => String,
dns_name: "dnsName" => String,
created_at: "createdAt" => String,
oauth_client: "oauthClient" => TailnetOAuthClient,
already_exists: "alreadyExists" => bool,
}
}