diff --git a/Cargo.toml.template b/Cargo.toml.template
deleted file mode 100644
index 2e81dc0..0000000
--- a/Cargo.toml.template
+++ /dev/null
@@ -1,18 +0,0 @@
-[package]
-name = "@@PACKAGE@@"
-version = "@@VERSION@@"
-edition = "2018"
-description = "@@DESCRIPTION@@"
-authors = ["Erik Hollensbe ", "Adam Ierymenko "]
-license = "BSD-3-Clause"
-
-[dependencies]
-serde = "^1.0"
-serde_derive = "^1.0"
-serde_json = "^1.0"
-url = "^2.2"
-[dependencies.reqwest]
-version = "^0.11"
-features = ["json", "multipart"]
-
-[dev-dependencies]
diff --git a/Makefile b/Makefile
index 200d682..2a6a89a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
central:
- @DESCRIPTION="OpenAPI bindings to the ZeroTier Central (https:\/\/my.zerotier.com) service" bash generate.sh central zerotier-central-api
+ bash generate.sh central zerotier-central-api
cd zerotier-central-api && cargo build && cargo clean
service:
- @DESCRIPTION="OpenAPI bindings to the ZeroTierOne JSON API" bash generate.sh service zerotier-one-api
+ bash generate.sh service zerotier-one-api
cd zerotier-one-api && cargo build && cargo clean
.PHONY: central service
diff --git a/README.md b/README.md
index 5099f25..267ad74 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# ZeroTier OpenAPI-generated Rust API Libraries
-These libraries are generated by the [openapi-generator](https://github.com/OpenAPITools/openapi-generator) and contain code to interact with the following services:
+These libraries are generated by [progenitor](https://github.com/oxidecomputer/progenitor) and contain code to interact with the following services:
- crate zerotier-one-api: ZeroTierOne (typically over `http://localhost:9993`)
- crate zerotier-central-api: ZeroTier Central (Through [ZeroTier Central](https://my.zerotier.com))
diff --git a/generate.sh b/generate.sh
index ae18529..581f823 100644
--- a/generate.sh
+++ b/generate.sh
@@ -2,38 +2,14 @@
set -eo pipefail
-if [ "x$1" = "x" ]
+if [ "x$1" = "x" -o "x$2" = "x" ]
then
echo "Please read this script before executing it"
exit 1
fi
-if [ "x$VERSION" = "x" ]
-then
- echo "Please supply a version in VERSION= in plain semver format (e.g., 1.2.3)"
- exit 1
-fi
-
-if [ "x$DESCRIPTION" = "x" ]
-then
- echo "Please supply a package description in DESCRIPTION="
- exit 1
-fi
-
PACKAGE=$1
PREFIX=$2
HOST=${HOST:-docs.zerotier.com}
-
-rm -rf ./${PREFIX}
-mkdir -p ./${PREFIX}
-docker pull openapitools/openapi-generator-cli:latest
-docker run --rm -u $(id -u):$(id -g) -v ${PWD}/${PREFIX}:/swagger openapitools/openapi-generator-cli generate \
- --package-name ${PREFIX} \
- -i http://${HOST}/openapi/${PACKAGE}v1.json \
- -g rust \
- -o /swagger
-
-sed -e "s/@@PACKAGE@@/${PREFIX}/g" Cargo.toml.template | \
- sed -e "s/@@VERSION@@/${VERSION}/g" | \
- sed -e "s/@@DESCRIPTION@@/${DESCRIPTION}/g" > ${PREFIX}/Cargo.toml
+curl -sSL http://${HOST}/openapi/${PACKAGE}v1.json > ${PREFIX}/openapi.json
diff --git a/zerotier-central-api/.gitignore b/zerotier-central-api/.gitignore
index 6aa1064..eb5a316 100644
--- a/zerotier-central-api/.gitignore
+++ b/zerotier-central-api/.gitignore
@@ -1,3 +1 @@
-/target/
-**/*.rs.bk
-Cargo.lock
+target
diff --git a/zerotier-central-api/.openapi-generator-ignore b/zerotier-central-api/.openapi-generator-ignore
deleted file mode 100644
index 7484ee5..0000000
--- a/zerotier-central-api/.openapi-generator-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# OpenAPI Generator Ignore
-# Generated by openapi-generator https://github.com/openapitools/openapi-generator
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
diff --git a/zerotier-central-api/.openapi-generator/FILES b/zerotier-central-api/.openapi-generator/FILES
deleted file mode 100644
index 2c5e10b..0000000
--- a/zerotier-central-api/.openapi-generator/FILES
+++ /dev/null
@@ -1,60 +0,0 @@
-.gitignore
-.openapi-generator-ignore
-.travis.yml
-Cargo.toml
-README.md
-docs/ApiToken.md
-docs/AuthMethods.md
-docs/Dns.md
-docs/InviteStatus.md
-docs/IpRange.md
-docs/Ipv4AssignMode.md
-docs/Ipv6AssignMode.md
-docs/Member.md
-docs/MemberConfig.md
-docs/Network.md
-docs/NetworkApi.md
-docs/NetworkConfig.md
-docs/NetworkMemberApi.md
-docs/Organization.md
-docs/OrganizationInvitation.md
-docs/OrganizationMember.md
-docs/OrganizationsApi.md
-docs/Permissions.md
-docs/RandomToken.md
-docs/Route.md
-docs/Status.md
-docs/StatusLoginMethods.md
-docs/User.md
-docs/UserApi.md
-docs/UtilApi.md
-git_push.sh
-src/apis/configuration.rs
-src/apis/mod.rs
-src/apis/network_api.rs
-src/apis/network_member_api.rs
-src/apis/organizations_api.rs
-src/apis/user_api.rs
-src/apis/util_api.rs
-src/lib.rs
-src/models/api_token.rs
-src/models/auth_methods.rs
-src/models/dns.rs
-src/models/invite_status.rs
-src/models/ip_range.rs
-src/models/ipv4_assign_mode.rs
-src/models/ipv6_assign_mode.rs
-src/models/member.rs
-src/models/member_config.rs
-src/models/mod.rs
-src/models/network.rs
-src/models/network_config.rs
-src/models/organization.rs
-src/models/organization_invitation.rs
-src/models/organization_member.rs
-src/models/permissions.rs
-src/models/random_token.rs
-src/models/route.rs
-src/models/status.rs
-src/models/status_login_methods.rs
-src/models/user.rs
diff --git a/zerotier-central-api/.openapi-generator/VERSION b/zerotier-central-api/.openapi-generator/VERSION
deleted file mode 100644
index 5f68295..0000000
--- a/zerotier-central-api/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-6.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/zerotier-central-api/.travis.yml b/zerotier-central-api/.travis.yml
deleted file mode 100644
index 22761ba..0000000
--- a/zerotier-central-api/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: rust
diff --git a/zerotier-central-api/Cargo.lock b/zerotier-central-api/Cargo.lock
new file mode 100644
index 0000000..baeb1ed
--- /dev/null
+++ b/zerotier-central-api/Cargo.lock
@@ -0,0 +1,1401 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bumpalo"
+version = "3.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
+
+[[package]]
+name = "bytes"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
+
+[[package]]
+name = "cc"
+version = "1.0.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
+dependencies = [
+ "libc",
+ "num-integer",
+ "num-traits",
+ "serde",
+ "time",
+ "winapi",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
+dependencies = [
+ "matches",
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
+
+[[package]]
+name = "futures-task"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
+
+[[package]]
+name = "futures-util"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "getopts"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.10.2+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util 0.7.1",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
+[[package]]
+name = "home"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "http"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "hyper"
+version = "0.14.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "idna"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
+dependencies = [
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+ "serde",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
+
+[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
+name = "js-sys"
+version = "0.3.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.124"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"
+
+[[package]]
+name = "log"
+version = "0.4.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
+
+[[package]]
+name = "memchr"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
+
+[[package]]
+name = "mime"
+version = "0.3.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
+
+[[package]]
+name = "mio"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
+dependencies = [
+ "libc",
+ "log",
+ "miow",
+ "ntapi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "miow"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "ntapi"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
+
+[[package]]
+name = "openapiv3"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b4689110fd71f196934fbdf1ad0f0a4b49ea41fbc6f19008c00dba735b544c"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "openssl"
+version = "0.10.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb"
+dependencies = [
+ "autocfg",
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+
+[[package]]
+name = "pest"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
+dependencies = [
+ "ucd-trie",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
+dependencies = [
+ "unicode-xid",
+]
+
+[[package]]
+name = "progenitor"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54484468975e18aa57ed3e9a13ac0468160a433af89eee1189f681292eafc5d1"
+dependencies = [
+ "anyhow",
+ "getopts",
+ "openapiv3",
+ "progenitor-client",
+ "progenitor-impl",
+ "progenitor-macro",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "progenitor-client"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45c7752120152426ce577c3de6b341fecdaae59883f31296d91871a6d7843206"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "percent-encoding",
+ "reqwest",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "progenitor-impl"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1980a31d714128082fe8dd6a7cb6086c15080cdb9a693feba171361fb961b034"
+dependencies = [
+ "getopts",
+ "heck",
+ "indexmap",
+ "openapiv3",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustfmt-wrapper",
+ "schemars",
+ "serde",
+ "serde_json",
+ "syn",
+ "thiserror",
+ "typify",
+ "unicode-xid",
+]
+
+[[package]]
+name = "progenitor-macro"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0993b8f5bbcf35ec130f9d305cefbbd81f00c014c049bf298bd218529989b054"
+dependencies = [
+ "openapiv3",
+ "proc-macro2",
+ "progenitor-impl",
+ "quote",
+ "serde",
+ "serde_json",
+ "serde_tokenstream",
+ "syn",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.11.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
+dependencies = [
+ "base64",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "lazy_static",
+ "log",
+ "mime",
+ "native-tls",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-util 0.6.9",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "rustfmt-wrapper"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7733577fb5b13c8b256232e7ca84aa424f915efae6ec980082d60a03f99da3f8"
+dependencies = [
+ "tempfile",
+ "thiserror",
+ "toolchain_find",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
+dependencies = [
+ "lazy_static",
+ "winapi",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6b5a3c80cea1ab61f4260238409510e814e38b4b563c06044edf91e7dc070e3"
+dependencies = [
+ "chrono",
+ "dyn-clone",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+ "uuid",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
+dependencies = [
+ "bitflags",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
+dependencies = [
+ "semver-parser",
+]
+
+[[package]]
+name = "semver-parser"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
+dependencies = [
+ "pest",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_tokenstream"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6deb15c3a535e81438110111d90168d91721652f502abb147f31cde129f683d"
+dependencies = [
+ "proc-macro2",
+ "serde",
+ "syn",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
+
+[[package]]
+name = "socket2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "libc",
+ "redox_syscall",
+ "remove_dir_all",
+ "winapi",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "time"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+
+[[package]]
+name = "tokio"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f48b6d60512a392e34dbf7fd456249fd2de3c83669ab642e021903f4015185b"
+dependencies = [
+ "bytes",
+ "libc",
+ "memchr",
+ "mio",
+ "once_cell",
+ "pin-project-lite",
+ "socket2",
+ "winapi",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "log",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toolchain_find"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e85654a10e7a07a47c6f19d93818f3f343e22927f2fa280c84f7c8042743413"
+dependencies = [
+ "home",
+ "lazy_static",
+ "regex",
+ "semver",
+ "walkdir",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
+
+[[package]]
+name = "tracing"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
+dependencies = [
+ "cfg-if",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
+
+[[package]]
+name = "typify"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75e642ba5bfa5a7b2e085a700f5f5111b069a833156f82c53a365210e545258d"
+dependencies = [
+ "typify-impl",
+ "typify-macro",
+]
+
+[[package]]
+name = "typify-impl"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54b1b5a377f1e0dceb8a18b25c86c80b32d0882b01e1585fd520354a56b7c30c"
+dependencies = [
+ "heck",
+ "log",
+ "proc-macro2",
+ "quote",
+ "rustfmt-wrapper",
+ "schemars",
+ "serde_json",
+ "syn",
+ "thiserror",
+ "unicode-xid",
+]
+
+[[package]]
+name = "typify-macro"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25cad3517ce4190a7f108cd6360da245c7e289060003d077156f2da7dcf1f568"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "schemars",
+ "serde",
+ "serde_json",
+ "serde_tokenstream",
+ "syn",
+ "typify-impl",
+]
+
+[[package]]
+name = "ucd-trie"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+
+[[package]]
+name = "url"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "matches",
+ "percent-encoding",
+]
+
+[[package]]
+name = "uuid"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
+dependencies = [
+ "getrandom",
+ "serde",
+]
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "walkdir"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+dependencies = [
+ "same-file",
+ "winapi",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.10.2+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
+dependencies = [
+ "bumpalo",
+ "lazy_static",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
+
+[[package]]
+name = "web-sys"
+version = "0.3.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "winreg"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "zerotier-central-api"
+version = "1.1.0"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "futures",
+ "progenitor",
+ "progenitor-client",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "uuid",
+]
diff --git a/zerotier-central-api/Cargo.toml b/zerotier-central-api/Cargo.toml
index 7532112..22b7dd3 100644
--- a/zerotier-central-api/Cargo.toml
+++ b/zerotier-central-api/Cargo.toml
@@ -1,18 +1,21 @@
[package]
name = "zerotier-central-api"
-version = "1.0.3"
-edition = "2018"
-description = "OpenAPI bindings to the ZeroTier Central (https://my.zerotier.com) service"
+version = "1.1.0"
+edition = "2021"
+description = "ZeroTier Central API for Rust"
authors = ["Erik Hollensbe ", "Adam Ierymenko "]
license = "BSD-3-Clause"
[dependencies]
-serde = "^1.0"
-serde_derive = "^1.0"
-serde_json = "^1.0"
-url = "^2.2"
-[dependencies.reqwest]
-version = "^0.11"
-features = ["json", "multipart"]
+progenitor-client = ">=0"
+reqwest = { version = "0.11", features = ["json", "stream"] }
+serde = { version = "1.0", features = [ "derive" ] }
+chrono = { version = "0.4", features = [ "serde" ] }
+uuid = { version = "0.8", features = [ "serde", "v4" ] }
+futures = "0.3"
+serde_json = "1.0"
-[dev-dependencies]
+[build-dependencies]
+anyhow = ">=0"
+progenitor = ">=0"
+serde_json = "1.0"
diff --git a/zerotier-central-api/README.md b/zerotier-central-api/README.md
deleted file mode 100644
index 8089eaf..0000000
--- a/zerotier-central-api/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Rust API client for zerotier-central-api
-
-ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
-
-For more information, please visit [https://discuss.zerotier.com](https://discuss.zerotier.com)
-
-## Overview
-
-This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
-
-- API version: v1
-- Package version: v1
-- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
-
-## Installation
-
-Put the package under your project folder in a directory named `zerotier-central-api` and add the following to `Cargo.toml` under `[dependencies]`:
-
-```
-zerotier-central-api = { path = "./zerotier-central-api" }
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*NetworkApi* | [**delete_network**](docs/NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | delete network
-*NetworkApi* | [**get_network_by_id**](docs/NetworkApi.md#get_network_by_id) | **GET** /network/{networkID} | Get network by ID
-*NetworkApi* | [**get_network_list**](docs/NetworkApi.md#get_network_list) | **GET** /network | Returns a list of Networks you have access to.
-*NetworkApi* | [**new_network**](docs/NetworkApi.md#new_network) | **POST** /network | Create a new network.
-*NetworkApi* | [**update_network**](docs/NetworkApi.md#update_network) | **POST** /network/{networkID} | update network configuration
-*NetworkMemberApi* | [**delete_network_member**](docs/NetworkMemberApi.md#delete_network_member) | **DELETE** /network/{networkID}/member/{memberID} | Delete a network member
-*NetworkMemberApi* | [**get_network_member**](docs/NetworkMemberApi.md#get_network_member) | **GET** /network/{networkID}/member/{memberID} | Return an individual member on a network
-*NetworkMemberApi* | [**get_network_member_list**](docs/NetworkMemberApi.md#get_network_member_list) | **GET** /network/{networkID}/member | Returns a list of Members on the network.
-*NetworkMemberApi* | [**update_network_member**](docs/NetworkMemberApi.md#update_network_member) | **POST** /network/{networkID}/member/{memberID} | Modify a network member
-*OrganizationsApi* | [**accept_invitation**](docs/OrganizationsApi.md#accept_invitation) | **POST** /org-invitation/{inviteID} | Accept organization invitation
-*OrganizationsApi* | [**decline_invitation**](docs/OrganizationsApi.md#decline_invitation) | **DELETE** /org-invitation/{inviteID} | Decline organization invitation
-*OrganizationsApi* | [**get_invitation_by_id**](docs/OrganizationsApi.md#get_invitation_by_id) | **GET** /org-invitation/{inviteID} | Get organization invitation
-*OrganizationsApi* | [**get_organization**](docs/OrganizationsApi.md#get_organization) | **GET** /org | Get the current user's organization
-*OrganizationsApi* | [**get_organization_by_id**](docs/OrganizationsApi.md#get_organization_by_id) | **GET** /org/{orgID} | Get organization by ID
-*OrganizationsApi* | [**get_organization_invitation_list**](docs/OrganizationsApi.md#get_organization_invitation_list) | **GET** /org-invitation | Get list of organization invitations
-*OrganizationsApi* | [**get_organization_members**](docs/OrganizationsApi.md#get_organization_members) | **GET** /org/{orgID}/user | Get list of organization members
-*OrganizationsApi* | [**invite_user_by_email**](docs/OrganizationsApi.md#invite_user_by_email) | **POST** /org-invitation | Invite a user to your organization by email
-*UserApi* | [**add_api_token**](docs/UserApi.md#add_api_token) | **POST** /user/{userID}/token | Add an API token
-*UserApi* | [**delete_api_token**](docs/UserApi.md#delete_api_token) | **DELETE** /user/{userID}/token/{tokenName} | Delete API Token
-*UserApi* | [**delete_user_by_id**](docs/UserApi.md#delete_user_by_id) | **DELETE** /user/{userID} | Delete user
-*UserApi* | [**get_user_by_id**](docs/UserApi.md#get_user_by_id) | **GET** /user/{userID} | Get user record
-*UserApi* | [**update_user_by_id**](docs/UserApi.md#update_user_by_id) | **POST** /user/{userID} | Update user record (SMS number or Display Name only)
-*UtilApi* | [**get_random_token**](docs/UtilApi.md#get_random_token) | **GET** /randomToken | Get a random 32 character token
-*UtilApi* | [**get_status**](docs/UtilApi.md#get_status) | **GET** /status | Obtain the overall status of the account tied to the API token in use.
-
-
-## Documentation For Models
-
- - [ApiToken](docs/ApiToken.md)
- - [AuthMethods](docs/AuthMethods.md)
- - [Dns](docs/Dns.md)
- - [InviteStatus](docs/InviteStatus.md)
- - [IpRange](docs/IpRange.md)
- - [Ipv4AssignMode](docs/Ipv4AssignMode.md)
- - [Ipv6AssignMode](docs/Ipv6AssignMode.md)
- - [Member](docs/Member.md)
- - [MemberConfig](docs/MemberConfig.md)
- - [Network](docs/Network.md)
- - [NetworkConfig](docs/NetworkConfig.md)
- - [Organization](docs/Organization.md)
- - [OrganizationInvitation](docs/OrganizationInvitation.md)
- - [OrganizationMember](docs/OrganizationMember.md)
- - [Permissions](docs/Permissions.md)
- - [RandomToken](docs/RandomToken.md)
- - [Route](docs/Route.md)
- - [Status](docs/Status.md)
- - [StatusLoginMethods](docs/StatusLoginMethods.md)
- - [User](docs/User.md)
-
-
-To get access to the crate's generated documentation, use:
-
-```
-cargo doc --open
-```
-
-## Author
-
-
-
diff --git a/zerotier-central-api/build.rs b/zerotier-central-api/build.rs
new file mode 100644
index 0000000..cdae78c
--- /dev/null
+++ b/zerotier-central-api/build.rs
@@ -0,0 +1,13 @@
+use std::{path::PathBuf, str::FromStr};
+
+fn main() {
+ let src = PathBuf::from_str("openapi.json").unwrap();
+ let file = std::fs::File::open(src).unwrap();
+ let spec = serde_json::from_reader(file).unwrap();
+ let mut generator = progenitor::Generator::new();
+
+ let content = generator.generate_text(&spec).unwrap();
+
+ let out_file = std::path::Path::new(&std::env::var("OUT_DIR").unwrap()).to_path_buf();
+ std::fs::write(out_file.join("codegen.rs"), content).unwrap();
+}
diff --git a/zerotier-central-api/docs/ApiToken.md b/zerotier-central-api/docs/ApiToken.md
deleted file mode 100644
index 2f33e43..0000000
--- a/zerotier-central-api/docs/ApiToken.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ApiToken
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**token_name** | Option<**String**> | user specified token name | [optional]
-**token** | Option<**String**> | API Token. Minimum 32 characters. This token is encrypted in the database and can not be retrieved once set | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/AuthMethods.md b/zerotier-central-api/docs/AuthMethods.md
deleted file mode 100644
index c7c2c07..0000000
--- a/zerotier-central-api/docs/AuthMethods.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# AuthMethods
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**local** | Option<**String**> | email address for built-in authentication | [optional][readonly]
-**google** | Option<**String**> | Google OIDC ID | [optional][readonly]
-**oidc** | Option<**String**> | Generic OIDC ID | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Dns.md b/zerotier-central-api/docs/Dns.md
deleted file mode 100644
index 6513460..0000000
--- a/zerotier-central-api/docs/Dns.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Dns
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**domain** | Option<**String**> | Search domain to use for DNS records | [optional]
-**servers** | Option<**Vec**> | IP address of unicast DNS service | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/InviteStatus.md b/zerotier-central-api/docs/InviteStatus.md
deleted file mode 100644
index 74709eb..0000000
--- a/zerotier-central-api/docs/InviteStatus.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# InviteStatus
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/IpRange.md b/zerotier-central-api/docs/IpRange.md
deleted file mode 100644
index ddcb0a3..0000000
--- a/zerotier-central-api/docs/IpRange.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# IpRange
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**ip_range_start** | Option<**String**> | | [optional]
-**ip_range_end** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Ipv4AssignMode.md b/zerotier-central-api/docs/Ipv4AssignMode.md
deleted file mode 100644
index 39a1fe8..0000000
--- a/zerotier-central-api/docs/Ipv4AssignMode.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Ipv4AssignMode
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**zt** | Option<**bool**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Ipv6AssignMode.md b/zerotier-central-api/docs/Ipv6AssignMode.md
deleted file mode 100644
index 74813e9..0000000
--- a/zerotier-central-api/docs/Ipv6AssignMode.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Ipv6AssignMode
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**var_6plane** | Option<**bool**> | | [optional]
-**rfc4193** | Option<**bool**> | | [optional]
-**zt** | Option<**bool**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Member.md b/zerotier-central-api/docs/Member.md
deleted file mode 100644
index eecb46c..0000000
--- a/zerotier-central-api/docs/Member.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Member
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | concatenation of network ID and member ID | [optional][readonly]
-**clock** | Option<**i64**> | | [optional][readonly]
-**network_id** | Option<**String**> | | [optional][readonly]
-**node_id** | Option<**String**> | ZeroTier ID of the member | [optional][readonly]
-**controller_id** | Option<**String**> | | [optional][readonly]
-**hidden** | Option<**bool**> | Whether or not the member is hidden in the UI | [optional]
-**name** | Option<**String**> | User defined name of the member | [optional]
-**description** | Option<**String**> | User defined description of the member | [optional]
-**config** | Option<[**crate::models::MemberConfig**](MemberConfig.md)> | | [optional]
-**last_online** | Option<**i64**> | Last seen time of the member | [optional][readonly]
-**physical_address** | Option<**String**> | IP address the member last spoke to the controller via | [optional][readonly]
-**client_version** | Option<**String**> | ZeroTier version the member is running | [optional][readonly]
-**protocol_version** | Option<**i32**> | ZeroTier protocol version | [optional][readonly]
-**supports_rules_engine** | Option<**bool**> | Whether or not the client version is new enough to support the rules engine (1.4.0+) | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/MemberConfig.md b/zerotier-central-api/docs/MemberConfig.md
deleted file mode 100644
index ae34de8..0000000
--- a/zerotier-central-api/docs/MemberConfig.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# MemberConfig
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**active_bridge** | Option<**bool**> | Allow the member to be a bridge on the network | [optional]
-**authorized** | Option<**bool**> | Is the member authorized on the network | [optional]
-**capabilities** | Option<**Vec**> | | [optional]
-**creation_time** | Option<**i64**> | Time the member was created or first tried to join the network | [optional][readonly]
-**id** | Option<**String**> | ID of the member node. This is the 10 digit identifier that identifies a ZeroTier node. | [optional][readonly]
-**identity** | Option<**String**> | Public Key of the member's Identity | [optional][readonly]
-**ip_assignments** | Option<**Vec**> | List of assigned IP addresses | [optional]
-**last_authorized_time** | Option<**i64**> | Time the member was authorized on the network | [optional][readonly]
-**last_deauthorized_time** | Option<**i64**> | Time the member was deauthorized on the network | [optional][readonly]
-**no_auto_assign_ips** | Option<**bool**> | Exempt this member from the IP auto assignment pool on a Network | [optional]
-**revision** | Option<**i32**> | Member record revision count | [optional][readonly]
-**tags** | Option<[**Vec>**](array.md)> | Array of 2 member tuples of tag [ID, tag value] | [optional]
-**v_major** | Option<**i32**> | Major version of the client | [optional][readonly]
-**v_minor** | Option<**i32**> | Minor version of the client | [optional][readonly]
-**v_rev** | Option<**i32**> | Revision number of the client | [optional][readonly]
-**v_proto** | Option<**i32**> | Protocol version of the client | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Network.md b/zerotier-central-api/docs/Network.md
deleted file mode 100644
index afedcd5..0000000
--- a/zerotier-central-api/docs/Network.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Network
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | | [optional][readonly]
-**clock** | Option<**i64**> | | [optional][readonly]
-**config** | Option<[**crate::models::NetworkConfig**](NetworkConfig.md)> | | [optional]
-**description** | Option<**String**> | | [optional]
-**rules_source** | Option<**String**> | | [optional]
-**permissions** | Option<[**::std::collections::HashMap**](Permissions.md)> | | [optional]
-**owner_id** | Option<**String**> | | [optional]
-**online_member_count** | Option<**i32**> | | [optional][readonly]
-**authorized_member_count** | Option<**i32**> | | [optional][readonly]
-**total_member_count** | Option<**i32**> | | [optional][readonly]
-**capabilities_by_name** | Option<[**serde_json::Value**](.md)> | | [optional]
-**tags_by_name** | Option<[**serde_json::Value**](.md)> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/NetworkApi.md b/zerotier-central-api/docs/NetworkApi.md
deleted file mode 100644
index c2da1d3..0000000
--- a/zerotier-central-api/docs/NetworkApi.md
+++ /dev/null
@@ -1,153 +0,0 @@
-# \NetworkApi
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**delete_network**](NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | delete network
-[**get_network_by_id**](NetworkApi.md#get_network_by_id) | **GET** /network/{networkID} | Get network by ID
-[**get_network_list**](NetworkApi.md#get_network_list) | **GET** /network | Returns a list of Networks you have access to.
-[**new_network**](NetworkApi.md#new_network) | **POST** /network | Create a new network.
-[**update_network**](NetworkApi.md#update_network) | **POST** /network/{networkID} | update network configuration
-
-
-
-## delete_network
-
-> delete_network(network_id)
-delete network
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_network_by_id
-
-> crate::models::Network get_network_by_id(network_id)
-Get network by ID
-
-Returns a single network
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network to return | [required] |
-
-### Return type
-
-[**crate::models::Network**](Network.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_network_list
-
-> Vec get_network_list()
-Returns a list of Networks you have access to.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Vec**](Network.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## new_network
-
-> crate::models::Network new_network(body)
-Create a new network.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**body** | **serde_json::Value** | empty JSON object | [required] |
-
-### Return type
-
-[**crate::models::Network**](Network.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## update_network
-
-> crate::models::Network update_network(network_id, network)
-update network configuration
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network to change | [required] |
-**network** | [**Network**](Network.md) | Network object JSON | [required] |
-
-### Return type
-
-[**crate::models::Network**](Network.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-central-api/docs/NetworkConfig.md b/zerotier-central-api/docs/NetworkConfig.md
deleted file mode 100644
index 44bb5b2..0000000
--- a/zerotier-central-api/docs/NetworkConfig.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# NetworkConfig
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | Network ID | [optional][readonly]
-**creation_time** | Option<**i64**> | Time the network was created | [optional][readonly]
-**capabilities** | Option<[**Vec**](serde_json::Value.md)> | Array of network capabilities | [optional]
-**dns** | Option<[**crate::models::Dns**](.md)> | | [optional]
-**enable_broadcast** | Option<**bool**> | Enable broadcast packets on the network | [optional]
-**ip_assignment_pools** | Option<[**Vec**](IPRange.md)> | Range of IP addresses for the auto assign pool | [optional]
-**last_modified** | Option<**i64**> | Time the network was last modified | [optional][readonly]
-**mtu** | Option<**i32**> | MTU to set on the client virtual network adapter | [optional]
-**multicast_limit** | Option<**i32**> | Maximum number of recipients per multicast or broadcast. Warning - Setting this to 0 will disable IPv4 communication on your network! | [optional]
-**name** | Option<**String**> | | [optional]
-**private** | Option<**bool**> | Whether or not the network is private. If false, members will *NOT* need to be authorized to join. | [optional]
-**routes** | Option<[**Vec**](Route.md)> | | [optional]
-**rules** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**tags** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**v4_assign_mode** | Option<[**crate::models::Ipv4AssignMode**](IPV4AssignMode.md)> | | [optional]
-**v6_assign_mode** | Option<[**crate::models::Ipv6AssignMode**](IPV6AssignMode.md)> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/NetworkMemberApi.md b/zerotier-central-api/docs/NetworkMemberApi.md
deleted file mode 100644
index f00bd9f..0000000
--- a/zerotier-central-api/docs/NetworkMemberApi.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# \NetworkMemberApi
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**delete_network_member**](NetworkMemberApi.md#delete_network_member) | **DELETE** /network/{networkID}/member/{memberID} | Delete a network member
-[**get_network_member**](NetworkMemberApi.md#get_network_member) | **GET** /network/{networkID}/member/{memberID} | Return an individual member on a network
-[**get_network_member_list**](NetworkMemberApi.md#get_network_member_list) | **GET** /network/{networkID}/member | Returns a list of Members on the network.
-[**update_network_member**](NetworkMemberApi.md#update_network_member) | **POST** /network/{networkID}/member/{memberID} | Modify a network member
-
-
-
-## delete_network_member
-
-> delete_network_member(network_id, member_id)
-Delete a network member
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network | [required] |
-**member_id** | **String** | ID of the member | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_network_member
-
-> crate::models::Member get_network_member(network_id, member_id)
-Return an individual member on a network
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network | [required] |
-**member_id** | **String** | ID of the member | [required] |
-
-### Return type
-
-[**crate::models::Member**](Member.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_network_member_list
-
-> Vec get_network_member_list(network_id)
-Returns a list of Members on the network.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network to return | [required] |
-
-### Return type
-
-[**Vec**](Member.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## update_network_member
-
-> crate::models::Member update_network_member(network_id, member_id, member)
-Modify a network member
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network | [required] |
-**member_id** | **String** | ID of the member | [required] |
-**member** | [**Member**](Member.md) | Member object JSON | [required] |
-
-### Return type
-
-[**crate::models::Member**](Member.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-central-api/docs/Organization.md b/zerotier-central-api/docs/Organization.md
deleted file mode 100644
index dd75811..0000000
--- a/zerotier-central-api/docs/Organization.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Organization
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | Organization ID | [optional]
-**owner_id** | Option<**String**> | User ID of the organization owner | [optional][readonly]
-**owner_email** | Option<**String**> | Organization owner's email address | [optional][readonly]
-**members** | Option<[**Vec**](OrganizationMember.md)> | List of organization members | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/OrganizationInvitation.md b/zerotier-central-api/docs/OrganizationInvitation.md
deleted file mode 100644
index 526d672..0000000
--- a/zerotier-central-api/docs/OrganizationInvitation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# OrganizationInvitation
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**org_id** | Option<**String**> | Organization ID | [optional][readonly]
-**email** | Option<**String**> | Email address of invitee | [optional]
-**id** | Option<**String**> | Invitation ID | [optional][readonly]
-**creation_time** | Option<**i64**> | Creation time of the invite | [optional][readonly]
-**status** | Option<[**crate::models::InviteStatus**](InviteStatus.md)> | Invitation status | [optional][readonly]
-**update_time** | Option<**i64**> | Last updated time of the invitation | [optional][readonly]
-**owner_email** | Option<**String**> | Organization owner email address | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/OrganizationMember.md b/zerotier-central-api/docs/OrganizationMember.md
deleted file mode 100644
index ad93188..0000000
--- a/zerotier-central-api/docs/OrganizationMember.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# OrganizationMember
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**org_id** | Option<**String**> | Organization ID | [optional][readonly]
-**user_id** | Option<**String**> | User ID | [optional]
-**name** | Option<**String**> | Organization member display name | [optional][readonly]
-**email** | Option<**String**> | Organization member email address | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/OrganizationsApi.md b/zerotier-central-api/docs/OrganizationsApi.md
deleted file mode 100644
index 2cef97a..0000000
--- a/zerotier-central-api/docs/OrganizationsApi.md
+++ /dev/null
@@ -1,234 +0,0 @@
-# \OrganizationsApi
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**accept_invitation**](OrganizationsApi.md#accept_invitation) | **POST** /org-invitation/{inviteID} | Accept organization invitation
-[**decline_invitation**](OrganizationsApi.md#decline_invitation) | **DELETE** /org-invitation/{inviteID} | Decline organization invitation
-[**get_invitation_by_id**](OrganizationsApi.md#get_invitation_by_id) | **GET** /org-invitation/{inviteID} | Get organization invitation
-[**get_organization**](OrganizationsApi.md#get_organization) | **GET** /org | Get the current user's organization
-[**get_organization_by_id**](OrganizationsApi.md#get_organization_by_id) | **GET** /org/{orgID} | Get organization by ID
-[**get_organization_invitation_list**](OrganizationsApi.md#get_organization_invitation_list) | **GET** /org-invitation | Get list of organization invitations
-[**get_organization_members**](OrganizationsApi.md#get_organization_members) | **GET** /org/{orgID}/user | Get list of organization members
-[**invite_user_by_email**](OrganizationsApi.md#invite_user_by_email) | **POST** /org-invitation | Invite a user to your organization by email
-
-
-
-## accept_invitation
-
-> crate::models::OrganizationInvitation accept_invitation(invite_id)
-Accept organization invitation
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**invite_id** | **String** | Invitation ID | [required] |
-
-### Return type
-
-[**crate::models::OrganizationInvitation**](OrganizationInvitation.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## decline_invitation
-
-> decline_invitation(invite_id)
-Decline organization invitation
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**invite_id** | **String** | Invitation ID | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_invitation_by_id
-
-> crate::models::OrganizationInvitation get_invitation_by_id(invite_id)
-Get organization invitation
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**invite_id** | **String** | Invitation ID | [required] |
-
-### Return type
-
-[**crate::models::OrganizationInvitation**](OrganizationInvitation.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_organization
-
-> crate::models::Organization get_organization()
-Get the current user's organization
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**crate::models::Organization**](Organization.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_organization_by_id
-
-> crate::models::Organization get_organization_by_id(org_id)
-Get organization by ID
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**org_id** | **String** | Organization ID | [required] |
-
-### Return type
-
-[**crate::models::Organization**](Organization.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_organization_invitation_list
-
-> Vec get_organization_invitation_list()
-Get list of organization invitations
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Vec**](OrganizationInvitation.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_organization_members
-
-> crate::models::OrganizationMember get_organization_members(org_id)
-Get list of organization members
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**org_id** | **String** | Organization ID | [required] |
-
-### Return type
-
-[**crate::models::OrganizationMember**](OrganizationMember.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## invite_user_by_email
-
-> crate::models::OrganizationInvitation invite_user_by_email(organization_invitation)
-Invite a user to your organization by email
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**organization_invitation** | [**OrganizationInvitation**](OrganizationInvitation.md) | Organization Invitation JSON object | [required] |
-
-### Return type
-
-[**crate::models::OrganizationInvitation**](OrganizationInvitation.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-central-api/docs/Permissions.md b/zerotier-central-api/docs/Permissions.md
deleted file mode 100644
index 80cf624..0000000
--- a/zerotier-central-api/docs/Permissions.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Permissions
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**a** | Option<**bool**> | Authorize permission | [optional]
-**d** | Option<**bool**> | Delete permission | [optional]
-**m** | Option<**bool**> | Modify network settings permission | [optional]
-**r** | Option<**bool**> | Read network settings permission | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/RandomToken.md b/zerotier-central-api/docs/RandomToken.md
deleted file mode 100644
index 9e6bb53..0000000
--- a/zerotier-central-api/docs/RandomToken.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# RandomToken
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**clock** | Option<**i64**> | Current time on server | [optional][readonly]
-**hex** | Option<**String**> | hex encoded random bytes of the token | [optional][readonly]
-**token** | Option<**String**> | Random 32 character token | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Route.md b/zerotier-central-api/docs/Route.md
deleted file mode 100644
index d1748c2..0000000
--- a/zerotier-central-api/docs/Route.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Route
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**target** | Option<**String**> | | [optional]
-**via** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/Status.md b/zerotier-central-api/docs/Status.md
deleted file mode 100644
index 7901cd7..0000000
--- a/zerotier-central-api/docs/Status.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Status
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | | [optional]
-**_type** | Option<**String**> | | [optional]
-**clock** | Option<**i64**> | Current time on server | [optional][readonly]
-**version** | Option<**String**> | | [optional]
-**api_version** | Option<**String**> | | [optional]
-**uptime** | Option<**i64**> | Uptime on server | [optional][readonly]
-**user** | Option<[**crate::models::User**](User.md)> | | [optional]
-**read_only_mode** | Option<**bool**> | | [optional]
-**login_methods** | Option<[**crate::models::StatusLoginMethods**](Status_loginMethods.md)> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/StatusLoginMethods.md b/zerotier-central-api/docs/StatusLoginMethods.md
deleted file mode 100644
index dad5ce7..0000000
--- a/zerotier-central-api/docs/StatusLoginMethods.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# StatusLoginMethods
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**local** | Option<**bool**> | | [optional]
-**google** | Option<**bool**> | | [optional]
-**twitter** | Option<**bool**> | | [optional]
-**facebook** | Option<**bool**> | | [optional]
-**github** | Option<**bool**> | | [optional]
-**saml** | Option<**bool**> | | [optional]
-**oidc** | Option<**bool**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/User.md b/zerotier-central-api/docs/User.md
deleted file mode 100644
index 083af1e..0000000
--- a/zerotier-central-api/docs/User.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# User
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | User ID | [optional][readonly]
-**org_id** | Option<**String**> | Organization ID | [optional][readonly]
-**global_permissions** | Option<[**crate::models::Permissions**](Permissions.md)> | | [optional][readonly]
-**display_name** | Option<**String**> | Display Name | [optional]
-**email** | Option<**String**> | User email address | [optional][readonly]
-**auth** | Option<[**crate::models::AuthMethods**](AuthMethods.md)> | | [optional][readonly]
-**sms_number** | Option<**String**> | SMS number | [optional]
-**tokens** | Option<**Vec**> | List of API token names. | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-central-api/docs/UserApi.md b/zerotier-central-api/docs/UserApi.md
deleted file mode 100644
index 2ffde0e..0000000
--- a/zerotier-central-api/docs/UserApi.md
+++ /dev/null
@@ -1,158 +0,0 @@
-# \UserApi
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**add_api_token**](UserApi.md#add_api_token) | **POST** /user/{userID}/token | Add an API token
-[**delete_api_token**](UserApi.md#delete_api_token) | **DELETE** /user/{userID}/token/{tokenName} | Delete API Token
-[**delete_user_by_id**](UserApi.md#delete_user_by_id) | **DELETE** /user/{userID} | Delete user
-[**get_user_by_id**](UserApi.md#get_user_by_id) | **GET** /user/{userID} | Get user record
-[**update_user_by_id**](UserApi.md#update_user_by_id) | **POST** /user/{userID} | Update user record (SMS number or Display Name only)
-
-
-
-## add_api_token
-
-> crate::models::ApiToken add_api_token(user_id, api_token)
-Add an API token
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**user_id** | **String** | User ID | [required] |
-**api_token** | [**ApiToken**](ApiToken.md) | APIToken JSON object | [required] |
-
-### Return type
-
-[**crate::models::ApiToken**](APIToken.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## delete_api_token
-
-> delete_api_token(user_id, token_name)
-Delete API Token
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**user_id** | **String** | User ID | [required] |
-**token_name** | **String** | Token Name | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## delete_user_by_id
-
-> delete_user_by_id(user_id)
-Delete user
-
-Deletes the user and all associated networks. This is not reversible. Delete at your own risk.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**user_id** | **String** | User ID | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_user_by_id
-
-> crate::models::User get_user_by_id(user_id)
-Get user record
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**user_id** | **String** | User ID | [required] |
-
-### Return type
-
-[**crate::models::User**](User.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## update_user_by_id
-
-> crate::models::User update_user_by_id(user_id, user)
-Update user record (SMS number or Display Name only)
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**user_id** | **String** | User ID | [required] |
-**user** | [**User**](User.md) | User object JSON | [required] |
-
-### Return type
-
-[**crate::models::User**](User.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-central-api/docs/UtilApi.md b/zerotier-central-api/docs/UtilApi.md
deleted file mode 100644
index 8108c7f..0000000
--- a/zerotier-central-api/docs/UtilApi.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# \UtilApi
-
-All URIs are relative to *https://my.zerotier.com/api/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**get_random_token**](UtilApi.md#get_random_token) | **GET** /randomToken | Get a random 32 character token
-[**get_status**](UtilApi.md#get_status) | **GET** /status | Obtain the overall status of the account tied to the API token in use.
-
-
-
-## get_random_token
-
-> crate::models::RandomToken get_random_token()
-Get a random 32 character token
-
-Get a random 32 character. Used by the web UI to generate API keys
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**crate::models::RandomToken**](RandomToken.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_status
-
-> crate::models::Status get_status()
-Obtain the overall status of the account tied to the API token in use.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**crate::models::Status**](Status.md)
-
-### Authorization
-
-[bearerAuth](../README.md#bearerAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-central-api/git_push.sh b/zerotier-central-api/git_push.sh
deleted file mode 100644
index f53a75d..0000000
--- a/zerotier-central-api/git_push.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
-#
-# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
-
-git_user_id=$1
-git_repo_id=$2
-release_note=$3
-git_host=$4
-
-if [ "$git_host" = "" ]; then
- git_host="github.com"
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
-fi
-
-if [ "$git_user_id" = "" ]; then
- git_user_id="GIT_USER_ID"
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
-fi
-
-if [ "$git_repo_id" = "" ]; then
- git_repo_id="GIT_REPO_ID"
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
-fi
-
-if [ "$release_note" = "" ]; then
- release_note="Minor update"
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
-fi
-
-# Initialize the local directory as a Git repository
-git init
-
-# Adds the files in the local repository and stages them for commit.
-git add .
-
-# Commits the tracked changes and prepares them to be pushed to a remote repository.
-git commit -m "$release_note"
-
-# Sets the new remote
-git_remote=$(git remote)
-if [ "$git_remote" = "" ]; then # git remote not defined
-
- if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
- else
- git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
- fi
-
-fi
-
-git pull origin master
-
-# Pushes (Forces) the changes in the local repository up to the remote repository
-echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
-git push origin master 2>&1 | grep -v 'To https'
diff --git a/zerotier-central-api/openapi.json b/zerotier-central-api/openapi.json
new file mode 100644
index 0000000..a73ac97
--- /dev/null
+++ b/zerotier-central-api/openapi.json
@@ -0,0 +1,1794 @@
+{
+ "openapi": "3.0.0",
+ "info": {
+ "description": "ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
",
+ "version": "v1",
+ "title": "ZeroTier Central API",
+ "contact": {
+ "name": "ZeroTier Support Discussion Forum",
+ "url": "https://discuss.zerotier.com"
+ },
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ },
+ "servers": [
+ {
+ "url": "https://my.zerotier.com/api/v1",
+ "description": "Production Server"
+ }
+ ],
+ "tags": [
+ {
+ "name": "network",
+ "description": "Network operations"
+ },
+ {
+ "name": "network-member",
+ "description": "Network member operations"
+ },
+ {
+ "name": "user",
+ "description": "User management operations"
+ },
+ {
+ "name": "organizations",
+ "description": "Organization management. Note: Organizations require a paid account and cannot be created via the API"
+ },
+ {
+ "name": "util",
+ "description": "Utility endpoints"
+ }
+ ],
+ "paths": {
+ "/status": {
+ "get": {
+ "tags": ["util"],
+ "summary": "Obtain the overall status of the account tied to the API token in use.",
+ "operationId": "getStatus",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Status"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/network": {
+ "get": {
+ "tags": ["network"],
+ "summary": "Returns a list of Networks you have access to.",
+ "operationId": "getNetworkList",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ },
+ "post": {
+ "tags": ["network"],
+ "summary": "Create a new network.",
+ "operationId": "newNetwork",
+ "requestBody": {
+ "description": "empty JSON object",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Network creation succeeded",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "403": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/network/{networkID}": {
+ "get": {
+ "tags": ["network"],
+ "summary": "Get network by ID",
+ "description": "Returns a single network",
+ "operationId": "getNetworkByID",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network to return",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "get success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "post": {
+ "tags": ["network"],
+ "summary": "update network configuration",
+ "operationId": "updateNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network to change",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Network object JSON",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": ["network"],
+ "summary": "delete network",
+ "operationId": "deleteNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "network deleted"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/network/{networkID}/member": {
+ "get": {
+ "tags": ["network-member"],
+ "summary": "Returns a list of Members on the network.",
+ "operationId": "getNetworkMemberList",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network to return",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "member list get success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Member"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/network/{networkID}/member/{memberID}": {
+ "get": {
+ "tags": ["network-member"],
+ "operationId": "getNetworkMember",
+ "summary": "Return an individual member on a network",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "memberID",
+ "description": "ID of the member",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "member get success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Member"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "post": {
+ "tags": ["network-member"],
+ "operationId": "updateNetworkMember",
+ "summary": "Modify a network member",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "memberID",
+ "description": "ID of the member",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Member object JSON",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Member"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "member changed successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Member"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": ["network-member"],
+ "operationId": "deleteNetworkMember",
+ "summary": "Delete a network member",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "memberID",
+ "description": "ID of the member",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "member deleted"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/user/{userID}": {
+ "get": {
+ "tags": ["user"],
+ "operationId": "getUserByID",
+ "summary": "Get user record",
+ "parameters": [
+ {
+ "name": "userID",
+ "description": "User ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "User get success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "post": {
+ "tags": ["user"],
+ "operationId": "updateUserByID",
+ "summary": "Update user record (SMS number or Display Name only)",
+ "parameters": [
+ {
+ "name": "userID",
+ "description": "User ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "User object JSON",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "User update success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": ["user"],
+ "operationId": "deleteUserByID",
+ "summary": "Delete user",
+ "description": "Deletes the user and all associated networks. This is not reversible. Delete at your own risk.",
+ "parameters": [
+ {
+ "name": "userID",
+ "description": "User ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "user deleted"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/user/{userID}/token": {
+ "post": {
+ "tags": ["user"],
+ "operationId": "addAPIToken",
+ "summary": "Add an API token",
+ "parameters": [
+ {
+ "name": "userID",
+ "description": "User ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "APIToken JSON object",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/APIToken"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "API Token added",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/APIToken"
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/user/{userID}/token/{tokenName}": {
+ "delete": {
+ "tags": ["user"],
+ "operationId": "deleteAPIToken",
+ "summary": "Delete API Token",
+ "parameters": [
+ {
+ "name": "userID",
+ "description": "User ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "tokenName",
+ "description": "Token Name",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "API token deleted"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/org": {
+ "get": {
+ "tags": ["organizations"],
+ "operationId": "getOrganization",
+ "summary": "Get the current user's organization",
+ "responses": {
+ "200": {
+ "description": "Get my organization",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Organization"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/org/{orgID}": {
+ "get": {
+ "tags": ["organizations"],
+ "operationId": "getOrganizationByID",
+ "summary": "Get organization by ID",
+ "parameters": [
+ {
+ "name": "orgID",
+ "description": "Organization ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Organization",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Organization"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/org/{orgID}/user": {
+ "get": {
+ "tags": ["organizations"],
+ "operationId": "getOrganizationMembers",
+ "summary": "Get list of organization members",
+ "parameters": [
+ {
+ "name": "orgID",
+ "description": "Organization ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get organization members success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationMember"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/org-invitation": {
+ "get": {
+ "tags": ["organizations"],
+ "operationId": "getOrganizationInvitationList",
+ "summary": "Get list of organization invitations",
+ "responses": {
+ "200": {
+ "description": "Get list of invitations",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/OrganizationInvitation"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "post": {
+ "tags": ["organizations"],
+ "operationId": "inviteUserByEmail",
+ "summary": "Invite a user to your organization by email",
+ "requestBody": {
+ "description": "Organization Invitation JSON object",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationInvitation"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "User invited to organization",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationInvitation"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/org-invitation/{inviteID}": {
+ "get": {
+ "tags": ["organizations"],
+ "operationId": "getInvitationByID",
+ "summary": "Get organization invitation",
+ "parameters": [
+ {
+ "name": "inviteID",
+ "description": "Invitation ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get organization invitation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationInvitation"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "post": {
+ "tags": ["organizations"],
+ "operationId": "acceptInvitation",
+ "summary": "Accept organization invitation",
+ "parameters": [
+ {
+ "name": "inviteID",
+ "description": "Invitation ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Organization invitation accepted",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationInvitation"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": ["organizations"],
+ "operationId": "declineInvitation",
+ "summary": "Decline organization invitation",
+ "parameters": [
+ {
+ "name": "inviteID",
+ "description": "Invitation ID",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "organization invitation declined"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/AccessDeniedError"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/randomToken": {
+ "get": {
+ "tags": ["util"],
+ "operationId": "getRandomToken",
+ "summary": "Get a random 32 character token",
+ "description": "Get a random 32 character. Used by the web UI to generate API keys",
+ "responses": {
+ "200": {
+ "description": "Random token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RandomToken"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "bearerAuth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ },
+ "responses": {
+ "BadRequest": {
+ "description": "Bad request"
+ },
+ "AccessDeniedError": {
+ "description": "Access denied"
+ },
+ "NotFound": {
+ "description": "Item not found"
+ },
+ "UnauthorizedError": {
+ "description": "Authorization required"
+ }
+ },
+ "schemas": {
+ "Network": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "8056c2e21c000001",
+ "readOnly": true,
+ "nullable": true
+ },
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 12345,
+ "readOnly": true,
+ "nullable": true
+ },
+ "config": {
+ "$ref": "#/components/schemas/NetworkConfig",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "example": "Some descriptive text about my network.",
+ "nullable": true
+ },
+ "rulesSource": {
+ "type": "string",
+ "example": "accept;",
+ "nullable": true
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/PermissionsMap",
+ "nullable": true
+ },
+ "ownerId": {
+ "type": "string",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "nullable": true
+ },
+ "onlineMemberCount": {
+ "type": "integer",
+ "example": 123,
+ "readOnly": true,
+ "nullable": true
+ },
+ "authorizedMemberCount": {
+ "type": "integer",
+ "example": 200,
+ "readOnly": true,
+ "nullable": true
+ },
+ "totalMemberCount": {
+ "type": "integer",
+ "example": 250,
+ "readOnly": true,
+ "nullable": true
+ },
+ "capabilitiesByName": {
+ "type": "object",
+ "nullable": true
+ },
+ "tagsByName": {
+ "type": "object",
+ "nullable": true
+ }
+ },
+ "description": "Network object"
+ },
+ "NetworkConfig": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "8056c2e21c000001",
+ "description": "Network ID",
+ "readOnly": true,
+ "nullable": true
+ },
+ "creationTime": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1442292672978,
+ "description": "Time the network was created",
+ "readOnly": true,
+ "nullable": true
+ },
+ "capabilities": {
+ "type": "array",
+ "description": "Array of network capabilities",
+ "items": {
+ "type": "object"
+ },
+ "nullable": true
+ },
+ "dns": {
+ "type": "object",
+ "$ref": "#/components/schemas/DNS",
+ "nullable": true
+ },
+ "enableBroadcast": {
+ "type": "boolean",
+ "example": true,
+ "description": "Enable broadcast packets on the network",
+ "nullable": true
+ },
+ "ipAssignmentPools": {
+ "type": "array",
+ "description": "Range of IP addresses for the auto assign pool",
+ "items": {
+ "$ref": "#/components/schemas/IPRange"
+ },
+ "nullable": true
+ },
+ "lastModified": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1588184318235,
+ "description": "Time the network was last modified",
+ "readOnly": true,
+ "nullable": true
+ },
+ "mtu": {
+ "type": "integer",
+ "example": 2800,
+ "description": "MTU to set on the client virtual network adapter",
+ "nullable": true
+ },
+ "multicastLimit": {
+ "type": "integer",
+ "example": 32,
+ "description": "Maximum number of recipients per multicast or broadcast. Warning - Setting this to 0 will disable IPv4 communication on your network!",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "example": "My ZeroTier Network",
+ "nullable": true
+ },
+ "private": {
+ "type": "boolean",
+ "example": true,
+ "description": "Whether or not the network is private. If false, members will *NOT* need to be authorized to join.",
+ "nullable": true
+ },
+ "routes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Route"
+ },
+ "nullable": true
+ },
+ "rules": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "nullable": true
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "nullable": true
+ },
+ "v4AssignMode": {
+ "$ref": "#/components/schemas/IPV4AssignMode",
+ "nullable": true
+ },
+ "v6AssignMode": {
+ "$ref": "#/components/schemas/IPV6AssignMode",
+ "nullable": true
+ }
+ }
+ },
+ "Member": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "8056c2e21c000001-abcdef0123",
+ "description": "concatenation of network ID and member ID",
+ "readOnly": true,
+ "deprecated": true,
+ "nullable": true
+ },
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1612993759070,
+ "readOnly": true,
+ "nullable": true
+ },
+ "networkId": {
+ "type": "string",
+ "example": "8056c2e21c000001",
+ "readOnly": true,
+ "nullable": true
+ },
+ "nodeId": {
+ "type": "string",
+ "example": "abcdef01234",
+ "description": "ZeroTier ID of the member",
+ "readOnly": true,
+ "nullable": true
+ },
+ "controllerId": {
+ "type": "string",
+ "example": "8056c2e21c",
+ "readOnly": true,
+ "deprecated": true,
+ "nullable": true
+ },
+ "hidden": {
+ "type": "boolean",
+ "example": false,
+ "description": "Whether or not the member is hidden in the UI",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "example": "my-cray-supercomputer",
+ "readOnly": false,
+ "description": "User defined name of the member",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "example": "My super awesome cray that I got ZeroTier to run on",
+ "readOnly": false,
+ "description": "User defined description of the member",
+ "nullable": true
+ },
+ "config": {
+ "$ref": "#/components/schemas/MemberConfig",
+ "nullable": true
+ },
+ "lastOnline": {
+ "type": "integer",
+ "format": "int64",
+ "readOnly": true,
+ "description": "Last seen time of the member",
+ "example": 1612993673254,
+ "nullable": true
+ },
+ "physicalAddress": {
+ "type": "string",
+ "readOnly": true,
+ "description": "IP address the member last spoke to the controller via",
+ "example": "8.8.8.8",
+ "nullable": true
+ },
+ "clientVersion": {
+ "type": "string",
+ "readOnly": true,
+ "description": "ZeroTier version the member is running",
+ "example": "1.6.3",
+ "nullable": true
+ },
+ "protocolVersion": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "ZeroTier protocol version",
+ "example": 12,
+ "nullable": true
+ },
+ "supportsRulesEngine": {
+ "type": "boolean",
+ "readOnly": true,
+ "description": "Whether or not the client version is new enough to support the rules engine (1.4.0+)",
+ "nullable": true
+ }
+ }
+ },
+ "MemberConfig": {
+ "type": "object",
+ "properties": {
+ "activeBridge": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Allow the member to be a bridge on the network",
+ "example": false,
+ "nullable": true
+ },
+ "authorized": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Is the member authorized on the network",
+ "example": true,
+ "nullable": true
+ },
+ "capabilities": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "nullable": true
+ },
+ "creationTime": {
+ "type": "integer",
+ "format": "int64",
+ "readOnly": true,
+ "description": "Time the member was created or first tried to join the network",
+ "example": 1599853509872,
+ "nullable": true
+ },
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "description": "ID of the member node. This is the 10 digit identifier that identifies a ZeroTier node.",
+ "example": "abcdef01234",
+ "nullable": true
+ },
+ "identity": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Public Key of the member's Identity",
+ "example": "abcdef0123:0:abcdef0123abcdef0123abcdef0123abcdef0123abcdef0123abcdef0123abcdef0123",
+ "nullable": true
+ },
+ "ipAssignments": {
+ "type": "array",
+ "readOnly": false,
+ "description": "List of assigned IP addresses",
+ "items": {
+ "type": "string"
+ },
+ "example": ["10.0.0.3"],
+ "nullable": true
+ },
+ "lastAuthorizedTime": {
+ "type": "integer",
+ "format": "int64",
+ "readOnly": true,
+ "description": "Time the member was authorized on the network",
+ "example": 1599853637989,
+ "nullable": true
+ },
+ "lastDeauthorizedTime": {
+ "type": "integer",
+ "format": "int64",
+ "readOnly": true,
+ "description": "Time the member was deauthorized on the network",
+ "example": 0,
+ "nullable": true
+ },
+ "noAutoAssignIps": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Exempt this member from the IP auto assignment pool on a Network",
+ "example": false,
+ "nullable": true
+ },
+ "revision": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Member record revision count",
+ "example": 123,
+ "nullable": true
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "anyOf": [{ "type": "integer" }, { "type": "boolean" }]
+ }
+ },
+ "nullable": true,
+ "readOnly": false,
+ "description": "Array of 2 member tuples of tag [ID, tag value]",
+ "example": [[123, 456]]
+ },
+ "vMajor": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Major version of the client",
+ "example": 1,
+ "nullable": true
+ },
+ "vMinor": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Minor version of the client",
+ "example": 6,
+ "nullable": true
+ },
+ "vRev": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Revision number of the client",
+ "example": 3,
+ "nullable": true
+ },
+ "vProto": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Protocol version of the client",
+ "example": 12,
+ "nullable": true
+ }
+ }
+ },
+ "User": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "description": "User ID",
+ "example": "00000000-0000-0000-0000-000000000000"
+ },
+ "orgId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Organization ID",
+ "example": "00000000-0000-0000-0000-000000000000"
+ },
+ "globalPermissions": {
+ "readOnly": true,
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Permissions"
+ }
+ ]
+ },
+ "displayName": {
+ "type": "string",
+ "readOnly": false,
+ "description": "Display Name",
+ "example": "Joe User"
+ },
+ "email": {
+ "type": "string",
+ "readOnly": true,
+ "description": "User email address",
+ "example": "user@example.com"
+ },
+ "auth": {
+ "readOnly": true,
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AuthMethods"
+ }
+ ]
+ },
+ "smsNumber": {
+ "type": "string",
+ "readOnly": false,
+ "description": "SMS number",
+ "example": "+1-800-555-1212",
+ "deprecated": true
+ },
+ "tokens": {
+ "type": "array",
+ "readOnly": true,
+ "items": {
+ "type": "string"
+ },
+ "example": ["my-token-id"],
+ "description": "List of API token names."
+ }
+ }
+ },
+ "Organization": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "description": "Organization ID"
+ },
+ "ownerId": {
+ "type": "string",
+ "description": "User ID of the organization owner",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "readOnly": true
+ },
+ "ownerEmail": {
+ "type": "string",
+ "description": "Organization owner's email address",
+ "example": "user@example.com",
+ "readOnly": true
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/OrganizationMember"
+ },
+ "description": "List of organization members"
+ }
+ }
+ },
+ "OrganizationMember": {
+ "type": "object",
+ "properties": {
+ "orgId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Organization ID",
+ "example": "00000000-0000-0000-0000-000000000000"
+ },
+ "userId": {
+ "type": "string",
+ "readOnly": false,
+ "description": "User ID",
+ "example": "00000000-0000-0000-0000-000000000000"
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "nullable": true,
+ "description": "Organization member display name",
+ "example": "Joe User"
+ },
+ "email": {
+ "type": "string",
+ "readOnly": true,
+ "nullable": true,
+ "description": "Organization member email address"
+ }
+ }
+ },
+ "OrganizationInvitation": {
+ "type": "object",
+ "properties": {
+ "orgId": {
+ "type": "string",
+ "description": "Organization ID",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "description": "Email address of invitee",
+ "example": "joe@user.com"
+ },
+ "id": {
+ "type": "string",
+ "description": "Invitation ID",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "readOnly": true
+ },
+ "creation_time": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Creation time of the invite",
+ "example": 1613067920454,
+ "readOnly": true
+ },
+ "status": {
+ "readOnly": true,
+ "description": "Invitation status",
+ "example": "pending",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/InviteStatus"
+ }
+ ]
+ },
+ "update_time": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Last updated time of the invitation",
+ "example": 1613067920454,
+ "readOnly": true
+ },
+ "ownerEmail": {
+ "type": "string",
+ "description": "Organization owner email address",
+ "example": "user@example.com",
+ "readOnly": true
+ }
+ }
+ },
+ "PermissionsMap": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Permissions"
+ },
+ "example": {
+ "00000000-0000-0000-0000-000000000000": {
+ "a": true,
+ "d": true,
+ "m": true,
+ "r": true
+ }
+ }
+ },
+ "Permissions": {
+ "type": "object",
+ "properties": {
+ "a": {
+ "type": "boolean",
+ "example": true,
+ "description": "Authorize permission"
+ },
+ "d": {
+ "type": "boolean",
+ "example": true,
+ "description": "Delete permission"
+ },
+ "m": {
+ "type": "boolean",
+ "example": true,
+ "description": "Modify network settings permission"
+ },
+ "r": {
+ "type": "boolean",
+ "example": true,
+ "description": "Read network settings permission"
+ }
+ }
+ },
+ "IPRange": {
+ "type": "object",
+ "properties": {
+ "ipRangeStart": {
+ "type": "string",
+ "example": "10.0.0.1"
+ },
+ "ipRangeEnd": {
+ "type": "string",
+ "example": "10.0.0.255"
+ }
+ }
+ },
+ "DNS": {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string",
+ "example": "some.domain",
+ "description": "Search domain to use for DNS records"
+ },
+ "servers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["10.0.0.3"],
+ "description": "IP address of unicast DNS service",
+ "nullable": true
+ }
+ }
+ },
+ "Route": {
+ "type": "object",
+ "properties": {
+ "target": {
+ "type": "string",
+ "example": "10.0.0.0/24"
+ },
+ "via": {
+ "type": "string",
+ "example": null,
+ "nullable": true
+ }
+ }
+ },
+ "IPV4AssignMode": {
+ "type": "object",
+ "properties": {
+ "zt": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "IPV6AssignMode": {
+ "type": "object",
+ "properties": {
+ "6plane": {
+ "type": "boolean",
+ "example": true,
+ "nullable": true
+ },
+ "rfc4193": {
+ "type": "boolean",
+ "example": false,
+ "nullable": true
+ },
+ "zt": {
+ "type": "boolean",
+ "example": false,
+ "nullable": true
+ }
+ }
+ },
+ "AuthMethods": {
+ "type": "object",
+ "properties": {
+ "local": {
+ "type": "string",
+ "example": "user@example.com",
+ "description": "email address for built-in authentication",
+ "nullable": true,
+ "readOnly": true
+ },
+ "google": {
+ "type": "string",
+ "example": "156162346876134683",
+ "description": "Google OIDC ID",
+ "nullable": true,
+ "readOnly": true
+ },
+ "oidc": {
+ "type": "string",
+ "example": "00000000-0000-0000-0000-000000000000",
+ "description": "Generic OIDC ID",
+ "nullable": true,
+ "readOnly": true
+ }
+ }
+ },
+ "APIToken": {
+ "type": "object",
+ "properties": {
+ "tokenName": {
+ "type": "string",
+ "example": "my-super-secret-token",
+ "description": "user specified token name",
+ "readOnly": false
+ },
+ "token": {
+ "type": "string",
+ "example": "adsf98ashdkjh3689adsfnj3$ADn",
+ "description": "API Token. Minimum 32 characters. This token is encrypted in the database and can not be retrieved once set",
+ "readOnly": false,
+ "writeOnly": true
+ }
+ }
+ },
+ "InviteStatus": {
+ "type": "string",
+ "enum": ["pending", "accepted", "canceled"]
+ },
+ "Status": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "central_status"
+ },
+ "type": {
+ "type": "string",
+ "example": "CentralStatus"
+ },
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1613067920454,
+ "readOnly": true,
+ "description": "Current time on server"
+ },
+ "version": {
+ "type": "string",
+ "example": "1.6.5"
+ },
+ "apiVersion": {
+ "type": "string",
+ "example": "4"
+ },
+ "uptime": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1613067920454,
+ "readOnly": true,
+ "description": "Uptime on server"
+ },
+ "user": {
+ "$ref": "#/components/schemas/User"
+ },
+ "readOnlyMode": {
+ "type": "boolean"
+ },
+ "loginMethods": {
+ "type": "object",
+ "properties": {
+ "local": {
+ "type": "boolean"
+ },
+ "google": {
+ "type": "boolean"
+ },
+ "twitter": {
+ "type": "boolean"
+ },
+ "facebook": {
+ "type": "boolean"
+ },
+ "github": {
+ "type": "boolean"
+ },
+ "saml": {
+ "type": "boolean"
+ },
+ "oidc": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ },
+ "RandomToken": {
+ "type": "object",
+ "properties": {
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1613067920454,
+ "readOnly": true,
+ "description": "Current time on server"
+ },
+ "hex": {
+ "type": "string",
+ "example": "16924f3ff478526cffb1b89b1040b33c8dbd3c09e07f39691f615769121c0d76",
+ "readOnly": true,
+ "description": "hex encoded random bytes of the token"
+ },
+ "token": {
+ "type": "string",
+ "example": "wwrb66uUh18Fqc38rd8jMd5RFJzRsCn4",
+ "readOnly": true,
+ "description": "Random 32 character token"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+}
diff --git a/zerotier-central-api/src/apis/configuration.rs b/zerotier-central-api/src/apis/configuration.rs
deleted file mode 100644
index 77c3d01..0000000
--- a/zerotier-central-api/src/apis/configuration.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-#[derive(Debug, Clone)]
-pub struct Configuration {
- pub base_path: String,
- pub user_agent: Option,
- pub client: reqwest::Client,
- pub basic_auth: Option,
- pub oauth_access_token: Option,
- pub bearer_access_token: Option,
- pub api_key: Option,
- // TODO: take an oauth2 token source, similar to the go one
-}
-
-pub type BasicAuth = (String, Option);
-
-#[derive(Debug, Clone)]
-pub struct ApiKey {
- pub prefix: Option,
- pub key: String,
-}
-
-impl Configuration {
- pub fn new() -> Configuration {
- Configuration::default()
- }
-}
-
-impl Default for Configuration {
- fn default() -> Self {
- Configuration {
- base_path: "https://my.zerotier.com/api/v1".to_owned(),
- user_agent: Some("OpenAPI-Generator/v1/rust".to_owned()),
- client: reqwest::Client::new(),
- basic_auth: None,
- oauth_access_token: None,
- bearer_access_token: None,
- api_key: None,
- }
- }
-}
diff --git a/zerotier-central-api/src/apis/mod.rs b/zerotier-central-api/src/apis/mod.rs
deleted file mode 100644
index 51f89ed..0000000
--- a/zerotier-central-api/src/apis/mod.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use std::error;
-use std::fmt;
-
-#[derive(Debug, Clone)]
-pub struct ResponseContent {
- pub status: reqwest::StatusCode,
- pub content: String,
- pub entity: Option,
-}
-
-#[derive(Debug)]
-pub enum Error {
- Reqwest(reqwest::Error),
- Serde(serde_json::Error),
- Io(std::io::Error),
- ResponseError(ResponseContent),
-}
-
-impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- let (module, e) = match self {
- Error::Reqwest(e) => ("reqwest", e.to_string()),
- Error::Serde(e) => ("serde", e.to_string()),
- Error::Io(e) => ("IO", e.to_string()),
- Error::ResponseError(e) => ("response", format!("status code {}", e.status)),
- };
- write!(f, "error in {}: {}", module, e)
- }
-}
-
-impl error::Error for Error {
- fn source(&self) -> Option<&(dyn error::Error + 'static)> {
- Some(match self {
- Error::Reqwest(e) => e,
- Error::Serde(e) => e,
- Error::Io(e) => e,
- Error::ResponseError(_) => return None,
- })
- }
-}
-
-impl From for Error {
- fn from(e: reqwest::Error) -> Self {
- Error::Reqwest(e)
- }
-}
-
-impl From for Error {
- fn from(e: serde_json::Error) -> Self {
- Error::Serde(e)
- }
-}
-
-impl From for Error {
- fn from(e: std::io::Error) -> Self {
- Error::Io(e)
- }
-}
-
-pub fn urlencode>(s: T) -> String {
- ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
-}
-
-pub mod network_api;
-pub mod network_member_api;
-pub mod organizations_api;
-pub mod user_api;
-pub mod util_api;
-
-pub mod configuration;
diff --git a/zerotier-central-api/src/apis/network_api.rs b/zerotier-central-api/src/apis/network_api.rs
deleted file mode 100644
index f1a912e..0000000
--- a/zerotier-central-api/src/apis/network_api.rs
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`delete_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteNetworkError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_network_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetNetworkByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_network_list`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetNetworkListError {
- Status403(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`new_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum NewNetworkError {
- Status403(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`update_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum UpdateNetworkError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-
-pub async fn delete_network(configuration: &configuration::Configuration, network_id: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-/// Returns a single network
-pub async fn get_network_by_id(configuration: &configuration::Configuration, network_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_network_list(configuration: &configuration::Configuration, ) -> Result, Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn new_network(configuration: &configuration::Configuration, body: serde_json::Value) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&body);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn update_network(configuration: &configuration::Configuration, network_id: &str, network: crate::models::Network) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&network);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
diff --git a/zerotier-central-api/src/apis/network_member_api.rs b/zerotier-central-api/src/apis/network_member_api.rs
deleted file mode 100644
index 6b999a4..0000000
--- a/zerotier-central-api/src/apis/network_member_api.rs
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`delete_network_member`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteNetworkMemberError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_network_member`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetNetworkMemberError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_network_member_list`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetNetworkMemberListError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`update_network_member`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum UpdateNetworkMemberError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-
-pub async fn delete_network_member(configuration: &configuration::Configuration, network_id: &str, member_id: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_network_member(configuration: &configuration::Configuration, network_id: &str, member_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_network_member_list(configuration: &configuration::Configuration, network_id: &str) -> Result, Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}/member", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn update_network_member(configuration: &configuration::Configuration, network_id: &str, member_id: &str, member: crate::models::Member) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&member);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
diff --git a/zerotier-central-api/src/apis/organizations_api.rs b/zerotier-central-api/src/apis/organizations_api.rs
deleted file mode 100644
index d0c5702..0000000
--- a/zerotier-central-api/src/apis/organizations_api.rs
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`accept_invitation`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum AcceptInvitationError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`decline_invitation`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeclineInvitationError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_invitation_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetInvitationByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_organization`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetOrganizationError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_organization_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetOrganizationByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_organization_invitation_list`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetOrganizationInvitationListError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_organization_members`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetOrganizationMembersError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`invite_user_by_email`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum InviteUserByEmailError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-
-pub async fn accept_invitation(configuration: &configuration::Configuration, invite_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org-invitation/{inviteID}", local_var_configuration.base_path, inviteID=crate::apis::urlencode(invite_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn decline_invitation(configuration: &configuration::Configuration, invite_id: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org-invitation/{inviteID}", local_var_configuration.base_path, inviteID=crate::apis::urlencode(invite_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_invitation_by_id(configuration: &configuration::Configuration, invite_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org-invitation/{inviteID}", local_var_configuration.base_path, inviteID=crate::apis::urlencode(invite_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_organization(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_organization_by_id(configuration: &configuration::Configuration, org_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org/{orgID}", local_var_configuration.base_path, orgID=crate::apis::urlencode(org_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_organization_invitation_list(configuration: &configuration::Configuration, ) -> Result, Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org-invitation", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_organization_members(configuration: &configuration::Configuration, org_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org/{orgID}/user", local_var_configuration.base_path, orgID=crate::apis::urlencode(org_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn invite_user_by_email(configuration: &configuration::Configuration, organization_invitation: crate::models::OrganizationInvitation) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/org-invitation", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&organization_invitation);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
diff --git a/zerotier-central-api/src/apis/user_api.rs b/zerotier-central-api/src/apis/user_api.rs
deleted file mode 100644
index f95748a..0000000
--- a/zerotier-central-api/src/apis/user_api.rs
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`add_api_token`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum AddApiTokenError {
- Status400(),
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`delete_api_token`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteApiTokenError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`delete_user_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteUserByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_user_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetUserByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`update_user_by_id`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum UpdateUserByIdError {
- Status401(),
- Status403(),
- Status404(),
- UnknownValue(serde_json::Value),
-}
-
-
-pub async fn add_api_token(configuration: &configuration::Configuration, user_id: &str, api_token: crate::models::ApiToken) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/user/{userID}/token", local_var_configuration.base_path, userID=crate::apis::urlencode(user_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&api_token);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn delete_api_token(configuration: &configuration::Configuration, user_id: &str, token_name: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/user/{userID}/token/{tokenName}", local_var_configuration.base_path, userID=crate::apis::urlencode(user_id), tokenName=crate::apis::urlencode(token_name));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-/// Deletes the user and all associated networks. This is not reversible. Delete at your own risk.
-pub async fn delete_user_by_id(configuration: &configuration::Configuration, user_id: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/user/{userID}", local_var_configuration.base_path, userID=crate::apis::urlencode(user_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_user_by_id(configuration: &configuration::Configuration, user_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/user/{userID}", local_var_configuration.base_path, userID=crate::apis::urlencode(user_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn update_user_by_id(configuration: &configuration::Configuration, user_id: &str, user: crate::models::User) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/user/{userID}", local_var_configuration.base_path, userID=crate::apis::urlencode(user_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
- local_var_req_builder = local_var_req_builder.json(&user);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
diff --git a/zerotier-central-api/src/apis/util_api.rs b/zerotier-central-api/src/apis/util_api.rs
deleted file mode 100644
index 8a87e8a..0000000
--- a/zerotier-central-api/src/apis/util_api.rs
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`get_random_token`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetRandomTokenError {
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_status`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetStatusError {
- UnknownValue(serde_json::Value),
-}
-
-
-/// Get a random 32 character. Used by the web UI to generate API keys
-pub async fn get_random_token(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/randomToken", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_status(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/status", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
diff --git a/zerotier-central-api/src/lib.rs b/zerotier-central-api/src/lib.rs
index c1dd666..77eba6c 100644
--- a/zerotier-central-api/src/lib.rs
+++ b/zerotier-central-api/src/lib.rs
@@ -1,10 +1 @@
-#[macro_use]
-extern crate serde_derive;
-
-extern crate serde;
-extern crate serde_json;
-extern crate url;
-extern crate reqwest;
-
-pub mod apis;
-pub mod models;
+include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
diff --git a/zerotier-central-api/src/models/api_token.rs b/zerotier-central-api/src/models/api_token.rs
deleted file mode 100644
index 44afb3a..0000000
--- a/zerotier-central-api/src/models/api_token.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct ApiToken {
- /// user specified token name
- #[serde(rename = "tokenName", skip_serializing_if = "Option::is_none")]
- pub token_name: Option,
- /// API Token. Minimum 32 characters. This token is encrypted in the database and can not be retrieved once set
- #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
- pub token: Option,
-}
-
-impl ApiToken {
- pub fn new() -> ApiToken {
- ApiToken {
- token_name: None,
- token: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/auth_methods.rs b/zerotier-central-api/src/models/auth_methods.rs
deleted file mode 100644
index ebb0009..0000000
--- a/zerotier-central-api/src/models/auth_methods.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct AuthMethods {
- /// email address for built-in authentication
- #[serde(rename = "local", skip_serializing_if = "Option::is_none")]
- pub local: Option,
- /// Google OIDC ID
- #[serde(rename = "google", skip_serializing_if = "Option::is_none")]
- pub google: Option,
- /// Generic OIDC ID
- #[serde(rename = "oidc", skip_serializing_if = "Option::is_none")]
- pub oidc: Option,
-}
-
-impl AuthMethods {
- pub fn new() -> AuthMethods {
- AuthMethods {
- local: None,
- google: None,
- oidc: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/dns.rs b/zerotier-central-api/src/models/dns.rs
deleted file mode 100644
index d589774..0000000
--- a/zerotier-central-api/src/models/dns.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Dns {
- /// Search domain to use for DNS records
- #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
- pub domain: Option,
- /// IP address of unicast DNS service
- #[serde(rename = "servers", skip_serializing_if = "Option::is_none")]
- pub servers: Option>,
-}
-
-impl Dns {
- pub fn new() -> Dns {
- Dns {
- domain: None,
- servers: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/invite_status.rs b/zerotier-central-api/src/models/invite_status.rs
deleted file mode 100644
index 3a66949..0000000
--- a/zerotier-central-api/src/models/invite_status.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-///
-#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
-pub enum InviteStatus {
- #[serde(rename = "pending")]
- Pending,
- #[serde(rename = "accepted")]
- Accepted,
- #[serde(rename = "canceled")]
- Canceled,
-
-}
-
-impl ToString for InviteStatus {
- fn to_string(&self) -> String {
- match self {
- Self::Pending => String::from("pending"),
- Self::Accepted => String::from("accepted"),
- Self::Canceled => String::from("canceled"),
- }
- }
-}
-
-impl Default for InviteStatus {
- fn default() -> InviteStatus {
- Self::Pending
- }
-}
-
-
-
-
diff --git a/zerotier-central-api/src/models/ip_range.rs b/zerotier-central-api/src/models/ip_range.rs
deleted file mode 100644
index ea4c7b6..0000000
--- a/zerotier-central-api/src/models/ip_range.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct IpRange {
- #[serde(rename = "ipRangeStart", skip_serializing_if = "Option::is_none")]
- pub ip_range_start: Option,
- #[serde(rename = "ipRangeEnd", skip_serializing_if = "Option::is_none")]
- pub ip_range_end: Option,
-}
-
-impl IpRange {
- pub fn new() -> IpRange {
- IpRange {
- ip_range_start: None,
- ip_range_end: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/ipv4_assign_mode.rs b/zerotier-central-api/src/models/ipv4_assign_mode.rs
deleted file mode 100644
index d4f921a..0000000
--- a/zerotier-central-api/src/models/ipv4_assign_mode.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Ipv4AssignMode {
- #[serde(rename = "zt", skip_serializing_if = "Option::is_none")]
- pub zt: Option,
-}
-
-impl Ipv4AssignMode {
- pub fn new() -> Ipv4AssignMode {
- Ipv4AssignMode {
- zt: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/ipv6_assign_mode.rs b/zerotier-central-api/src/models/ipv6_assign_mode.rs
deleted file mode 100644
index e5e283a..0000000
--- a/zerotier-central-api/src/models/ipv6_assign_mode.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Ipv6AssignMode {
- #[serde(rename = "6plane", skip_serializing_if = "Option::is_none")]
- pub var_6plane: Option,
- #[serde(rename = "rfc4193", skip_serializing_if = "Option::is_none")]
- pub rfc4193: Option,
- #[serde(rename = "zt", skip_serializing_if = "Option::is_none")]
- pub zt: Option,
-}
-
-impl Ipv6AssignMode {
- pub fn new() -> Ipv6AssignMode {
- Ipv6AssignMode {
- var_6plane: None,
- rfc4193: None,
- zt: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/member.rs b/zerotier-central-api/src/models/member.rs
deleted file mode 100644
index e16495b..0000000
--- a/zerotier-central-api/src/models/member.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Member {
- /// concatenation of network ID and member ID
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- #[serde(rename = "clock", skip_serializing_if = "Option::is_none")]
- pub clock: Option,
- #[serde(rename = "networkId", skip_serializing_if = "Option::is_none")]
- pub network_id: Option,
- /// ZeroTier ID of the member
- #[serde(rename = "nodeId", skip_serializing_if = "Option::is_none")]
- pub node_id: Option,
- #[serde(rename = "controllerId", skip_serializing_if = "Option::is_none")]
- pub controller_id: Option,
- /// Whether or not the member is hidden in the UI
- #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
- pub hidden: Option,
- /// User defined name of the member
- #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
- pub name: Option,
- /// User defined description of the member
- #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
- pub description: Option,
- #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
- pub config: Option>,
- /// Last seen time of the member
- #[serde(rename = "lastOnline", skip_serializing_if = "Option::is_none")]
- pub last_online: Option,
- /// IP address the member last spoke to the controller via
- #[serde(rename = "physicalAddress", skip_serializing_if = "Option::is_none")]
- pub physical_address: Option,
- /// ZeroTier version the member is running
- #[serde(rename = "clientVersion", skip_serializing_if = "Option::is_none")]
- pub client_version: Option,
- /// ZeroTier protocol version
- #[serde(rename = "protocolVersion", skip_serializing_if = "Option::is_none")]
- pub protocol_version: Option,
- /// Whether or not the client version is new enough to support the rules engine (1.4.0+)
- #[serde(rename = "supportsRulesEngine", skip_serializing_if = "Option::is_none")]
- pub supports_rules_engine: Option,
-}
-
-impl Member {
- pub fn new() -> Member {
- Member {
- id: None,
- clock: None,
- network_id: None,
- node_id: None,
- controller_id: None,
- hidden: None,
- name: None,
- description: None,
- config: None,
- last_online: None,
- physical_address: None,
- client_version: None,
- protocol_version: None,
- supports_rules_engine: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/member_config.rs b/zerotier-central-api/src/models/member_config.rs
deleted file mode 100644
index efaeaf5..0000000
--- a/zerotier-central-api/src/models/member_config.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct MemberConfig {
- /// Allow the member to be a bridge on the network
- #[serde(rename = "activeBridge", skip_serializing_if = "Option::is_none")]
- pub active_bridge: Option,
- /// Is the member authorized on the network
- #[serde(rename = "authorized", skip_serializing_if = "Option::is_none")]
- pub authorized: Option,
- #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
- pub capabilities: Option>,
- /// Time the member was created or first tried to join the network
- #[serde(rename = "creationTime", skip_serializing_if = "Option::is_none")]
- pub creation_time: Option,
- /// ID of the member node. This is the 10 digit identifier that identifies a ZeroTier node.
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- /// Public Key of the member's Identity
- #[serde(rename = "identity", skip_serializing_if = "Option::is_none")]
- pub identity: Option,
- /// List of assigned IP addresses
- #[serde(rename = "ipAssignments", skip_serializing_if = "Option::is_none")]
- pub ip_assignments: Option>,
- /// Time the member was authorized on the network
- #[serde(rename = "lastAuthorizedTime", skip_serializing_if = "Option::is_none")]
- pub last_authorized_time: Option,
- /// Time the member was deauthorized on the network
- #[serde(rename = "lastDeauthorizedTime", skip_serializing_if = "Option::is_none")]
- pub last_deauthorized_time: Option,
- /// Exempt this member from the IP auto assignment pool on a Network
- #[serde(rename = "noAutoAssignIps", skip_serializing_if = "Option::is_none")]
- pub no_auto_assign_ips: Option,
- /// Member record revision count
- #[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
- pub revision: Option,
- /// Array of 2 member tuples of tag [ID, tag value]
- #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
- pub tags: Option>>,
- /// Major version of the client
- #[serde(rename = "vMajor", skip_serializing_if = "Option::is_none")]
- pub v_major: Option,
- /// Minor version of the client
- #[serde(rename = "vMinor", skip_serializing_if = "Option::is_none")]
- pub v_minor: Option,
- /// Revision number of the client
- #[serde(rename = "vRev", skip_serializing_if = "Option::is_none")]
- pub v_rev: Option,
- /// Protocol version of the client
- #[serde(rename = "vProto", skip_serializing_if = "Option::is_none")]
- pub v_proto: Option,
-}
-
-impl MemberConfig {
- pub fn new() -> MemberConfig {
- MemberConfig {
- active_bridge: None,
- authorized: None,
- capabilities: None,
- creation_time: None,
- id: None,
- identity: None,
- ip_assignments: None,
- last_authorized_time: None,
- last_deauthorized_time: None,
- no_auto_assign_ips: None,
- revision: None,
- tags: None,
- v_major: None,
- v_minor: None,
- v_rev: None,
- v_proto: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/mod.rs b/zerotier-central-api/src/models/mod.rs
deleted file mode 100644
index 2c831c0..0000000
--- a/zerotier-central-api/src/models/mod.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-pub mod api_token;
-pub use self::api_token::ApiToken;
-pub mod auth_methods;
-pub use self::auth_methods::AuthMethods;
-pub mod dns;
-pub use self::dns::Dns;
-pub mod invite_status;
-pub use self::invite_status::InviteStatus;
-pub mod ip_range;
-pub use self::ip_range::IpRange;
-pub mod ipv4_assign_mode;
-pub use self::ipv4_assign_mode::Ipv4AssignMode;
-pub mod ipv6_assign_mode;
-pub use self::ipv6_assign_mode::Ipv6AssignMode;
-pub mod member;
-pub use self::member::Member;
-pub mod member_config;
-pub use self::member_config::MemberConfig;
-pub mod network;
-pub use self::network::Network;
-pub mod network_config;
-pub use self::network_config::NetworkConfig;
-pub mod organization;
-pub use self::organization::Organization;
-pub mod organization_invitation;
-pub use self::organization_invitation::OrganizationInvitation;
-pub mod organization_member;
-pub use self::organization_member::OrganizationMember;
-pub mod permissions;
-pub use self::permissions::Permissions;
-pub mod random_token;
-pub use self::random_token::RandomToken;
-pub mod route;
-pub use self::route::Route;
-pub mod status;
-pub use self::status::Status;
-pub mod status_login_methods;
-pub use self::status_login_methods::StatusLoginMethods;
-pub mod user;
-pub use self::user::User;
diff --git a/zerotier-central-api/src/models/network.rs b/zerotier-central-api/src/models/network.rs
deleted file mode 100644
index 77b8f6c..0000000
--- a/zerotier-central-api/src/models/network.rs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-/// Network : Network object
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Network {
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- #[serde(rename = "clock", skip_serializing_if = "Option::is_none")]
- pub clock: Option,
- #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
- pub config: Option>,
- #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
- pub description: Option,
- #[serde(rename = "rulesSource", skip_serializing_if = "Option::is_none")]
- pub rules_source: Option,
- #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
- pub permissions: Option<::std::collections::HashMap>,
- #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
- pub owner_id: Option,
- #[serde(rename = "onlineMemberCount", skip_serializing_if = "Option::is_none")]
- pub online_member_count: Option,
- #[serde(rename = "authorizedMemberCount", skip_serializing_if = "Option::is_none")]
- pub authorized_member_count: Option,
- #[serde(rename = "totalMemberCount", skip_serializing_if = "Option::is_none")]
- pub total_member_count: Option,
- #[serde(rename = "capabilitiesByName", skip_serializing_if = "Option::is_none")]
- pub capabilities_by_name: Option,
- #[serde(rename = "tagsByName", skip_serializing_if = "Option::is_none")]
- pub tags_by_name: Option,
-}
-
-impl Network {
- /// Network object
- pub fn new() -> Network {
- Network {
- id: None,
- clock: None,
- config: None,
- description: None,
- rules_source: None,
- permissions: None,
- owner_id: None,
- online_member_count: None,
- authorized_member_count: None,
- total_member_count: None,
- capabilities_by_name: None,
- tags_by_name: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/network_config.rs b/zerotier-central-api/src/models/network_config.rs
deleted file mode 100644
index 5beef2d..0000000
--- a/zerotier-central-api/src/models/network_config.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct NetworkConfig {
- /// Network ID
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- /// Time the network was created
- #[serde(rename = "creationTime", skip_serializing_if = "Option::is_none")]
- pub creation_time: Option,
- /// Array of network capabilities
- #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
- pub capabilities: Option>,
- #[serde(rename = "dns", skip_serializing_if = "Option::is_none")]
- pub dns: Option,
- /// Enable broadcast packets on the network
- #[serde(rename = "enableBroadcast", skip_serializing_if = "Option::is_none")]
- pub enable_broadcast: Option,
- /// Range of IP addresses for the auto assign pool
- #[serde(rename = "ipAssignmentPools", skip_serializing_if = "Option::is_none")]
- pub ip_assignment_pools: Option>,
- /// Time the network was last modified
- #[serde(rename = "lastModified", skip_serializing_if = "Option::is_none")]
- pub last_modified: Option,
- /// MTU to set on the client virtual network adapter
- #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
- pub mtu: Option,
- /// Maximum number of recipients per multicast or broadcast. Warning - Setting this to 0 will disable IPv4 communication on your network!
- #[serde(rename = "multicastLimit", skip_serializing_if = "Option::is_none")]
- pub multicast_limit: Option,
- #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
- pub name: Option,
- /// Whether or not the network is private. If false, members will *NOT* need to be authorized to join.
- #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
- pub private: Option,
- #[serde(rename = "routes", skip_serializing_if = "Option::is_none")]
- pub routes: Option>,
- #[serde(rename = "rules", skip_serializing_if = "Option::is_none")]
- pub rules: Option>,
- #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
- pub tags: Option>,
- #[serde(rename = "v4AssignMode", skip_serializing_if = "Option::is_none")]
- pub v4_assign_mode: Option>,
- #[serde(rename = "v6AssignMode", skip_serializing_if = "Option::is_none")]
- pub v6_assign_mode: Option>,
-}
-
-impl NetworkConfig {
- pub fn new() -> NetworkConfig {
- NetworkConfig {
- id: None,
- creation_time: None,
- capabilities: None,
- dns: None,
- enable_broadcast: None,
- ip_assignment_pools: None,
- last_modified: None,
- mtu: None,
- multicast_limit: None,
- name: None,
- private: None,
- routes: None,
- rules: None,
- tags: None,
- v4_assign_mode: None,
- v6_assign_mode: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/organization.rs b/zerotier-central-api/src/models/organization.rs
deleted file mode 100644
index 3ec1db5..0000000
--- a/zerotier-central-api/src/models/organization.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Organization {
- /// Organization ID
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- /// User ID of the organization owner
- #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
- pub owner_id: Option,
- /// Organization owner's email address
- #[serde(rename = "ownerEmail", skip_serializing_if = "Option::is_none")]
- pub owner_email: Option,
- /// List of organization members
- #[serde(rename = "members", skip_serializing_if = "Option::is_none")]
- pub members: Option>,
-}
-
-impl Organization {
- pub fn new() -> Organization {
- Organization {
- id: None,
- owner_id: None,
- owner_email: None,
- members: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/organization_invitation.rs b/zerotier-central-api/src/models/organization_invitation.rs
deleted file mode 100644
index ba7e045..0000000
--- a/zerotier-central-api/src/models/organization_invitation.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct OrganizationInvitation {
- /// Organization ID
- #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")]
- pub org_id: Option,
- /// Email address of invitee
- #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
- pub email: Option,
- /// Invitation ID
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- /// Creation time of the invite
- #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
- pub creation_time: Option,
- /// Invitation status
- #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
- pub status: Option>,
- /// Last updated time of the invitation
- #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
- pub update_time: Option,
- /// Organization owner email address
- #[serde(rename = "ownerEmail", skip_serializing_if = "Option::is_none")]
- pub owner_email: Option,
-}
-
-impl OrganizationInvitation {
- pub fn new() -> OrganizationInvitation {
- OrganizationInvitation {
- org_id: None,
- email: None,
- id: None,
- creation_time: None,
- status: None,
- update_time: None,
- owner_email: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/organization_member.rs b/zerotier-central-api/src/models/organization_member.rs
deleted file mode 100644
index d0c2afb..0000000
--- a/zerotier-central-api/src/models/organization_member.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct OrganizationMember {
- /// Organization ID
- #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")]
- pub org_id: Option,
- /// User ID
- #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
- pub user_id: Option,
- /// Organization member display name
- #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
- pub name: Option,
- /// Organization member email address
- #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
- pub email: Option,
-}
-
-impl OrganizationMember {
- pub fn new() -> OrganizationMember {
- OrganizationMember {
- org_id: None,
- user_id: None,
- name: None,
- email: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/permissions.rs b/zerotier-central-api/src/models/permissions.rs
deleted file mode 100644
index c19ffc5..0000000
--- a/zerotier-central-api/src/models/permissions.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Permissions {
- /// Authorize permission
- #[serde(rename = "a", skip_serializing_if = "Option::is_none")]
- pub a: Option,
- /// Delete permission
- #[serde(rename = "d", skip_serializing_if = "Option::is_none")]
- pub d: Option,
- /// Modify network settings permission
- #[serde(rename = "m", skip_serializing_if = "Option::is_none")]
- pub m: Option,
- /// Read network settings permission
- #[serde(rename = "r", skip_serializing_if = "Option::is_none")]
- pub r: Option,
-}
-
-impl Permissions {
- pub fn new() -> Permissions {
- Permissions {
- a: None,
- d: None,
- m: None,
- r: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/random_token.rs b/zerotier-central-api/src/models/random_token.rs
deleted file mode 100644
index 06a1770..0000000
--- a/zerotier-central-api/src/models/random_token.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct RandomToken {
- /// Current time on server
- #[serde(rename = "clock", skip_serializing_if = "Option::is_none")]
- pub clock: Option,
- /// hex encoded random bytes of the token
- #[serde(rename = "hex", skip_serializing_if = "Option::is_none")]
- pub hex: Option,
- /// Random 32 character token
- #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
- pub token: Option,
-}
-
-impl RandomToken {
- pub fn new() -> RandomToken {
- RandomToken {
- clock: None,
- hex: None,
- token: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/route.rs b/zerotier-central-api/src/models/route.rs
deleted file mode 100644
index 0d9450e..0000000
--- a/zerotier-central-api/src/models/route.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Route {
- #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
- pub target: Option,
- #[serde(rename = "via", skip_serializing_if = "Option::is_none")]
- pub via: Option,
-}
-
-impl Route {
- pub fn new() -> Route {
- Route {
- target: None,
- via: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/status.rs b/zerotier-central-api/src/models/status.rs
deleted file mode 100644
index 468ba35..0000000
--- a/zerotier-central-api/src/models/status.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct Status {
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
- pub _type: Option,
- /// Current time on server
- #[serde(rename = "clock", skip_serializing_if = "Option::is_none")]
- pub clock: Option,
- #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
- pub version: Option,
- #[serde(rename = "apiVersion", skip_serializing_if = "Option::is_none")]
- pub api_version: Option,
- /// Uptime on server
- #[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
- pub uptime: Option,
- #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
- pub user: Option>,
- #[serde(rename = "readOnlyMode", skip_serializing_if = "Option::is_none")]
- pub read_only_mode: Option,
- #[serde(rename = "loginMethods", skip_serializing_if = "Option::is_none")]
- pub login_methods: Option>,
-}
-
-impl Status {
- pub fn new() -> Status {
- Status {
- id: None,
- _type: None,
- clock: None,
- version: None,
- api_version: None,
- uptime: None,
- user: None,
- read_only_mode: None,
- login_methods: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/status_login_methods.rs b/zerotier-central-api/src/models/status_login_methods.rs
deleted file mode 100644
index 426d018..0000000
--- a/zerotier-central-api/src/models/status_login_methods.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct StatusLoginMethods {
- #[serde(rename = "local", skip_serializing_if = "Option::is_none")]
- pub local: Option,
- #[serde(rename = "google", skip_serializing_if = "Option::is_none")]
- pub google: Option,
- #[serde(rename = "twitter", skip_serializing_if = "Option::is_none")]
- pub twitter: Option,
- #[serde(rename = "facebook", skip_serializing_if = "Option::is_none")]
- pub facebook: Option,
- #[serde(rename = "github", skip_serializing_if = "Option::is_none")]
- pub github: Option,
- #[serde(rename = "saml", skip_serializing_if = "Option::is_none")]
- pub saml: Option,
- #[serde(rename = "oidc", skip_serializing_if = "Option::is_none")]
- pub oidc: Option,
-}
-
-impl StatusLoginMethods {
- pub fn new() -> StatusLoginMethods {
- StatusLoginMethods {
- local: None,
- google: None,
- twitter: None,
- facebook: None,
- github: None,
- saml: None,
- oidc: None,
- }
- }
-}
-
-
diff --git a/zerotier-central-api/src/models/user.rs b/zerotier-central-api/src/models/user.rs
deleted file mode 100644
index ccebed6..0000000
--- a/zerotier-central-api/src/models/user.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * ZeroTier Central API
- *
- * ZeroTier Central Network Management Portal API.All API requests must have an API token header specified in the Authorization: Bearer xxxxx format. You can generate your API key by logging into ZeroTier Central and creating a token on the Account page.
eg. curl -X GET -H \"Authorization: bearer xxxxx\" https://my.zerotier.com/api/v1/network
Rate Limiting
The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/centralv1.json
- *
- * The version of the OpenAPI document: v1
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-
-
-#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
-pub struct User {
- /// User ID
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option,
- /// Organization ID
- #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")]
- pub org_id: Option,
- #[serde(rename = "globalPermissions", skip_serializing_if = "Option::is_none")]
- pub global_permissions: Option>,
- /// Display Name
- #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
- pub display_name: Option,
- /// User email address
- #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
- pub email: Option,
- #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
- pub auth: Option>,
- /// SMS number
- #[serde(rename = "smsNumber", skip_serializing_if = "Option::is_none")]
- pub sms_number: Option,
- /// List of API token names.
- #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
- pub tokens: Option>,
-}
-
-impl User {
- pub fn new() -> User {
- User {
- id: None,
- org_id: None,
- global_permissions: None,
- display_name: None,
- email: None,
- auth: None,
- sms_number: None,
- tokens: None,
- }
- }
-}
-
-
diff --git a/zerotier-one-api/.gitignore b/zerotier-one-api/.gitignore
index 6aa1064..eb5a316 100644
--- a/zerotier-one-api/.gitignore
+++ b/zerotier-one-api/.gitignore
@@ -1,3 +1 @@
-/target/
-**/*.rs.bk
-Cargo.lock
+target
diff --git a/zerotier-one-api/.openapi-generator-ignore b/zerotier-one-api/.openapi-generator-ignore
deleted file mode 100644
index 7484ee5..0000000
--- a/zerotier-one-api/.openapi-generator-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# OpenAPI Generator Ignore
-# Generated by openapi-generator https://github.com/openapitools/openapi-generator
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
diff --git a/zerotier-one-api/.openapi-generator/FILES b/zerotier-one-api/.openapi-generator/FILES
deleted file mode 100644
index fb34dcb..0000000
--- a/zerotier-one-api/.openapi-generator/FILES
+++ /dev/null
@@ -1,52 +0,0 @@
-.gitignore
-.openapi-generator-ignore
-.travis.yml
-Cargo.toml
-README.md
-docs/ControllerApi.md
-docs/ControllerNetwork.md
-docs/ControllerNetworkIpAssignmentPools.md
-docs/ControllerNetworkMember.md
-docs/ControllerNetworkRoutes.md
-docs/ControllerNetworkV4AssignMode.md
-docs/ControllerNetworkV6AssignMode.md
-docs/ControllerStatus.md
-docs/Network.md
-docs/NetworkAllOf.md
-docs/NetworkAllOf1.md
-docs/NetworkAllOf1Dns.md
-docs/NetworkAllOf1MulticastSubscriptions.md
-docs/NetworkApi.md
-docs/Peer.md
-docs/PeerApi.md
-docs/PeerPaths.md
-docs/Status.md
-docs/StatusApi.md
-docs/StatusConfig.md
-docs/StatusConfigSettings.md
-git_push.sh
-src/apis/configuration.rs
-src/apis/controller_api.rs
-src/apis/mod.rs
-src/apis/network_api.rs
-src/apis/peer_api.rs
-src/apis/status_api.rs
-src/lib.rs
-src/models/controller_network.rs
-src/models/controller_network_ip_assignment_pools.rs
-src/models/controller_network_member.rs
-src/models/controller_network_routes.rs
-src/models/controller_network_v4_assign_mode.rs
-src/models/controller_network_v6_assign_mode.rs
-src/models/controller_status.rs
-src/models/mod.rs
-src/models/network.rs
-src/models/network_all_of.rs
-src/models/network_all_of_1.rs
-src/models/network_all_of_1_dns.rs
-src/models/network_all_of_1_multicast_subscriptions.rs
-src/models/peer.rs
-src/models/peer_paths.rs
-src/models/status.rs
-src/models/status_config.rs
-src/models/status_config_settings.rs
diff --git a/zerotier-one-api/.openapi-generator/VERSION b/zerotier-one-api/.openapi-generator/VERSION
deleted file mode 100644
index 5f68295..0000000
--- a/zerotier-one-api/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-6.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/zerotier-one-api/.travis.yml b/zerotier-one-api/.travis.yml
deleted file mode 100644
index 22761ba..0000000
--- a/zerotier-one-api/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: rust
diff --git a/zerotier-one-api/Cargo.lock b/zerotier-one-api/Cargo.lock
new file mode 100644
index 0000000..319ada4
--- /dev/null
+++ b/zerotier-one-api/Cargo.lock
@@ -0,0 +1,1401 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bumpalo"
+version = "3.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
+
+[[package]]
+name = "bytes"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
+
+[[package]]
+name = "cc"
+version = "1.0.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
+dependencies = [
+ "libc",
+ "num-integer",
+ "num-traits",
+ "serde",
+ "time",
+ "winapi",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
+dependencies = [
+ "matches",
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
+
+[[package]]
+name = "futures-task"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
+
+[[package]]
+name = "futures-util"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "getopts"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.10.2+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util 0.7.1",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
+[[package]]
+name = "home"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "http"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "hyper"
+version = "0.14.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "idna"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
+dependencies = [
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+ "serde",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
+
+[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
+name = "js-sys"
+version = "0.3.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.124"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"
+
+[[package]]
+name = "log"
+version = "0.4.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
+
+[[package]]
+name = "memchr"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
+
+[[package]]
+name = "mime"
+version = "0.3.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
+
+[[package]]
+name = "mio"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
+dependencies = [
+ "libc",
+ "log",
+ "miow",
+ "ntapi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "miow"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "ntapi"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
+
+[[package]]
+name = "openapiv3"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b4689110fd71f196934fbdf1ad0f0a4b49ea41fbc6f19008c00dba735b544c"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "openssl"
+version = "0.10.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb"
+dependencies = [
+ "autocfg",
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+
+[[package]]
+name = "pest"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
+dependencies = [
+ "ucd-trie",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
+dependencies = [
+ "unicode-xid",
+]
+
+[[package]]
+name = "progenitor"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54484468975e18aa57ed3e9a13ac0468160a433af89eee1189f681292eafc5d1"
+dependencies = [
+ "anyhow",
+ "getopts",
+ "openapiv3",
+ "progenitor-client",
+ "progenitor-impl",
+ "progenitor-macro",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "progenitor-client"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45c7752120152426ce577c3de6b341fecdaae59883f31296d91871a6d7843206"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "percent-encoding",
+ "reqwest",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "progenitor-impl"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1980a31d714128082fe8dd6a7cb6086c15080cdb9a693feba171361fb961b034"
+dependencies = [
+ "getopts",
+ "heck",
+ "indexmap",
+ "openapiv3",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustfmt-wrapper",
+ "schemars",
+ "serde",
+ "serde_json",
+ "syn",
+ "thiserror",
+ "typify",
+ "unicode-xid",
+]
+
+[[package]]
+name = "progenitor-macro"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0993b8f5bbcf35ec130f9d305cefbbd81f00c014c049bf298bd218529989b054"
+dependencies = [
+ "openapiv3",
+ "proc-macro2",
+ "progenitor-impl",
+ "quote",
+ "serde",
+ "serde_json",
+ "serde_tokenstream",
+ "syn",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.11.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
+dependencies = [
+ "base64",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "lazy_static",
+ "log",
+ "mime",
+ "native-tls",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-util 0.6.9",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "rustfmt-wrapper"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7733577fb5b13c8b256232e7ca84aa424f915efae6ec980082d60a03f99da3f8"
+dependencies = [
+ "tempfile",
+ "thiserror",
+ "toolchain_find",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
+dependencies = [
+ "lazy_static",
+ "winapi",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6b5a3c80cea1ab61f4260238409510e814e38b4b563c06044edf91e7dc070e3"
+dependencies = [
+ "chrono",
+ "dyn-clone",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+ "uuid",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
+dependencies = [
+ "bitflags",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
+dependencies = [
+ "semver-parser",
+]
+
+[[package]]
+name = "semver-parser"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
+dependencies = [
+ "pest",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_tokenstream"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6deb15c3a535e81438110111d90168d91721652f502abb147f31cde129f683d"
+dependencies = [
+ "proc-macro2",
+ "serde",
+ "syn",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
+
+[[package]]
+name = "socket2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "libc",
+ "redox_syscall",
+ "remove_dir_all",
+ "winapi",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "time"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+
+[[package]]
+name = "tokio"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f48b6d60512a392e34dbf7fd456249fd2de3c83669ab642e021903f4015185b"
+dependencies = [
+ "bytes",
+ "libc",
+ "memchr",
+ "mio",
+ "once_cell",
+ "pin-project-lite",
+ "socket2",
+ "winapi",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "log",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toolchain_find"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e85654a10e7a07a47c6f19d93818f3f343e22927f2fa280c84f7c8042743413"
+dependencies = [
+ "home",
+ "lazy_static",
+ "regex",
+ "semver",
+ "walkdir",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
+
+[[package]]
+name = "tracing"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
+dependencies = [
+ "cfg-if",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
+
+[[package]]
+name = "typify"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75e642ba5bfa5a7b2e085a700f5f5111b069a833156f82c53a365210e545258d"
+dependencies = [
+ "typify-impl",
+ "typify-macro",
+]
+
+[[package]]
+name = "typify-impl"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54b1b5a377f1e0dceb8a18b25c86c80b32d0882b01e1585fd520354a56b7c30c"
+dependencies = [
+ "heck",
+ "log",
+ "proc-macro2",
+ "quote",
+ "rustfmt-wrapper",
+ "schemars",
+ "serde_json",
+ "syn",
+ "thiserror",
+ "unicode-xid",
+]
+
+[[package]]
+name = "typify-macro"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25cad3517ce4190a7f108cd6360da245c7e289060003d077156f2da7dcf1f568"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "schemars",
+ "serde",
+ "serde_json",
+ "serde_tokenstream",
+ "syn",
+ "typify-impl",
+]
+
+[[package]]
+name = "ucd-trie"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+
+[[package]]
+name = "url"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "matches",
+ "percent-encoding",
+]
+
+[[package]]
+name = "uuid"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
+dependencies = [
+ "getrandom",
+ "serde",
+]
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "walkdir"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+dependencies = [
+ "same-file",
+ "winapi",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.10.2+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
+dependencies = [
+ "bumpalo",
+ "lazy_static",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
+
+[[package]]
+name = "web-sys"
+version = "0.3.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "winreg"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "zerotier-one-api"
+version = "1.1.0"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "futures",
+ "progenitor",
+ "progenitor-client",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "uuid",
+]
diff --git a/zerotier-one-api/Cargo.toml b/zerotier-one-api/Cargo.toml
index a9e8b9a..4b8957d 100644
--- a/zerotier-one-api/Cargo.toml
+++ b/zerotier-one-api/Cargo.toml
@@ -1,18 +1,21 @@
[package]
name = "zerotier-one-api"
-version = "1.0.5"
-edition = "2018"
+version = "1.1.0"
+edition = "2021"
description = "OpenAPI bindings to the ZeroTierOne JSON API"
authors = ["Erik Hollensbe ", "Adam Ierymenko "]
license = "BSD-3-Clause"
[dependencies]
-serde = "^1.0"
-serde_derive = "^1.0"
-serde_json = "^1.0"
-url = "^2.2"
-[dependencies.reqwest]
-version = "^0.11"
-features = ["json", "multipart"]
+progenitor-client = ">=0"
+reqwest = { version = "0.11", features = ["json", "stream"] }
+serde = { version = "1.0", features = [ "derive" ] }
+chrono = { version = "0.4", features = [ "serde" ] }
+uuid = { version = "0.8", features = [ "serde", "v4" ] }
+futures = "0.3"
+serde_json = "1.0"
-[dev-dependencies]
+[build-dependencies]
+anyhow = ">=0"
+progenitor = ">=0"
+serde_json = "1.0"
diff --git a/zerotier-one-api/README.md b/zerotier-one-api/README.md
deleted file mode 100644
index 4a438f7..0000000
--- a/zerotier-one-api/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Rust API client for zerotier-one-api
-
- This API controls the ZeroTier service that runs in the background on your computer. This is how zerotier-cli, and the macOS and Windows apps control the service.
API requests must be authenticated via an authentication token. ZeroTier One saves this token in the authtoken.secret file in its working directory. This token may be supplied via the X-ZT1-Auth HTTP request header.
For example: curl -H \"X-ZT1-Auth: $TOKEN\" http://localhost:9993/status
The token can be found in:
- Mac :: /Library/Application Support/ZeroTier/One
- Windows :: \\ProgramData\\ZeroTier\\One
- Linux :: /var/lib/zerotier-one
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/servicev1.json
-
-
-## Overview
-
-This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
-
-- API version: 0.1.0
-- Package version: 0.1.0
-- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
-
-## Installation
-
-Put the package under your project folder in a directory named `zerotier-one-api` and add the following to `Cargo.toml` under `[dependencies]`:
-
-```
-zerotier-one-api = { path = "./zerotier-one-api" }
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to *http://localhost:9993*
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*ControllerApi* | [**generate_controller_network**](docs/ControllerApi.md#generate_controller_network) | **POST** /controller/network/{controllerID}______ | Generate Random Network ID.
-*ControllerApi* | [**get_controller_network**](docs/ControllerApi.md#get_controller_network) | **GET** /controller/network/{networkID} | Get Network by ID.
-*ControllerApi* | [**get_controller_network_member**](docs/ControllerApi.md#get_controller_network_member) | **GET** /controller/network/{networkID}/member{nodeID} | Get Network Member Details by ID.
-*ControllerApi* | [**get_controller_network_members**](docs/ControllerApi.md#get_controller_network_members) | **GET** /controller/network/{networkID}/member | List Network Members.
-*ControllerApi* | [**get_controller_networks**](docs/ControllerApi.md#get_controller_networks) | **GET** /controller/network | List Networks.
-*ControllerApi* | [**get_controller_status**](docs/ControllerApi.md#get_controller_status) | **GET** /controller | Get Controller Status.
-*ControllerApi* | [**set_controller_network**](docs/ControllerApi.md#set_controller_network) | **POST** /controller/network/{networkID} | Create or Update a Network.
-*NetworkApi* | [**delete_network**](docs/NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | Leave a network.
-*NetworkApi* | [**get_network**](docs/NetworkApi.md#get_network) | **GET** /network/{networkID} | Get a joined Network membership configuration by Network ID.
-*NetworkApi* | [**get_networks**](docs/NetworkApi.md#get_networks) | **GET** /network | Get all network memberships.
-*NetworkApi* | [**update_network**](docs/NetworkApi.md#update_network) | **POST** /network/{networkID} | Join a network or update it's configuration by Network ID.
-*PeerApi* | [**get_peer**](docs/PeerApi.md#get_peer) | **GET** /peer/{address} | Get information about a specific peer by Node ID.
-*PeerApi* | [**get_peers**](docs/PeerApi.md#get_peers) | **GET** /peer | Get all peers.
-*StatusApi* | [**get_status**](docs/StatusApi.md#get_status) | **GET** /status | Node status and addressing info.
-
-
-## Documentation For Models
-
- - [ControllerNetwork](docs/ControllerNetwork.md)
- - [ControllerNetworkIpAssignmentPools](docs/ControllerNetworkIpAssignmentPools.md)
- - [ControllerNetworkMember](docs/ControllerNetworkMember.md)
- - [ControllerNetworkRoutes](docs/ControllerNetworkRoutes.md)
- - [ControllerNetworkV4AssignMode](docs/ControllerNetworkV4AssignMode.md)
- - [ControllerNetworkV6AssignMode](docs/ControllerNetworkV6AssignMode.md)
- - [ControllerStatus](docs/ControllerStatus.md)
- - [Network](docs/Network.md)
- - [NetworkAllOf](docs/NetworkAllOf.md)
- - [NetworkAllOf1](docs/NetworkAllOf1.md)
- - [NetworkAllOf1Dns](docs/NetworkAllOf1Dns.md)
- - [NetworkAllOf1MulticastSubscriptions](docs/NetworkAllOf1MulticastSubscriptions.md)
- - [Peer](docs/Peer.md)
- - [PeerPaths](docs/PeerPaths.md)
- - [Status](docs/Status.md)
- - [StatusConfig](docs/StatusConfig.md)
- - [StatusConfigSettings](docs/StatusConfigSettings.md)
-
-
-To get access to the crate's generated documentation, use:
-
-```
-cargo doc --open
-```
-
-## Author
-
-
-
diff --git a/zerotier-one-api/build.rs b/zerotier-one-api/build.rs
new file mode 100644
index 0000000..cdae78c
--- /dev/null
+++ b/zerotier-one-api/build.rs
@@ -0,0 +1,13 @@
+use std::{path::PathBuf, str::FromStr};
+
+fn main() {
+ let src = PathBuf::from_str("openapi.json").unwrap();
+ let file = std::fs::File::open(src).unwrap();
+ let spec = serde_json::from_reader(file).unwrap();
+ let mut generator = progenitor::Generator::new();
+
+ let content = generator.generate_text(&spec).unwrap();
+
+ let out_file = std::path::Path::new(&std::env::var("OUT_DIR").unwrap()).to_path_buf();
+ std::fs::write(out_file.join("codegen.rs"), content).unwrap();
+}
diff --git a/zerotier-one-api/docs/ControllerApi.md b/zerotier-one-api/docs/ControllerApi.md
deleted file mode 100644
index 592c10a..0000000
--- a/zerotier-one-api/docs/ControllerApi.md
+++ /dev/null
@@ -1,218 +0,0 @@
-# \ControllerApi
-
-All URIs are relative to *http://localhost:9993*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**generate_controller_network**](ControllerApi.md#generate_controller_network) | **POST** /controller/network/{controllerID}______ | Generate Random Network ID.
-[**get_controller_network**](ControllerApi.md#get_controller_network) | **GET** /controller/network/{networkID} | Get Network by ID.
-[**get_controller_network_member**](ControllerApi.md#get_controller_network_member) | **GET** /controller/network/{networkID}/member{nodeID} | Get Network Member Details by ID.
-[**get_controller_network_members**](ControllerApi.md#get_controller_network_members) | **GET** /controller/network/{networkID}/member | List Network Members.
-[**get_controller_networks**](ControllerApi.md#get_controller_networks) | **GET** /controller/network | List Networks.
-[**get_controller_status**](ControllerApi.md#get_controller_status) | **GET** /controller | Get Controller Status.
-[**set_controller_network**](ControllerApi.md#set_controller_network) | **POST** /controller/network/{networkID} | Create or Update a Network.
-
-
-
-## generate_controller_network
-
-> crate::models::ControllerNetwork generate_controller_network(controller_id, controller_network)
-Generate Random Network ID.
-
-Create a new network with a random ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**controller_id** | **String** | Node ID of the controller. | [required] |
-**controller_network** | [**ControllerNetwork**](ControllerNetwork.md) | Network object JSON. | [required] |
-
-### Return type
-
-[**crate::models::ControllerNetwork**](ControllerNetwork.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_controller_network
-
-> crate::models::ControllerNetwork get_controller_network(network_id)
-Get Network by ID.
-
-Get details of a network by it's ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network. | [required] |
-
-### Return type
-
-[**crate::models::ControllerNetwork**](ControllerNetwork.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_controller_network_member
-
-> crate::models::ControllerNetworkMember get_controller_network_member(network_id, node_id)
-Get Network Member Details by ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network. | [required] |
-**node_id** | **String** | ID of the member node. | [required] |
-
-### Return type
-
-[**crate::models::ControllerNetworkMember**](ControllerNetworkMember.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_controller_network_members
-
-> ::std::collections::HashMap get_controller_network_members(network_id)
-List Network Members.
-
-JSON object containing all member IDs as keys and their memberRevisionCounter values as values.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network. | [required] |
-
-### Return type
-
-**::std::collections::HashMap**
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_controller_networks
-
-> Vec get_controller_networks()
-List Networks.
-
-List IDs of all networks hosted by this controller.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-**Vec**
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_controller_status
-
-> crate::models::ControllerStatus get_controller_status()
-Get Controller Status.
-
-Check for controller function and return controller status.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**crate::models::ControllerStatus**](ControllerStatus.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## set_controller_network
-
-> crate::models::ControllerNetwork set_controller_network(network_id, controller_network)
-Create or Update a Network.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network. | [required] |
-**controller_network** | [**ControllerNetwork**](ControllerNetwork.md) | Network object JSON. | [required] |
-
-### Return type
-
-[**crate::models::ControllerNetwork**](ControllerNetwork.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-one-api/docs/ControllerNetwork.md b/zerotier-one-api/docs/ControllerNetwork.md
deleted file mode 100644
index 5a865e6..0000000
--- a/zerotier-one-api/docs/ControllerNetwork.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# ControllerNetwork
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | | [optional][readonly]
-**nwid** | Option<**String**> | | [optional][readonly]
-**objtype** | Option<**String**> | | [optional][readonly]
-**name** | Option<**String**> | | [optional]
-**creation_time** | Option<**f32**> | | [optional][readonly]
-**private** | Option<**bool**> | | [optional]
-**enable_broadcast** | Option<**bool**> | | [optional]
-**v4_assign_mode** | Option<[**crate::models::ControllerNetworkV4AssignMode**](ControllerNetwork_v4AssignMode.md)> | | [optional]
-**v6_assign_mode** | Option<[**crate::models::ControllerNetworkV6AssignMode**](ControllerNetwork_v6AssignMode.md)> | | [optional]
-**mtu** | Option<**i32**> | | [optional]
-**multicast_limit** | Option<**i32**> | | [optional]
-**revision** | Option<**i32**> | | [optional][readonly]
-**routes** | Option<[**Vec**](ControllerNetwork_routes.md)> | | [optional]
-**ip_assignment_pools** | Option<[**Vec**](ControllerNetwork_ipAssignmentPools.md)> | | [optional]
-**rules** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**capabilities** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**tags** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**remote_trace_target** | Option<**String**> | | [optional]
-**remote_trace_level** | Option<**i32**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerNetworkIpAssignmentPools.md b/zerotier-one-api/docs/ControllerNetworkIpAssignmentPools.md
deleted file mode 100644
index d427d68..0000000
--- a/zerotier-one-api/docs/ControllerNetworkIpAssignmentPools.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ControllerNetworkIpAssignmentPools
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**ip_range_start** | Option<**String**> | | [optional]
-**ip_range_end** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerNetworkMember.md b/zerotier-one-api/docs/ControllerNetworkMember.md
deleted file mode 100644
index 52863a0..0000000
--- a/zerotier-one-api/docs/ControllerNetworkMember.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# ControllerNetworkMember
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | Option<**String**> | | [optional][readonly]
-**address** | Option<**String**> | | [optional][readonly]
-**nwid** | Option<**String**> | | [optional][readonly]
-**authorized** | Option<**bool**> | | [optional]
-**active_bridge** | Option<**bool**> | | [optional]
-**identity** | Option<**String**> | | [optional][readonly]
-**ip_assignments** | Option<**Vec**> | | [optional]
-**revision** | Option<**i32**> | | [optional][readonly]
-**v_major** | Option<**i32**> | | [optional][readonly]
-**v_minor** | Option<**i32**> | | [optional][readonly]
-**v_rev** | Option<**i32**> | | [optional][readonly]
-**v_proto** | Option<**i32**> | | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerNetworkRoutes.md b/zerotier-one-api/docs/ControllerNetworkRoutes.md
deleted file mode 100644
index ef3c8ad..0000000
--- a/zerotier-one-api/docs/ControllerNetworkRoutes.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ControllerNetworkRoutes
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**target** | Option<**String**> | | [optional]
-**via** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerNetworkV4AssignMode.md b/zerotier-one-api/docs/ControllerNetworkV4AssignMode.md
deleted file mode 100644
index 4380033..0000000
--- a/zerotier-one-api/docs/ControllerNetworkV4AssignMode.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ControllerNetworkV4AssignMode
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**zt** | Option<**bool**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerNetworkV6AssignMode.md b/zerotier-one-api/docs/ControllerNetworkV6AssignMode.md
deleted file mode 100644
index d7cfbab..0000000
--- a/zerotier-one-api/docs/ControllerNetworkV6AssignMode.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ControllerNetworkV6AssignMode
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**var_6plane** | Option<**bool**> | | [optional]
-**rfc4193** | Option<**bool**> | | [optional]
-**zt** | Option<**bool**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/ControllerStatus.md b/zerotier-one-api/docs/ControllerStatus.md
deleted file mode 100644
index b5fc008..0000000
--- a/zerotier-one-api/docs/ControllerStatus.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ControllerStatus
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**controller** | Option<**bool**> | | [optional][readonly]
-**api_version** | Option<**i32**> | | [optional][readonly]
-**clock** | Option<**i64**> | | [optional][readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/Network.md b/zerotier-one-api/docs/Network.md
deleted file mode 100644
index f7b8ed9..0000000
--- a/zerotier-one-api/docs/Network.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Network
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**allow_dns** | Option<**bool**> | Let ZeroTier modify the system's DNS settings. | [optional]
-**allow_default** | Option<**bool**> | Let ZeroTier modify the system's default route. | [optional]
-**allow_global** | Option<**bool**> | Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918). | [optional]
-**allow_managed** | Option<**bool**> | Let ZeroTier to manage IP addresses and Route assignments. | [optional]
-**assigned_addresses** | Option<**Vec**> | | [optional]
-**bridge** | Option<**bool**> | | [optional]
-**broadcast_enabled** | Option<**bool**> | | [optional]
-**dns** | Option<[**crate::models::NetworkAllOf1Dns**](Network_allOf_1_dns.md)> | | [optional]
-**id** | Option<**String**> | | [optional]
-**mac** | Option<**String**> | MAC address for this network's interface. | [optional]
-**mtu** | Option<**i32**> | | [optional]
-**multicast_subscriptions** | Option<[**Vec**](Network_allOf_1_multicastSubscriptions.md)> | | [optional]
-**name** | Option<**String**> | | [optional]
-**netconf_revision** | Option<**i32**> | | [optional]
-**port_device_name** | Option<**String**> | | [optional]
-**port_error** | Option<**i32**> | | [optional]
-**routes** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**status** | Option<**String**> | | [optional]
-**_type** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/NetworkAllOf.md b/zerotier-one-api/docs/NetworkAllOf.md
deleted file mode 100644
index 219a59c..0000000
--- a/zerotier-one-api/docs/NetworkAllOf.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# NetworkAllOf
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**allow_dns** | Option<**bool**> | Let ZeroTier modify the system's DNS settings. | [optional]
-**allow_default** | Option<**bool**> | Let ZeroTier modify the system's default route. | [optional]
-**allow_global** | Option<**bool**> | Let ZeroTier manage IP addresses and route assignments that aren't in private ranges (rfc1918). | [optional]
-**allow_managed** | Option<**bool**> | Let ZeroTier manage IP addresses and Route assignments. | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/NetworkAllOf1.md b/zerotier-one-api/docs/NetworkAllOf1.md
deleted file mode 100644
index 87cf007..0000000
--- a/zerotier-one-api/docs/NetworkAllOf1.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# NetworkAllOf1
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**allow_dns** | Option<**bool**> | Let ZeroTier modify the system's DNS settings. | [optional]
-**allow_default** | Option<**bool**> | Let ZeroTier modify the system's default route. | [optional]
-**allow_global** | Option<**bool**> | Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918). | [optional]
-**allow_managed** | Option<**bool**> | Let ZeroTier to manage IP addresses and Route assignments. | [optional]
-**assigned_addresses** | Option<**Vec**> | | [optional]
-**bridge** | Option<**bool**> | | [optional]
-**broadcast_enabled** | Option<**bool**> | | [optional]
-**dns** | Option<[**crate::models::NetworkAllOf1Dns**](Network_allOf_1_dns.md)> | | [optional]
-**id** | Option<**String**> | | [optional]
-**mac** | Option<**String**> | MAC address for this network's interface. | [optional]
-**mtu** | Option<**i32**> | | [optional]
-**multicast_subscriptions** | Option<[**Vec**](Network_allOf_1_multicastSubscriptions.md)> | | [optional]
-**name** | Option<**String**> | | [optional]
-**netconf_revision** | Option<**i32**> | | [optional]
-**port_device_name** | Option<**String**> | | [optional]
-**port_error** | Option<**i32**> | | [optional]
-**routes** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
-**status** | Option<**String**> | | [optional]
-**_type** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/NetworkAllOf1Dns.md b/zerotier-one-api/docs/NetworkAllOf1Dns.md
deleted file mode 100644
index 98c9d42..0000000
--- a/zerotier-one-api/docs/NetworkAllOf1Dns.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# NetworkAllOf1Dns
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**domain** | Option<**String**> | | [optional]
-**servers** | Option<**Vec**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/NetworkAllOf1MulticastSubscriptions.md b/zerotier-one-api/docs/NetworkAllOf1MulticastSubscriptions.md
deleted file mode 100644
index 77a1e05..0000000
--- a/zerotier-one-api/docs/NetworkAllOf1MulticastSubscriptions.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# NetworkAllOf1MulticastSubscriptions
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**adi** | Option<**i64**> | | [optional]
-**mac** | Option<**String**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/NetworkApi.md b/zerotier-one-api/docs/NetworkApi.md
deleted file mode 100644
index 2694cd3..0000000
--- a/zerotier-one-api/docs/NetworkApi.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# \NetworkApi
-
-All URIs are relative to *http://localhost:9993*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**delete_network**](NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | Leave a network.
-[**get_network**](NetworkApi.md#get_network) | **GET** /network/{networkID} | Get a joined Network membership configuration by Network ID.
-[**get_networks**](NetworkApi.md#get_networks) | **GET** /network | Get all network memberships.
-[**update_network**](NetworkApi.md#update_network) | **POST** /network/{networkID} | Join a network or update it's configuration by Network ID.
-
-
-
-## delete_network
-
-> delete_network(network_id)
-Leave a network.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_network
-
-> crate::models::Network get_network(network_id)
-Get a joined Network membership configuration by Network ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network to get. | [required] |
-
-### Return type
-
-[**crate::models::Network**](Network.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_networks
-
-> Vec get_networks()
-Get all network memberships.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Vec**](Network.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## update_network
-
-> crate::models::Network update_network(network_id, network)
-Join a network or update it's configuration by Network ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**network_id** | **String** | ID of the network to change. | [required] |
-**network** | [**Network**](Network.md) | Network membership object | [required] |
-
-### Return type
-
-[**crate::models::Network**](Network.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-one-api/docs/Peer.md b/zerotier-one-api/docs/Peer.md
deleted file mode 100644
index b9a72f6..0000000
--- a/zerotier-one-api/docs/Peer.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Peer
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**address** | Option<**String**> | | [optional]
-**is_bonded** | Option<**bool**> | | [optional]
-**latency** | Option<**i32**> | | [optional]
-**paths** | Option<[**Vec**](Peer_paths.md)> | | [optional]
-**role** | Option<**String**> | | [optional]
-**version** | Option<**String**> | | [optional]
-**version_major** | Option<**i32**> | | [optional]
-**version_minor** | Option<**i32**> | | [optional]
-**version_rev** | Option<**i32**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/PeerApi.md b/zerotier-one-api/docs/PeerApi.md
deleted file mode 100644
index a96f023..0000000
--- a/zerotier-one-api/docs/PeerApi.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# \PeerApi
-
-All URIs are relative to *http://localhost:9993*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**get_peer**](PeerApi.md#get_peer) | **GET** /peer/{address} | Get information about a specific peer by Node ID.
-[**get_peers**](PeerApi.md#get_peers) | **GET** /peer | Get all peers.
-
-
-
-## get_peer
-
-> crate::models::Peer get_peer(address)
-Get information about a specific peer by Node ID.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**address** | **String** | ZeroTier address of the peer to get | [required] |
-
-### Return type
-
-[**crate::models::Peer**](Peer.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
-## get_peers
-
-> Vec get_peers()
-Get all peers.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Vec**](Peer.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-one-api/docs/PeerPaths.md b/zerotier-one-api/docs/PeerPaths.md
deleted file mode 100644
index 8ac7a78..0000000
--- a/zerotier-one-api/docs/PeerPaths.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# PeerPaths
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**active** | Option<**bool**> | | [optional]
-**address** | Option<**String**> | | [optional]
-**expired** | Option<**bool**> | | [optional]
-**last_receive** | Option<**i64**> | | [optional]
-**last_send** | Option<**i64**> | | [optional]
-**preferred** | Option<**bool**> | | [optional]
-**trusted_path_id** | Option<**i32**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/Status.md b/zerotier-one-api/docs/Status.md
deleted file mode 100644
index 531a80a..0000000
--- a/zerotier-one-api/docs/Status.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Status
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**address** | Option<**String**> | | [optional]
-**clock** | Option<**i64**> | | [optional]
-**config** | Option<[**crate::models::StatusConfig**](Status_config.md)> | | [optional]
-**online** | Option<**bool**> | | [optional]
-**planet_world_id** | Option<**i64**> | | [optional]
-**planet_world_timestamp** | Option<**i64**> | | [optional]
-**public_identity** | Option<**String**> | | [optional]
-**tcp_fallback_active** | Option<**bool**> | | [optional]
-**version** | Option<**String**> | | [optional]
-**version_build** | Option<**i32**> | | [optional]
-**version_major** | Option<**i32**> | | [optional]
-**version_minor** | Option<**i32**> | | [optional]
-**version_rev** | Option<**i32**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/StatusApi.md b/zerotier-one-api/docs/StatusApi.md
deleted file mode 100644
index 3c6f957..0000000
--- a/zerotier-one-api/docs/StatusApi.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# \StatusApi
-
-All URIs are relative to *http://localhost:9993*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**get_status**](StatusApi.md#get_status) | **GET** /status | Node status and addressing info.
-
-
-
-## get_status
-
-> crate::models::Status get_status()
-Node status and addressing info.
-
-### Parameters
-
-This endpoint does not need any parameter.
-
-### Return type
-
-[**crate::models::Status**](Status.md)
-
-### Authorization
-
-[ApiKeyAuth](../README.md#ApiKeyAuth)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/zerotier-one-api/docs/StatusConfig.md b/zerotier-one-api/docs/StatusConfig.md
deleted file mode 100644
index d126f98..0000000
--- a/zerotier-one-api/docs/StatusConfig.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# StatusConfig
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**settings** | Option<[**crate::models::StatusConfigSettings**](Status_config_settings.md)> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/docs/StatusConfigSettings.md b/zerotier-one-api/docs/StatusConfigSettings.md
deleted file mode 100644
index 0a03e7d..0000000
--- a/zerotier-one-api/docs/StatusConfigSettings.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# StatusConfigSettings
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**allow_tcp_fallback_relay** | Option<**bool**> | | [optional]
-**port_mapping_enabled** | Option<**bool**> | | [optional]
-**primary_port** | Option<**i32**> | | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/zerotier-one-api/git_push.sh b/zerotier-one-api/git_push.sh
deleted file mode 100644
index f53a75d..0000000
--- a/zerotier-one-api/git_push.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
-#
-# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
-
-git_user_id=$1
-git_repo_id=$2
-release_note=$3
-git_host=$4
-
-if [ "$git_host" = "" ]; then
- git_host="github.com"
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
-fi
-
-if [ "$git_user_id" = "" ]; then
- git_user_id="GIT_USER_ID"
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
-fi
-
-if [ "$git_repo_id" = "" ]; then
- git_repo_id="GIT_REPO_ID"
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
-fi
-
-if [ "$release_note" = "" ]; then
- release_note="Minor update"
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
-fi
-
-# Initialize the local directory as a Git repository
-git init
-
-# Adds the files in the local repository and stages them for commit.
-git add .
-
-# Commits the tracked changes and prepares them to be pushed to a remote repository.
-git commit -m "$release_note"
-
-# Sets the new remote
-git_remote=$(git remote)
-if [ "$git_remote" = "" ]; then # git remote not defined
-
- if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
- else
- git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
- fi
-
-fi
-
-git pull origin master
-
-# Pushes (Forces) the changes in the local repository up to the remote repository
-echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
-git push origin master 2>&1 | grep -v 'To https'
diff --git a/zerotier-one-api/openapi.json b/zerotier-one-api/openapi.json
new file mode 100644
index 0000000..e72deb1
--- /dev/null
+++ b/zerotier-one-api/openapi.json
@@ -0,0 +1,1035 @@
+{
+ "openapi": "3.0.0",
+ "info": {
+ "title": "ZeroTierOne Service API",
+ "version": "0.1.0",
+ "description": " This API controls the ZeroTier service that runs in the background on your computer. This is how zerotier-cli, and the macOS and Windows apps control the service.
API requests must be authenticated via an authentication token. ZeroTier One saves this token in the authtoken.secret file in its working directory. This token may be supplied via the X-ZT1-Auth HTTP request header.
For example: curl -H \"X-ZT1-Auth: $TOKEN\" http://localhost:9993/status
The token can be found in:
- Mac :: /Library/Application Support/ZeroTier/One
- Windows :: \\ProgramData\\ZeroTier\\One
- Linux :: /var/lib/zerotier-one
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/servicev1.json
",
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ },
+ "servers": [
+ {
+ "url": "http://localhost:9993",
+ "description": "Production Server"
+ }
+ ],
+ "tags": [
+ {
+ "name": "status",
+ "description": "status"
+ },
+ {
+ "name": "network",
+ "description": "settings and status of a joined network"
+ },
+ {
+ "name": "peer",
+ "description": "peer status"
+ }
+ ],
+ "paths": {
+ "/controller": {
+ "get": {
+ "tags": ["controller"],
+ "summary": "Get Controller Status.",
+ "operationId": "getControllerStatus",
+ "description": "Check for controller function and return controller status.",
+ "responses": {
+ "200": {
+ "description": "Status object.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerStatus"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/controller/network": {
+ "get": {
+ "tags": ["controller"],
+ "summary": "List Networks.",
+ "operationId": "getControllerNetworks",
+ "description": "List IDs of all networks hosted by this controller.",
+ "responses": {
+ "200": {
+ "description": "List of network IDs.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "example": "3e245e31af7a726a"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/controller/network/{networkID}": {
+ "get": {
+ "tags": ["controller"],
+ "summary": "Get Network by ID.",
+ "description": "Get details of a network by it's ID.",
+ "operationId": "getControllerNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "3e245e31af7a726a"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Network Details.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetwork"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ },
+ "post": {
+ "tags": ["controller"],
+ "summary": "Create or Update a Network.",
+ "operationId": "setControllerNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "3e245e31af7a726a"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Network object JSON.",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetwork"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetwork"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/controller/network/{controllerID}": {
+ "post": {
+ "tags": ["controller"],
+ "summary": "Generate Random Network ID.",
+ "operationId": "generateControllerNetwork",
+ "description": "Create a new network with a random ID.",
+ "parameters": [
+ {
+ "name": "controllerID",
+ "description": "Node ID of the controller.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Network object JSON.",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetwork"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetwork"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/controller/network/{networkID}/member": {
+ "get": {
+ "tags": ["controller"],
+ "summary": "List Network Members.",
+ "operationId": "getControllerNetworkMembers",
+ "description": "JSON object containing all member IDs as keys and their memberRevisionCounter values as values.",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "example": { "03d516a9df": 5, "b9d5ad8e13": 1 }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/controller/network/{networkID}/member/{nodeID}": {
+ "get": {
+ "tags": ["controller"],
+ "summary": "Get Network Member Details by ID.",
+ "operationId": "getControllerNetworkMember",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "nodeID",
+ "description": "ID of the member node.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ControllerNetworkMember"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/status": {
+ "get": {
+ "tags": ["status"],
+ "summary": "Node status and addressing info.",
+ "operationId": "getStatus",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Status"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/network": {
+ "get": {
+ "tags": ["network"],
+ "summary": "Get all network memberships.",
+ "operationId": "getNetworks",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/network/{networkID}": {
+ "get": {
+ "tags": ["network"],
+ "summary": "Get a joined Network membership configuration by Network ID.",
+ "operationId": "getNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network to get.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ },
+ "post": {
+ "tags": ["network"],
+ "summary": "Join a network or update it's configuration by Network ID.",
+ "operationId": "updateNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network to change.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Network membership object",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Network"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ },
+ "delete": {
+ "tags": ["network"],
+ "summary": "Leave a network.",
+ "operationId": "deleteNetwork",
+ "parameters": [
+ {
+ "name": "networkID",
+ "description": "ID of the network",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Network deleted."
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/peer": {
+ "get": {
+ "tags": ["peer"],
+ "summary": "Get all peers.",
+ "operationId": "getPeers",
+ "responses": {
+ "200": {
+ "description": "Array of Peer objects",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Peer"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ },
+ "/peer/{address}": {
+ "get": {
+ "tags": ["peer"],
+ "summary": "Get information about a specific peer by Node ID.",
+ "operationId": "getPeer",
+ "parameters": [
+ {
+ "name": "address",
+ "description": "ZeroTier address of the peer to get",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Peer object",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Peer"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "ApiKeyAuth": {
+ "type": "apiKey",
+ "in": "header",
+ "name": "X-ZT1-Auth"
+ }
+ },
+ "responses": {
+ "UnauthorizedError": {
+ "description": "Authorization required."
+ }
+ },
+ "schemas": {
+ "ControllerStatus": {
+ "type": "object",
+ "properties": {
+ "controller": {
+ "type": "boolean",
+ "readOnly": true
+ },
+ "apiVersion": {
+ "type": "integer",
+ "example": 3,
+ "readOnly": true
+ },
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1623101592,
+ "readOnly": true
+ }
+ }
+ },
+ "ControllerNetwork": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "example": "3e245e31af000001"
+ },
+ "nwid": {
+ "type": "string",
+ "readOnly": true,
+ "example": "3e245e31af000001"
+ },
+ "objtype": {
+ "type": "string",
+ "example": "network",
+ "readOnly": true
+ },
+ "name": {
+ "type": "string",
+ "example": "my-cool-network"
+ },
+ "creationTime": {
+ "type": "number",
+ "example": 1623101592,
+ "readOnly": true
+ },
+ "private": {
+ "type": "boolean"
+ },
+ "enableBroadcast": {
+ "type": "boolean"
+ },
+ "v4AssignMode": {
+ "type": "object",
+ "properties": {
+ "zt": {
+ "type": "boolean"
+ }
+ }
+ },
+ "v6AssignMode": {
+ "type": "object",
+ "properties": {
+ "6plane": {
+ "type": "boolean"
+ },
+ "rfc4193": {
+ "type": "boolean"
+ },
+ "zt": {
+ "type": "boolean"
+ }
+ }
+ },
+ "mtu": {
+ "type": "integer",
+ "example": 2800
+ },
+ "multicastLimit": {
+ "type": "integer",
+ "example": 32
+ },
+ "revision": {
+ "type": "integer",
+ "example": 1,
+ "readOnly": true
+ },
+ "routes": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "target": {
+ "type": "string",
+ "example": "192.168.192.0/24"
+ },
+ "via": {
+ "type": "string",
+ "example": "192.168.192.1",
+ "nullable": true
+ }
+ }
+ }
+ },
+ "ipAssignmentPools": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "ipRangeStart": {
+ "type": "string",
+ "example": "192.168.192.1"
+ },
+ "ipRangeEnd": {
+ "type": "string",
+ "example": "192.168.192.254"
+ }
+ }
+ }
+ },
+ "rules": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "capabilities": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "remoteTraceTarget": {
+ "type": "string",
+ "example": "7f5d90eb87"
+ },
+ "remoteTraceLevel": {
+ "type": "integer"
+ }
+ }
+ },
+ "ControllerNetworkMember": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "example": "eb8d45c5c9"
+ },
+ "address": {
+ "type": "string",
+ "readOnly": true,
+ "example": "eb8d45c5c9"
+ },
+ "nwid": {
+ "type": "string",
+ "readOnly": true,
+ "example": "3e245e31af000001"
+ },
+ "authorized": {
+ "type": "boolean"
+ },
+ "activeBridge": {
+ "type": "boolean"
+ },
+ "identity": {
+ "type": "string",
+ "readOnly": true,
+ "example": "eb8d45c5c9:0:0279558f1a731cb2f628b3adc9f8915d7c2f3752e07d75f2d75fde08274b9c3a43d8b04115fd30f37043f61758ac874b844cc184fdf51e1022e988c1d093a50d:91a840bcd3fbac910afc56be4222973f675204a0ca9625218352e1c82debaa758b915d948c5fe4bd3c38cf1255904804a5b937f5edaef182ba8d5f3d8a243329"
+ },
+ "ipAssignments": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "example": "10.147.20.190"
+ }
+ },
+ "revision": {
+ "type": "integer",
+ "readOnly": true,
+ "example": 1
+ },
+ "vMajor": {
+ "type": "integer",
+ "readOnly": true,
+ "example": 1
+ },
+ "vMinor": {
+ "type": "integer",
+ "readOnly": true,
+ "example": 6
+ },
+ "vRev": {
+ "type": "integer",
+ "readOnly": true,
+ "example": 5
+ },
+ "vProto": {
+ "type": "integer",
+ "readOnly": true,
+ "example": 5
+ }
+ }
+ },
+ "Status": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0deadbeef1"
+ },
+ "clock": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1618948931097
+ },
+ "config": {
+ "type": "object",
+ "properties": {
+ "settings": {
+ "type": "object",
+ "properties": {
+ "allowTcpFallbackRelay": {
+ "type": "boolean"
+ },
+ "portMappingEnabled": {
+ "type": "boolean"
+ },
+ "primaryPort": {
+ "type": "integer",
+ "example": 9993
+ }
+ }
+ }
+ }
+ },
+ "online": {
+ "type": "boolean"
+ },
+ "planetWorldId": {
+ "type": "integer",
+ "format": "int64",
+ "example": 149604618
+ },
+ "planetWorldTimestamp": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1618339625163
+ },
+ "publicIdentity": {
+ "type": "string",
+ "example": "33c799cb58:0:690b44091ec50a44eb7f7769354b49abb47ac8747d99d547a1ec8c4d47623c5a6e3927f29b8d8443aebebc9ba4d4a812bd8902d71318db34b89d00186e8f4e4e"
+ },
+ "tcpFallbackActive": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "string",
+ "example": "1.6.4"
+ },
+ "versionBuild": {
+ "type": "integer",
+ "example": 0
+ },
+ "versionMajor": {
+ "type": "integer",
+ "example": 1
+ },
+ "versionMinor": {
+ "type": "integer",
+ "example": 6
+ },
+ "versionRev": {
+ "type": "integer",
+ "example": 4
+ }
+ }
+ },
+ "Network": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "allowDNS": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier modify the system's DNS settings.",
+ "example": false
+ },
+ "allowDefault": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier modify the system's default route.",
+ "example": false
+ },
+ "allowGlobal": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier manage IP addresses and route assignments that aren't in private ranges (rfc1918).",
+ "example": false
+ },
+ "allowManaged": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier manage IP addresses and Route assignments.",
+ "example": true
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "allowDNS": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier modify the system's DNS settings."
+ },
+ "allowDefault": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier modify the system's default route."
+ },
+ "allowGlobal": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918)."
+ },
+ "allowManaged": {
+ "type": "boolean",
+ "readOnly": false,
+ "description": "Let ZeroTier to manage IP addresses and Route assignments."
+ },
+ "assignedAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "example": "10.147.20.190"
+ }
+ },
+ "bridge": {
+ "type": "boolean"
+ },
+ "broadcastEnabled": {
+ "type": "boolean"
+ },
+ "dns": {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string",
+ "example": "zt.example.com"
+ },
+ "servers": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "example": "10.147.20.3"
+ }
+ }
+ }
+ },
+ "id": {
+ "type": "string",
+ "example": "565799d8f620c5c5"
+ },
+ "mac": {
+ "type": "string",
+ "example": "e6:d2:2b:e6:68:73",
+ "description": "MAC address for this network's interface."
+ },
+ "mtu": {
+ "type": "integer",
+ "example": 2800
+ },
+ "multicastSubscriptions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "adi": {
+ "type": "integer",
+ "format": "int64",
+ "example": 0
+ },
+ "mac": {
+ "type": "string",
+ "example": "34:34:ff:da:6e:ff"
+ }
+ }
+ }
+ },
+ "name": {
+ "type": "string",
+ "example": "clever_krum"
+ },
+ "netconfRevision": {
+ "type": "integer",
+ "example": 123
+ },
+ "portDeviceName": {
+ "type": "string",
+ "example": "ztnnhrtimp"
+ },
+ "portError": {
+ "type": "integer",
+ "example": 0
+ },
+ "routes": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "flags": {
+ "type": "integer",
+ "example": 0
+ },
+ "metric": {
+ "type": "integer",
+ "example": 0
+ },
+ "target": {
+ "type": "string",
+ "example": "10.147.20.0/24"
+ },
+ "via": {
+ "type": "string",
+ "example": "192.168.168.5"
+ }
+ }
+ }
+ },
+ "status": {
+ "type": "string",
+ "example": "OK"
+ },
+ "type": {
+ "type": "string",
+ "example": "PRIVATE"
+ }
+ }
+ }
+ ]
+ },
+ "Peer": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "992fcf1db7"
+ },
+ "isBonded": {
+ "type": "boolean",
+ "example": false
+ },
+ "latency": {
+ "type": "integer",
+ "example": 40
+ },
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "active": {
+ "type": "boolean"
+ },
+ "address": {
+ "type": "string",
+ "example": "195.181.173.159/9993"
+ },
+ "expired": {
+ "type": "boolean",
+ "example": false
+ },
+ "lastReceive": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1618955164580
+ },
+ "lastSend": {
+ "type": "integer",
+ "format": "int64",
+ "example": 1618955164596
+ },
+ "preferred": {
+ "type": "boolean",
+ "example": true
+ },
+ "trustedPathId": {
+ "type": "integer",
+ "example": 0
+ }
+ }
+ }
+ },
+ "role": {
+ "type": "string",
+ "example": "LEAF"
+ },
+ "version": {
+ "type": "string",
+ "example": "1.6.4"
+ },
+ "versionMajor": {
+ "type": "integer",
+ "example": 1
+ },
+ "versionMinor": {
+ "type": "integer",
+ "example": 6
+ },
+ "versionRev": {
+ "type": "integer",
+ "example": 4
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKeyAuth": []
+ }
+ ]
+}
diff --git a/zerotier-one-api/src/apis/configuration.rs b/zerotier-one-api/src/apis/configuration.rs
deleted file mode 100644
index 11cc78f..0000000
--- a/zerotier-one-api/src/apis/configuration.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * ZeroTierOne Service API
- *
- * This API controls the ZeroTier service that runs in the background on your computer. This is how zerotier-cli, and the macOS and Windows apps control the service.
API requests must be authenticated via an authentication token. ZeroTier One saves this token in the authtoken.secret file in its working directory. This token may be supplied via the X-ZT1-Auth HTTP request header.
For example: curl -H \"X-ZT1-Auth: $TOKEN\" http://localhost:9993/status
The token can be found in:
- Mac :: /Library/Application Support/ZeroTier/One
- Windows :: \\ProgramData\\ZeroTier\\One
- Linux :: /var/lib/zerotier-one
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/servicev1.json
- *
- * The version of the OpenAPI document: 0.1.0
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-#[derive(Debug, Clone)]
-pub struct Configuration {
- pub base_path: String,
- pub user_agent: Option,
- pub client: reqwest::Client,
- pub basic_auth: Option,
- pub oauth_access_token: Option,
- pub bearer_access_token: Option,
- pub api_key: Option,
- // TODO: take an oauth2 token source, similar to the go one
-}
-
-pub type BasicAuth = (String, Option);
-
-#[derive(Debug, Clone)]
-pub struct ApiKey {
- pub prefix: Option,
- pub key: String,
-}
-
-impl Configuration {
- pub fn new() -> Configuration {
- Configuration::default()
- }
-}
-
-impl Default for Configuration {
- fn default() -> Self {
- Configuration {
- base_path: "http://localhost:9993".to_owned(),
- user_agent: Some("OpenAPI-Generator/0.1.0/rust".to_owned()),
- client: reqwest::Client::new(),
- basic_auth: None,
- oauth_access_token: None,
- bearer_access_token: None,
- api_key: None,
- }
- }
-}
diff --git a/zerotier-one-api/src/apis/controller_api.rs b/zerotier-one-api/src/apis/controller_api.rs
deleted file mode 100644
index 1b1028d..0000000
--- a/zerotier-one-api/src/apis/controller_api.rs
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * ZeroTierOne Service API
- *
- * This API controls the ZeroTier service that runs in the background on your computer. This is how zerotier-cli, and the macOS and Windows apps control the service.
API requests must be authenticated via an authentication token. ZeroTier One saves this token in the authtoken.secret file in its working directory. This token may be supplied via the X-ZT1-Auth HTTP request header.
For example: curl -H \"X-ZT1-Auth: $TOKEN\" http://localhost:9993/status
The token can be found in:
- Mac :: /Library/Application Support/ZeroTier/One
- Windows :: \\ProgramData\\ZeroTier\\One
- Linux :: /var/lib/zerotier-one
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/servicev1.json
- *
- * The version of the OpenAPI document: 0.1.0
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-use reqwest;
-
-use crate::apis::ResponseContent;
-use super::{Error, configuration};
-
-
-/// struct for typed errors of method [`generate_controller_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GenerateControllerNetworkError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_controller_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetControllerNetworkError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_controller_network_member`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetControllerNetworkMemberError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_controller_network_members`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetControllerNetworkMembersError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_controller_networks`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetControllerNetworksError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_controller_status`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetControllerStatusError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`set_controller_network`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum SetControllerNetworkError {
- Status401(),
- UnknownValue(serde_json::Value),
-}
-
-
-/// Create a new network with a random ID.
-pub async fn generate_controller_network(configuration: &configuration::Configuration, controller_id: &str, controller_network: crate::models::ControllerNetwork) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/controller/network/{controllerID}______", local_var_configuration.base_path, controllerID=crate::apis::urlencode(controller_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
- };
- local_var_req_builder = local_var_req_builder.header("X-ZT1-Auth", local_var_value);
- };
- local_var_req_builder = local_var_req_builder.json(&controller_network);
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-/// Get details of a network by it's ID.
-pub async fn get_controller_network(configuration: &configuration::Configuration, network_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/controller/network/{networkID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
- };
- local_var_req_builder = local_var_req_builder.header("X-ZT1-Auth", local_var_value);
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-pub async fn get_controller_network_member(configuration: &configuration::Configuration, network_id: &str, node_id: &str) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/controller/network/{networkID}/member{nodeID}", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id), nodeID=crate::apis::urlencode(node_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
- };
- local_var_req_builder = local_var_req_builder.header("X-ZT1-Auth", local_var_value);
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-/// JSON object containing all member IDs as keys and their memberRevisionCounter values as values.
-pub async fn get_controller_network_members(configuration: &configuration::Configuration, network_id: &str) -> Result<::std::collections::HashMap, Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/controller/network/{networkID}/member", local_var_configuration.base_path, networkID=crate::apis::urlencode(network_id));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
- };
- local_var_req_builder = local_var_req_builder.header("X-ZT1-Auth", local_var_value);
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- serde_json::from_str(&local_var_content).map_err(Error::from)
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
-/// List IDs of all networks hosted by this controller.
-pub async fn get_controller_networks(configuration: &configuration::Configuration, ) -> Result