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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! `subnets` routes (`SubnetsAPI`, new in v8.0.0).
//!
//! Ported from `eero-api src/eero/api/subnets.py` (v8.0.4).
use ;
use Method;
/// `GET /2.2/networks/{id}/subnets_config` (or the parent's own `subnets_config` link) — get the
/// network's subnets configuration.
///
/// Ported from `eero-api src/eero/api/subnets.py:43-75` (`SubnetsAPI.get_config`):
/// `sub_resource_url(network_id, "networks/{id}/subnets_config", link="subnets_config",
/// parent=..)`.
pub const SUBNETS_GET_CONFIG: Resource = Resource ;
/// `PUT /2.2/networks/{id}/subnets_config` — create or edit a subnet configuration.
///
/// Ported from `eero-api src/eero/api/subnets.py:78-107` (`SubnetsAPI.set_config`):
/// `resource_url(network_id, "networks/{id}/subnets_config")` — **no `parent=` parameter**,
/// unlike [`SUBNETS_GET_CONFIG`]; always resolves from the template.
pub const SUBNETS_SET_CONFIG: Resource = Resource ;
/// `networks/{id}/subnets_config` — the collection
/// [`SubnetsApi::delete_subnet`](crate::endpoints::subnets::SubnetsApi::delete_subnet) resolves via
/// [`Resource::resolve`], then appends a validated `subnet_type` onto with
/// [`crate::links::child_url`] directly, rather than going through a [`Nested`] route.
///
/// Ported from `eero-api src/eero/api/subnets.py:113-141` (`SubnetsAPI.delete_subnet`):
/// `child_url(resource_url(network_id, "networks/{id}/subnets_config"), subnet_type)`.
/// **Deliberately not a [`Nested`]** (orchestrator decision, phase-G fix list item 12): a
/// `Nested`'s `child` accepts a path/URL as well as a bare id (`crate::params::resolve_nested_url`
/// treats anything starting with `/`/`http(s)://` as an already-resolved nested path to verify),
/// but Python's `child_url` is stricter — `subnet_type` must always be a bare single-segment
/// identifier, and a path or absolute URL is rejected outright, not interpreted. Using a
/// `Resource` for the collection plus a direct `child_url` call reproduces that stricter rule
/// exactly, instead of silently accepting a wider set of inputs than the Python SDK does.
/// [`Resource::method`] is `DELETE` even though this constant only ever resolves the *collection*
/// URL (the member id is appended afterwards) — matching every other route constant's convention
/// of carrying its call site's HTTP verb.
pub const SUBNETS_CONFIG_COLLECTION: Resource = Resource ;
/// `PUT /2.2/networks/{id}/subnets_config/dns_policies/content_filters` — set content filters
/// for one or more subnets.
///
/// Ported from `eero-api src/eero/api/subnets.py:143-177` (`SubnetsAPI.set_content_filters`):
/// `resource_url(network_id, "networks/{id}/subnets_config/dns_policies/content_filters")` — no
/// `parent=` parameter.
pub const SUBNETS_SET_CONTENT_FILTERS: Resource = Resource ;
/// `GET /2.2/networks/{network}/subnets_config/{subnet_id}/dns_policies/content_filters` — get
/// content filters for a subnet.
///
/// Ported from `eero-api src/eero/api/subnets.py:181-203` (`SubnetsAPI.get_content_filters`):
/// `resolve_nested_url(network_id, subnet_id, prefix="subnets_config",
/// suffix="/dns_policies/content_filters")` — no `link=`/`parent=` at all, unlike
/// [`SUBNETS_GET_CONFIG`].
pub const SUBNETS_GET_CONTENT_FILTERS: Nested = Nested ;