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
//! Port-forward routes (`ForwardsAPI`).
// ---------------------------------- forwards (`ForwardsAPI`) ----------------------------
use ;
use Method;
// ------------------------------------ v8.0.4 routes --------------------------------------
/// `GET /2.2/networks/{id}/forwards` (or the parent's own `forwards` link) — list port
/// forwards.
///
/// Ported from `eero-api src/eero/api/forwards.py:80-105` (v8.0.4, `ForwardsAPI.get_forwards`):
/// `sub_resource_url(network, "networks/{id}/forwards", link="forwards", parent=..,
/// version=API_VERSION_DEFAULT)`.
pub const FORWARDS_GET: Resource = Resource ;
/// `POST /2.2/networks/{id}/forwards` (or the parent's own `forwards` link) — create a port
/// forward.
///
/// Ported from `eero-api src/eero/api/forwards.py:113-151` (v8.0.4,
/// `ForwardsAPI.create_forward`): same URL resolution as [`FORWARDS_GET`].
pub const FORWARDS_CREATE: Resource = Resource ;
/// `PUT /2.2/networks/{network}/forwards/{forward}` (or an already-resolved path/URL) — update
/// a port forward.
///
/// Ported from `eero-api src/eero/api/forwards.py:153-184` (v8.0.4, `ForwardsAPI.update_forward`
/// via the free function `_resolve_forward_url`): `resolve_nested_url(network, forward,
/// prefix="forwards")`, used by [`crate::endpoints::forwards::ForwardsApi::update_forward`] only
/// for its bare-id and path/URL dispatch branches — the "`forward` is a cached envelope" branch
/// resolves via [`crate::links::self_url`] directly instead, never through this route. No
/// `link`: Python's `_resolve_forward_url` never consults a parent's `resources` map.
pub const FORWARDS_UPDATE: Nested = Nested ;
/// `DELETE /2.2/networks/{network}/forwards/{forward}` (bare id, path, or URL) — delete a port
/// forward.
///
/// Ported from `eero-api src/eero/api/forwards.py:186-203` (v8.0.4, `ForwardsAPI.delete_forward`):
/// `resolve_nested_url(network, forward, prefix="forwards")`.
pub const FORWARDS_DELETE: Nested = Nested ;