diff --git a/zerotier-central-api/.openapi-generator/FILES b/zerotier-central-api/.openapi-generator/FILES index f61261f..2c5e10b 100644 --- a/zerotier-central-api/.openapi-generator/FILES +++ b/zerotier-central-api/.openapi-generator/FILES @@ -5,6 +5,7 @@ Cargo.toml README.md docs/ApiToken.md docs/AuthMethods.md +docs/Dns.md docs/InviteStatus.md docs/IpRange.md docs/Ipv4AssignMode.md @@ -14,7 +15,6 @@ docs/MemberConfig.md docs/Network.md docs/NetworkApi.md docs/NetworkConfig.md -docs/NetworkConfigDns.md docs/NetworkMemberApi.md docs/Organization.md docs/OrganizationInvitation.md @@ -39,6 +39,7 @@ 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 @@ -48,7 +49,6 @@ src/models/member_config.rs src/models/mod.rs src/models/network.rs src/models/network_config.rs -src/models/network_config_dns.rs src/models/organization.rs src/models/organization_invitation.rs src/models/organization_member.rs diff --git a/zerotier-central-api/.openapi-generator/VERSION b/zerotier-central-api/.openapi-generator/VERSION index 4b448de..5f68295 100644 --- a/zerotier-central-api/.openapi-generator/VERSION +++ b/zerotier-central-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/zerotier-central-api/Cargo.toml b/zerotier-central-api/Cargo.toml index e19085f..7532112 100644 --- a/zerotier-central-api/Cargo.toml +++ b/zerotier-central-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zerotier-central-api" -version = "1.0.2" +version = "1.0.3" edition = "2018" description = "OpenAPI bindings to the ZeroTier Central (https://my.zerotier.com) service" authors = ["Erik Hollensbe ", "Adam Ierymenko "] diff --git a/zerotier-central-api/README.md b/zerotier-central-api/README.md index 5f0799b..8089eaf 100644 --- a/zerotier-central-api/README.md +++ b/zerotier-central-api/README.md @@ -1,22 +1,23 @@ # 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

+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: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen -For more information, please visit [https://discuss.zerotier.com](https://discuss.zerotier.com) +- Package version: v1 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `zerotier-central-api` and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +zerotier-central-api = { path = "./zerotier-central-api" } ``` ## Documentation for API Endpoints @@ -55,6 +56,7 @@ Class | Method | HTTP request | Description - [ApiToken](docs/ApiToken.md) - [AuthMethods](docs/AuthMethods.md) + - [Dns](docs/Dns.md) - [InviteStatus](docs/InviteStatus.md) - [IpRange](docs/IpRange.md) - [Ipv4AssignMode](docs/Ipv4AssignMode.md) @@ -63,7 +65,6 @@ Class | Method | HTTP request | Description - [MemberConfig](docs/MemberConfig.md) - [Network](docs/Network.md) - [NetworkConfig](docs/NetworkConfig.md) - - [NetworkConfigDns](docs/NetworkConfigDns.md) - [Organization](docs/Organization.md) - [OrganizationInvitation](docs/OrganizationInvitation.md) - [OrganizationMember](docs/OrganizationMember.md) diff --git a/zerotier-central-api/docs/NetworkConfigDns.md b/zerotier-central-api/docs/Dns.md similarity index 95% rename from zerotier-central-api/docs/NetworkConfigDns.md rename to zerotier-central-api/docs/Dns.md index db00548..6513460 100644 --- a/zerotier-central-api/docs/NetworkConfigDns.md +++ b/zerotier-central-api/docs/Dns.md @@ -1,4 +1,4 @@ -# NetworkConfigDns +# Dns ## Properties diff --git a/zerotier-central-api/docs/NetworkConfig.md b/zerotier-central-api/docs/NetworkConfig.md index bea88ae..44bb5b2 100644 --- a/zerotier-central-api/docs/NetworkConfig.md +++ b/zerotier-central-api/docs/NetworkConfig.md @@ -7,7 +7,7 @@ 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::NetworkConfigDns**](NetworkConfig_dns.md)> | | [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] diff --git a/zerotier-central-api/git_push.sh b/zerotier-central-api/git_push.sh index 9405f72..f53a75d 100644 --- a/zerotier-central-api/git_push.sh +++ b/zerotier-central-api/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/zerotier-central-api/src/apis/configuration.rs b/zerotier-central-api/src/apis/configuration.rs index 8c3eab6..77c3d01 100644 --- a/zerotier-central-api/src/apis/configuration.rs +++ b/zerotier-central-api/src/apis/configuration.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * diff --git a/zerotier-central-api/src/apis/network_api.rs b/zerotier-central-api/src/apis/network_api.rs index b48e8ee..f1a912e 100644 --- a/zerotier-central-api/src/apis/network_api.rs +++ b/zerotier-central-api/src/apis/network_api.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `delete_network` +/// struct for typed errors of method [`delete_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteNetworkError { @@ -25,7 +25,7 @@ pub enum DeleteNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_network_by_id` +/// struct for typed errors of method [`get_network_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworkByIdError { @@ -35,7 +35,7 @@ pub enum GetNetworkByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_network_list` +/// struct for typed errors of method [`get_network_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworkListError { @@ -43,7 +43,7 @@ pub enum GetNetworkListError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `new_network` +/// struct for typed errors of method [`new_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum NewNetworkError { @@ -51,7 +51,7 @@ pub enum NewNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_network` +/// struct for typed errors of method [`update_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateNetworkError { @@ -63,16 +63,17 @@ pub enum UpdateNetworkError { pub async fn delete_network(configuration: &configuration::Configuration, network_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -93,16 +94,17 @@ pub async fn delete_network(configuration: &configuration::Configuration, networ /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -122,16 +124,17 @@ pub async fn get_network_by_id(configuration: &configuration::Configuration, net } pub async fn get_network_list(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -151,16 +154,17 @@ pub async fn get_network_list(configuration: &configuration::Configuration, ) -> } pub async fn new_network(configuration: &configuration::Configuration, body: serde_json::Value) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); @@ -181,16 +185,17 @@ pub async fn new_network(configuration: &configuration::Configuration, body: ser } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); diff --git a/zerotier-central-api/src/apis/network_member_api.rs b/zerotier-central-api/src/apis/network_member_api.rs index 451e888..6b999a4 100644 --- a/zerotier-central-api/src/apis/network_member_api.rs +++ b/zerotier-central-api/src/apis/network_member_api.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `delete_network_member` +/// struct for typed errors of method [`delete_network_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteNetworkMemberError { @@ -25,7 +25,7 @@ pub enum DeleteNetworkMemberError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_network_member` +/// struct for typed errors of method [`get_network_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworkMemberError { @@ -35,7 +35,7 @@ pub enum GetNetworkMemberError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_network_member_list` +/// struct for typed errors of method [`get_network_member_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworkMemberListError { @@ -45,7 +45,7 @@ pub enum GetNetworkMemberListError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_network_member` +/// struct for typed errors of method [`update_network_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateNetworkMemberError { @@ -57,16 +57,17 @@ pub enum UpdateNetworkMemberError { 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -86,16 +87,17 @@ pub async fn delete_network_member(configuration: &configuration::Configuration, } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -115,16 +117,17 @@ pub async fn get_network_member(configuration: &configuration::Configuration, ne } pub async fn get_network_member_list(configuration: &configuration::Configuration, network_id: &str) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}/member", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -144,16 +147,17 @@ pub async fn get_network_member_list(configuration: &configuration::Configuratio } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}/member/{memberID}", configuration.base_path, networkID=crate::apis::urlencode(network_id), memberID=crate::apis::urlencode(member_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); diff --git a/zerotier-central-api/src/apis/organizations_api.rs b/zerotier-central-api/src/apis/organizations_api.rs index aafea93..d0c5702 100644 --- a/zerotier-central-api/src/apis/organizations_api.rs +++ b/zerotier-central-api/src/apis/organizations_api.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `accept_invitation` +/// struct for typed errors of method [`accept_invitation`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AcceptInvitationError { @@ -25,7 +25,7 @@ pub enum AcceptInvitationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `decline_invitation` +/// struct for typed errors of method [`decline_invitation`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeclineInvitationError { @@ -35,7 +35,7 @@ pub enum DeclineInvitationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_invitation_by_id` +/// struct for typed errors of method [`get_invitation_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetInvitationByIdError { @@ -45,7 +45,7 @@ pub enum GetInvitationByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_organization` +/// struct for typed errors of method [`get_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrganizationError { @@ -55,7 +55,7 @@ pub enum GetOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_organization_by_id` +/// struct for typed errors of method [`get_organization_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrganizationByIdError { @@ -65,7 +65,7 @@ pub enum GetOrganizationByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_organization_invitation_list` +/// struct for typed errors of method [`get_organization_invitation_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrganizationInvitationListError { @@ -75,7 +75,7 @@ pub enum GetOrganizationInvitationListError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_organization_members` +/// struct for typed errors of method [`get_organization_members`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrganizationMembersError { @@ -85,7 +85,7 @@ pub enum GetOrganizationMembersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `invite_user_by_email` +/// struct for typed errors of method [`invite_user_by_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum InviteUserByEmailError { @@ -97,16 +97,17 @@ pub enum InviteUserByEmailError { pub async fn accept_invitation(configuration: &configuration::Configuration, invite_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -126,16 +127,17 @@ pub async fn accept_invitation(configuration: &configuration::Configuration, inv } pub async fn decline_invitation(configuration: &configuration::Configuration, invite_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -155,16 +157,17 @@ pub async fn decline_invitation(configuration: &configuration::Configuration, in } pub async fn get_invitation_by_id(configuration: &configuration::Configuration, invite_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -184,16 +187,17 @@ pub async fn get_invitation_by_id(configuration: &configuration::Configuration, } pub async fn get_organization(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -213,16 +217,17 @@ pub async fn get_organization(configuration: &configuration::Configuration, ) -> } pub async fn get_organization_by_id(configuration: &configuration::Configuration, org_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org/{orgID}", configuration.base_path, orgID=crate::apis::urlencode(org_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -242,16 +247,17 @@ pub async fn get_organization_by_id(configuration: &configuration::Configuration } pub async fn get_organization_invitation_list(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org-invitation", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -271,16 +277,17 @@ pub async fn get_organization_invitation_list(configuration: &configuration::Con } pub async fn get_organization_members(configuration: &configuration::Configuration, org_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org/{orgID}/user", configuration.base_path, orgID=crate::apis::urlencode(org_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -300,16 +307,17 @@ pub async fn get_organization_members(configuration: &configuration::Configurati } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/org-invitation", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); diff --git a/zerotier-central-api/src/apis/user_api.rs b/zerotier-central-api/src/apis/user_api.rs index 3b3b93c..f95748a 100644 --- a/zerotier-central-api/src/apis/user_api.rs +++ b/zerotier-central-api/src/apis/user_api.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `add_api_token` +/// struct for typed errors of method [`add_api_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AddApiTokenError { @@ -26,7 +26,7 @@ pub enum AddApiTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_api_token` +/// struct for typed errors of method [`delete_api_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteApiTokenError { @@ -36,7 +36,7 @@ pub enum DeleteApiTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_user_by_id` +/// struct for typed errors of method [`delete_user_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteUserByIdError { @@ -46,7 +46,7 @@ pub enum DeleteUserByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_user_by_id` +/// struct for typed errors of method [`get_user_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetUserByIdError { @@ -56,7 +56,7 @@ pub enum GetUserByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_user_by_id` +/// struct for typed errors of method [`update_user_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateUserByIdError { @@ -68,16 +68,17 @@ pub enum UpdateUserByIdError { 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/user/{userID}/token", configuration.base_path, userID=crate::apis::urlencode(user_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); @@ -98,16 +99,17 @@ pub async fn add_api_token(configuration: &configuration::Configuration, user_id } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/user/{userID}/token/{tokenName}", configuration.base_path, userID=crate::apis::urlencode(user_id), tokenName=crate::apis::urlencode(token_name)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -128,16 +130,17 @@ pub async fn delete_api_token(configuration: &configuration::Configuration, user /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -157,16 +160,17 @@ pub async fn delete_user_by_id(configuration: &configuration::Configuration, use } pub async fn get_user_by_id(configuration: &configuration::Configuration, user_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -186,16 +190,17 @@ pub async fn get_user_by_id(configuration: &configuration::Configuration, user_i } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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); diff --git a/zerotier-central-api/src/apis/util_api.rs b/zerotier-central-api/src/apis/util_api.rs index f82719e..8a87e8a 100644 --- a/zerotier-central-api/src/apis/util_api.rs +++ b/zerotier-central-api/src/apis/util_api.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -15,14 +15,14 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `get_random_token` +/// 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` +/// struct for typed errors of method [`get_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetStatusError { @@ -32,16 +32,17 @@ pub enum GetStatusError { /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/randomToken", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; @@ -61,16 +62,17 @@ pub async fn get_random_token(configuration: &configuration::Configuration, ) -> } pub async fn get_status(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/status", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.bearer_access_token { + 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()); }; diff --git a/zerotier-central-api/src/models/api_token.rs b/zerotier-central-api/src/models/api_token.rs index d70a2f6..44afb3a 100644 --- a/zerotier-central-api/src/models/api_token.rs +++ b/zerotier-central-api/src/models/api_token.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ApiToken { /// user specified token name #[serde(rename = "tokenName", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/auth_methods.rs b/zerotier-central-api/src/models/auth_methods.rs index 42efc03..ebb0009 100644 --- a/zerotier-central-api/src/models/auth_methods.rs +++ b/zerotier-central-api/src/models/auth_methods.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[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")] diff --git a/zerotier-central-api/src/models/network_config_dns.rs b/zerotier-central-api/src/models/dns.rs similarity index 65% rename from zerotier-central-api/src/models/network_config_dns.rs rename to zerotier-central-api/src/models/dns.rs index 39544f8..d589774 100644 --- a/zerotier-central-api/src/models/network_config_dns.rs +++ b/zerotier-central-api/src/models/dns.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,8 +11,8 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkConfigDns { +#[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, @@ -21,9 +21,9 @@ pub struct NetworkConfigDns { pub servers: Option>, } -impl NetworkConfigDns { - pub fn new() -> NetworkConfigDns { - NetworkConfigDns { +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 index e062d41..3a66949 100644 --- a/zerotier-central-api/src/models/invite_status.rs +++ b/zerotier-central-api/src/models/invite_status.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -31,6 +31,12 @@ impl ToString for InviteStatus { } } +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 index 4565d5b..ea4c7b6 100644 --- a/zerotier-central-api/src/models/ip_range.rs +++ b/zerotier-central-api/src/models/ip_range.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IpRange { #[serde(rename = "ipRangeStart", skip_serializing_if = "Option::is_none")] pub ip_range_start: Option, diff --git a/zerotier-central-api/src/models/ipv4_assign_mode.rs b/zerotier-central-api/src/models/ipv4_assign_mode.rs index f066b58..d4f921a 100644 --- a/zerotier-central-api/src/models/ipv4_assign_mode.rs +++ b/zerotier-central-api/src/models/ipv4_assign_mode.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Ipv4AssignMode { #[serde(rename = "zt", skip_serializing_if = "Option::is_none")] pub zt: Option, diff --git a/zerotier-central-api/src/models/ipv6_assign_mode.rs b/zerotier-central-api/src/models/ipv6_assign_mode.rs index 77a0d19..e5e283a 100644 --- a/zerotier-central-api/src/models/ipv6_assign_mode.rs +++ b/zerotier-central-api/src/models/ipv6_assign_mode.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Ipv6AssignMode { #[serde(rename = "6plane", skip_serializing_if = "Option::is_none")] pub var_6plane: Option, diff --git a/zerotier-central-api/src/models/member.rs b/zerotier-central-api/src/models/member.rs index 9fc36c4..e16495b 100644 --- a/zerotier-central-api/src/models/member.rs +++ b/zerotier-central-api/src/models/member.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[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")] diff --git a/zerotier-central-api/src/models/member_config.rs b/zerotier-central-api/src/models/member_config.rs index 7f4a023..efaeaf5 100644 --- a/zerotier-central-api/src/models/member_config.rs +++ b/zerotier-central-api/src/models/member_config.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[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")] diff --git a/zerotier-central-api/src/models/mod.rs b/zerotier-central-api/src/models/mod.rs index 642b316..2c831c0 100644 --- a/zerotier-central-api/src/models/mod.rs +++ b/zerotier-central-api/src/models/mod.rs @@ -2,6 +2,8 @@ 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; @@ -18,8 +20,6 @@ pub mod network; pub use self::network::Network; pub mod network_config; pub use self::network_config::NetworkConfig; -pub mod network_config_dns; -pub use self::network_config_dns::NetworkConfigDns; pub mod organization; pub use self::organization::Organization; pub mod organization_invitation; diff --git a/zerotier-central-api/src/models/network.rs b/zerotier-central-api/src/models/network.rs index 9ac5ffa..77b8f6c 100644 --- a/zerotier-central-api/src/models/network.rs +++ b/zerotier-central-api/src/models/network.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Network { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/zerotier-central-api/src/models/network_config.rs b/zerotier-central-api/src/models/network_config.rs index c4e9b6e..5beef2d 100644 --- a/zerotier-central-api/src/models/network_config.rs +++ b/zerotier-central-api/src/models/network_config.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NetworkConfig { /// Network ID #[serde(rename = "id", skip_serializing_if = "Option::is_none")] @@ -23,7 +23,7 @@ pub struct NetworkConfig { #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")] pub capabilities: Option>, #[serde(rename = "dns", skip_serializing_if = "Option::is_none")] - pub dns: Option>, + pub dns: Option, /// Enable broadcast packets on the network #[serde(rename = "enableBroadcast", skip_serializing_if = "Option::is_none")] pub enable_broadcast: Option, diff --git a/zerotier-central-api/src/models/organization.rs b/zerotier-central-api/src/models/organization.rs index 5ad938c..3ec1db5 100644 --- a/zerotier-central-api/src/models/organization.rs +++ b/zerotier-central-api/src/models/organization.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Organization { /// Organization ID #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/organization_invitation.rs b/zerotier-central-api/src/models/organization_invitation.rs index 25ff817..ba7e045 100644 --- a/zerotier-central-api/src/models/organization_invitation.rs +++ b/zerotier-central-api/src/models/organization_invitation.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OrganizationInvitation { /// Organization ID #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/organization_member.rs b/zerotier-central-api/src/models/organization_member.rs index 3af0e3c..d0c2afb 100644 --- a/zerotier-central-api/src/models/organization_member.rs +++ b/zerotier-central-api/src/models/organization_member.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OrganizationMember { /// Organization ID #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/permissions.rs b/zerotier-central-api/src/models/permissions.rs index 275bc17..c19ffc5 100644 --- a/zerotier-central-api/src/models/permissions.rs +++ b/zerotier-central-api/src/models/permissions.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Permissions { /// Authorize permission #[serde(rename = "a", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/random_token.rs b/zerotier-central-api/src/models/random_token.rs index bdc805b..06a1770 100644 --- a/zerotier-central-api/src/models/random_token.rs +++ b/zerotier-central-api/src/models/random_token.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RandomToken { /// Current time on server #[serde(rename = "clock", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-central-api/src/models/route.rs b/zerotier-central-api/src/models/route.rs index a8867d6..0d9450e 100644 --- a/zerotier-central-api/src/models/route.rs +++ b/zerotier-central-api/src/models/route.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Route { #[serde(rename = "target", skip_serializing_if = "Option::is_none")] pub target: Option, diff --git a/zerotier-central-api/src/models/status.rs b/zerotier-central-api/src/models/status.rs index 3431a56..468ba35 100644 --- a/zerotier-central-api/src/models/status.rs +++ b/zerotier-central-api/src/models/status.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Status { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/zerotier-central-api/src/models/status_login_methods.rs b/zerotier-central-api/src/models/status_login_methods.rs index 8105b79..426d018 100644 --- a/zerotier-central-api/src/models/status_login_methods.rs +++ b/zerotier-central-api/src/models/status_login_methods.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct StatusLoginMethods { #[serde(rename = "local", skip_serializing_if = "Option::is_none")] pub local: Option, diff --git a/zerotier-central-api/src/models/user.rs b/zerotier-central-api/src/models/user.rs index 76d713d..ccebed6 100644 --- a/zerotier-central-api/src/models/user.rs +++ b/zerotier-central-api/src/models/user.rs @@ -1,7 +1,7 @@ /* * 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

+ * 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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct User { /// User ID #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-one-api/.openapi-generator/VERSION b/zerotier-one-api/.openapi-generator/VERSION index 4b448de..5f68295 100644 --- a/zerotier-one-api/.openapi-generator/VERSION +++ b/zerotier-one-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/zerotier-one-api/Cargo.toml b/zerotier-one-api/Cargo.toml index 15b7c23..a9e8b9a 100644 --- a/zerotier-one-api/Cargo.toml +++ b/zerotier-one-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zerotier-one-api" -version = "1.0.4" +version = "1.0.5" edition = "2018" description = "OpenAPI bindings to the ZeroTierOne JSON API" authors = ["Erik Hollensbe ", "Adam Ierymenko "] diff --git a/zerotier-one-api/README.md b/zerotier-one-api/README.md index cf20f5d..4a438f7 100644 --- a/zerotier-one-api/README.md +++ b/zerotier-one-api/README.md @@ -1,21 +1,22 @@ # 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

+

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: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen +- Package version: 0.1.0 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `zerotier-one-api` and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +zerotier-one-api = { path = "./zerotier-one-api" } ``` ## Documentation for API Endpoints diff --git a/zerotier-one-api/git_push.sh b/zerotier-one-api/git_push.sh index 9405f72..f53a75d 100644 --- a/zerotier-one-api/git_push.sh +++ b/zerotier-one-api/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/zerotier-one-api/src/apis/configuration.rs b/zerotier-one-api/src/apis/configuration.rs index e2d5fb0..11cc78f 100644 --- a/zerotier-one-api/src/apis/configuration.rs +++ b/zerotier-one-api/src/apis/configuration.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * diff --git a/zerotier-one-api/src/apis/controller_api.rs b/zerotier-one-api/src/apis/controller_api.rs index 14c783e..1b1028d 100644 --- a/zerotier-one-api/src/apis/controller_api.rs +++ b/zerotier-one-api/src/apis/controller_api.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `generate_controller_network` +/// struct for typed errors of method [`generate_controller_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GenerateControllerNetworkError { @@ -23,7 +23,7 @@ pub enum GenerateControllerNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_controller_network` +/// struct for typed errors of method [`get_controller_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetControllerNetworkError { @@ -31,7 +31,7 @@ pub enum GetControllerNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_controller_network_member` +/// struct for typed errors of method [`get_controller_network_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetControllerNetworkMemberError { @@ -39,7 +39,7 @@ pub enum GetControllerNetworkMemberError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_controller_network_members` +/// struct for typed errors of method [`get_controller_network_members`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetControllerNetworkMembersError { @@ -47,7 +47,7 @@ pub enum GetControllerNetworkMembersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_controller_networks` +/// struct for typed errors of method [`get_controller_networks`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetControllerNetworksError { @@ -55,7 +55,7 @@ pub enum GetControllerNetworksError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_controller_status` +/// struct for typed errors of method [`get_controller_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetControllerStatusError { @@ -63,7 +63,7 @@ pub enum GetControllerStatusError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_controller_network` +/// struct for typed errors of method [`set_controller_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetControllerNetworkError { @@ -74,16 +74,17 @@ pub enum SetControllerNetworkError { /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network/{controllerID}______", configuration.base_path, controllerID=crate::apis::urlencode(controller_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -110,16 +111,17 @@ pub async fn generate_controller_network(configuration: &configuration::Configur /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -144,16 +146,17 @@ pub async fn get_controller_network(configuration: &configuration::Configuration } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network/{networkID}/member{nodeID}", configuration.base_path, networkID=crate::apis::urlencode(network_id), nodeID=crate::apis::urlencode(node_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -179,16 +182,17 @@ pub async fn get_controller_network_member(configuration: &configuration::Config /// 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network/{networkID}/member", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -214,16 +218,17 @@ pub async fn get_controller_network_members(configuration: &configuration::Confi /// List IDs of all networks hosted by this controller. pub async fn get_controller_networks(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network", configuration.base_path); + let local_var_uri_str = format!("{}/controller/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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -249,16 +254,17 @@ pub async fn get_controller_networks(configuration: &configuration::Configuratio /// Check for controller function and return controller status. pub async fn get_controller_status(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller", configuration.base_path); + let local_var_uri_str = format!("{}/controller", 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -283,16 +289,17 @@ pub async fn get_controller_status(configuration: &configuration::Configuration, } pub async fn set_controller_network(configuration: &configuration::Configuration, network_id: &str, controller_network: crate::models::ControllerNetwork) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/controller/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + 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) = configuration.api_key { + 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), diff --git a/zerotier-one-api/src/apis/network_api.rs b/zerotier-one-api/src/apis/network_api.rs index 76d9f67..1fa3251 100644 --- a/zerotier-one-api/src/apis/network_api.rs +++ b/zerotier-one-api/src/apis/network_api.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `delete_network` +/// struct for typed errors of method [`delete_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteNetworkError { @@ -23,7 +23,7 @@ pub enum DeleteNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_network` +/// struct for typed errors of method [`get_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworkError { @@ -31,7 +31,7 @@ pub enum GetNetworkError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_networks` +/// struct for typed errors of method [`get_networks`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetNetworksError { @@ -39,7 +39,7 @@ pub enum GetNetworksError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_network` +/// struct for typed errors of method [`update_network`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateNetworkError { @@ -49,16 +49,17 @@ pub enum UpdateNetworkError { pub async fn delete_network(configuration: &configuration::Configuration, network_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -83,16 +84,17 @@ pub async fn delete_network(configuration: &configuration::Configuration, networ } pub async fn get_network(configuration: &configuration::Configuration, network_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -117,16 +119,17 @@ pub async fn get_network(configuration: &configuration::Configuration, network_i } pub async fn get_networks(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -151,16 +154,17 @@ pub async fn get_networks(configuration: &configuration::Configuration, ) -> Res } 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 = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), diff --git a/zerotier-one-api/src/apis/peer_api.rs b/zerotier-one-api/src/apis/peer_api.rs index aaaf995..76762bf 100644 --- a/zerotier-one-api/src/apis/peer_api.rs +++ b/zerotier-one-api/src/apis/peer_api.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `get_peer` +/// struct for typed errors of method [`get_peer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetPeerError { @@ -23,7 +23,7 @@ pub enum GetPeerError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_peers` +/// struct for typed errors of method [`get_peers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetPeersError { @@ -33,16 +33,17 @@ pub enum GetPeersError { pub async fn get_peer(configuration: &configuration::Configuration, address: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/peer/{address}", configuration.base_path, address=crate::apis::urlencode(address)); + let local_var_uri_str = format!("{}/peer/{address}", local_var_configuration.base_path, address=crate::apis::urlencode(address)); 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), @@ -67,16 +68,17 @@ pub async fn get_peer(configuration: &configuration::Configuration, address: &st } pub async fn get_peers(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/peer", configuration.base_path); + let local_var_uri_str = format!("{}/peer", 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), diff --git a/zerotier-one-api/src/apis/status_api.rs b/zerotier-one-api/src/apis/status_api.rs index 4f8e21c..d8533ca 100644 --- a/zerotier-one-api/src/apis/status_api.rs +++ b/zerotier-one-api/src/apis/status_api.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `get_status` +/// struct for typed errors of method [`get_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetStatusError { @@ -25,16 +25,17 @@ pub enum GetStatusError { pub async fn get_status(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/status", configuration.base_path); + 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) = configuration.user_agent { + 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) = configuration.api_key { + 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), diff --git a/zerotier-one-api/src/models/controller_network.rs b/zerotier-one-api/src/models/controller_network.rs index c910d93..e41ef5e 100644 --- a/zerotier-one-api/src/models/controller_network.rs +++ b/zerotier-one-api/src/models/controller_network.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetwork { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/zerotier-one-api/src/models/controller_network_ip_assignment_pools.rs b/zerotier-one-api/src/models/controller_network_ip_assignment_pools.rs index 229b733..f2536cf 100644 --- a/zerotier-one-api/src/models/controller_network_ip_assignment_pools.rs +++ b/zerotier-one-api/src/models/controller_network_ip_assignment_pools.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetworkIpAssignmentPools { #[serde(rename = "ipRangeStart", skip_serializing_if = "Option::is_none")] pub ip_range_start: Option, diff --git a/zerotier-one-api/src/models/controller_network_member.rs b/zerotier-one-api/src/models/controller_network_member.rs index 6bdd32b..4808a1e 100644 --- a/zerotier-one-api/src/models/controller_network_member.rs +++ b/zerotier-one-api/src/models/controller_network_member.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetworkMember { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/zerotier-one-api/src/models/controller_network_routes.rs b/zerotier-one-api/src/models/controller_network_routes.rs index afb768a..89c087b 100644 --- a/zerotier-one-api/src/models/controller_network_routes.rs +++ b/zerotier-one-api/src/models/controller_network_routes.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetworkRoutes { #[serde(rename = "target", skip_serializing_if = "Option::is_none")] pub target: Option, diff --git a/zerotier-one-api/src/models/controller_network_v4_assign_mode.rs b/zerotier-one-api/src/models/controller_network_v4_assign_mode.rs index e8baa03..924e80f 100644 --- a/zerotier-one-api/src/models/controller_network_v4_assign_mode.rs +++ b/zerotier-one-api/src/models/controller_network_v4_assign_mode.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetworkV4AssignMode { #[serde(rename = "zt", skip_serializing_if = "Option::is_none")] pub zt: Option, diff --git a/zerotier-one-api/src/models/controller_network_v6_assign_mode.rs b/zerotier-one-api/src/models/controller_network_v6_assign_mode.rs index d548682..8d94abd 100644 --- a/zerotier-one-api/src/models/controller_network_v6_assign_mode.rs +++ b/zerotier-one-api/src/models/controller_network_v6_assign_mode.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerNetworkV6AssignMode { #[serde(rename = "6plane", skip_serializing_if = "Option::is_none")] pub var_6plane: Option, diff --git a/zerotier-one-api/src/models/controller_status.rs b/zerotier-one-api/src/models/controller_status.rs index b061269..f03ebf3 100644 --- a/zerotier-one-api/src/models/controller_status.rs +++ b/zerotier-one-api/src/models/controller_status.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ControllerStatus { #[serde(rename = "controller", skip_serializing_if = "Option::is_none")] pub controller: Option, diff --git a/zerotier-one-api/src/models/network.rs b/zerotier-one-api/src/models/network.rs index b22db4b..47c7a5e 100644 --- a/zerotier-one-api/src/models/network.rs +++ b/zerotier-one-api/src/models/network.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Network { /// Let ZeroTier modify the system's DNS settings. #[serde(rename = "allowDNS", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-one-api/src/models/network_all_of.rs b/zerotier-one-api/src/models/network_all_of.rs index 081ff15..a5d9ad7 100644 --- a/zerotier-one-api/src/models/network_all_of.rs +++ b/zerotier-one-api/src/models/network_all_of.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NetworkAllOf { /// Let ZeroTier modify the system's DNS settings. #[serde(rename = "allowDNS", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-one-api/src/models/network_all_of_1.rs b/zerotier-one-api/src/models/network_all_of_1.rs index 8da8cec..4ab1d9e 100644 --- a/zerotier-one-api/src/models/network_all_of_1.rs +++ b/zerotier-one-api/src/models/network_all_of_1.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NetworkAllOf1 { /// Let ZeroTier modify the system's DNS settings. #[serde(rename = "allowDNS", skip_serializing_if = "Option::is_none")] diff --git a/zerotier-one-api/src/models/network_all_of_1_dns.rs b/zerotier-one-api/src/models/network_all_of_1_dns.rs index 9010c93..9ee0676 100644 --- a/zerotier-one-api/src/models/network_all_of_1_dns.rs +++ b/zerotier-one-api/src/models/network_all_of_1_dns.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NetworkAllOf1Dns { #[serde(rename = "domain", skip_serializing_if = "Option::is_none")] pub domain: Option, diff --git a/zerotier-one-api/src/models/network_all_of_1_multicast_subscriptions.rs b/zerotier-one-api/src/models/network_all_of_1_multicast_subscriptions.rs index 1b61b51..860602f 100644 --- a/zerotier-one-api/src/models/network_all_of_1_multicast_subscriptions.rs +++ b/zerotier-one-api/src/models/network_all_of_1_multicast_subscriptions.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NetworkAllOf1MulticastSubscriptions { #[serde(rename = "adi", skip_serializing_if = "Option::is_none")] pub adi: Option, diff --git a/zerotier-one-api/src/models/peer.rs b/zerotier-one-api/src/models/peer.rs index 9c6ae75..0d7a15c 100644 --- a/zerotier-one-api/src/models/peer.rs +++ b/zerotier-one-api/src/models/peer.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Peer { #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, diff --git a/zerotier-one-api/src/models/peer_paths.rs b/zerotier-one-api/src/models/peer_paths.rs index 1d71b3c..81d20f4 100644 --- a/zerotier-one-api/src/models/peer_paths.rs +++ b/zerotier-one-api/src/models/peer_paths.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PeerPaths { #[serde(rename = "active", skip_serializing_if = "Option::is_none")] pub active: Option, diff --git a/zerotier-one-api/src/models/status.rs b/zerotier-one-api/src/models/status.rs index 87b1e81..fc87364 100644 --- a/zerotier-one-api/src/models/status.rs +++ b/zerotier-one-api/src/models/status.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Status { #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, diff --git a/zerotier-one-api/src/models/status_config.rs b/zerotier-one-api/src/models/status_config.rs index 0c57828..fc252b0 100644 --- a/zerotier-one-api/src/models/status_config.rs +++ b/zerotier-one-api/src/models/status_config.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct StatusConfig { #[serde(rename = "settings", skip_serializing_if = "Option::is_none")] pub settings: Option>, diff --git a/zerotier-one-api/src/models/status_config_settings.rs b/zerotier-one-api/src/models/status_config_settings.rs index ac83fd3..6222913 100644 --- a/zerotier-one-api/src/models/status_config_settings.rs +++ b/zerotier-one-api/src/models/status_config_settings.rs @@ -1,7 +1,7 @@ /* * 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

+ *

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 * @@ -11,7 +11,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct StatusConfigSettings { #[serde(rename = "allowTcpFallbackRelay", skip_serializing_if = "Option::is_none")] pub allow_tcp_fallback_relay: Option,