From ddd61e168d0e585ab56145e3708f53a2ed599b9d Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Wed, 28 Jul 2021 20:35:21 -0700 Subject: [PATCH] zerotier-central-api 1.0.1 Signed-off-by: Erik Hollensbe --- zerotier-central-api/.openapi-generator/FILES | 4 ++ .../.openapi-generator/VERSION | 2 +- zerotier-central-api/Cargo.toml | 6 +-- zerotier-central-api/README.md | 53 +++++++++--------- zerotier-central-api/docs/NetworkApi.md | 12 ++--- zerotier-central-api/docs/NetworkMemberApi.md | 10 ++-- zerotier-central-api/docs/OrganizationsApi.md | 18 +++---- zerotier-central-api/docs/Status.md | 19 +++++++ .../docs/StatusLoginMethods.md | 17 ++++++ zerotier-central-api/docs/UserApi.md | 12 ++--- zerotier-central-api/docs/UtilApi.md | 30 ++++++++++- .../src/apis/configuration.rs | 4 +- zerotier-central-api/src/apis/network_api.rs | 12 ++--- .../src/apis/network_member_api.rs | 10 ++-- .../src/apis/organizations_api.rs | 18 +++---- zerotier-central-api/src/apis/user_api.rs | 12 ++--- zerotier-central-api/src/apis/util_api.rs | 40 +++++++++++++- zerotier-central-api/src/models/api_token.rs | 2 +- .../src/models/auth_methods.rs | 2 +- .../src/models/invite_status.rs | 2 +- zerotier-central-api/src/models/ip_range.rs | 2 +- .../src/models/ipv4_assign_mode.rs | 2 +- .../src/models/ipv6_assign_mode.rs | 2 +- zerotier-central-api/src/models/member.rs | 2 +- .../src/models/member_config.rs | 2 +- zerotier-central-api/src/models/mod.rs | 4 ++ zerotier-central-api/src/models/network.rs | 2 +- .../src/models/network_config.rs | 2 +- .../src/models/network_config_dns.rs | 2 +- .../src/models/organization.rs | 2 +- .../src/models/organization_invitation.rs | 2 +- .../src/models/organization_member.rs | 2 +- .../src/models/permissions.rs | 2 +- .../src/models/random_token.rs | 2 +- zerotier-central-api/src/models/route.rs | 2 +- zerotier-central-api/src/models/status.rs | 54 +++++++++++++++++++ .../src/models/status_login_methods.rs | 46 ++++++++++++++++ zerotier-central-api/src/models/user.rs | 2 +- 38 files changed, 314 insertions(+), 105 deletions(-) create mode 100644 zerotier-central-api/docs/Status.md create mode 100644 zerotier-central-api/docs/StatusLoginMethods.md create mode 100644 zerotier-central-api/src/models/status.rs create mode 100644 zerotier-central-api/src/models/status_login_methods.rs diff --git a/zerotier-central-api/.openapi-generator/FILES b/zerotier-central-api/.openapi-generator/FILES index d74c94a..f61261f 100644 --- a/zerotier-central-api/.openapi-generator/FILES +++ b/zerotier-central-api/.openapi-generator/FILES @@ -23,6 +23,8 @@ docs/OrganizationsApi.md docs/Permissions.md docs/RandomToken.md docs/Route.md +docs/Status.md +docs/StatusLoginMethods.md docs/User.md docs/UserApi.md docs/UtilApi.md @@ -53,4 +55,6 @@ src/models/organization_member.rs src/models/permissions.rs src/models/random_token.rs src/models/route.rs +src/models/status.rs +src/models/status_login_methods.rs src/models/user.rs diff --git a/zerotier-central-api/.openapi-generator/VERSION b/zerotier-central-api/.openapi-generator/VERSION index 6555596..862529f 100644 --- a/zerotier-central-api/.openapi-generator/VERSION +++ b/zerotier-central-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +5.2.1-SNAPSHOT \ No newline at end of file diff --git a/zerotier-central-api/Cargo.toml b/zerotier-central-api/Cargo.toml index 73d80cc..745b7b9 100644 --- a/zerotier-central-api/Cargo.toml +++ b/zerotier-central-api/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "zerotier-central-api" -version = "1.0.0" +version = "1.0.1" edition = "2018" -description = "OpenAPI bindings to zerotier-one service" -authors = ["Erik Hollensbe ", "Adam Ierymenko "] +description = "OpenAPI bindings to the ZeroTier Central (https://my.zerotier.com) service" +authors = ["Erik Hollensbe ", "Adam Ierymenko "] license = "BSD-3-Clause" [dependencies] diff --git a/zerotier-central-api/README.md b/zerotier-central-api/README.md index 4e806e3..5f0799b 100644 --- a/zerotier-central-api/README.md +++ b/zerotier-central-api/README.md @@ -1,6 +1,6 @@ # 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/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

## Overview @@ -21,33 +21,34 @@ Put the package under your project folder and add the following to `Cargo.toml` ## Documentation for API Endpoints -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*NetworkApi* | [**delete_network**](docs/NetworkApi.md#delete_network) | **delete** /network/{networkID} | delete network -*NetworkApi* | [**get_network_by_id**](docs/NetworkApi.md#get_network_by_id) | **get** /network/{networkID} | Get network by ID -*NetworkApi* | [**get_network_list**](docs/NetworkApi.md#get_network_list) | **get** /network | Returns a list of Networks you have access to. -*NetworkApi* | [**new_network**](docs/NetworkApi.md#new_network) | **post** /network | Create a new network. -*NetworkApi* | [**update_network**](docs/NetworkApi.md#update_network) | **post** /network/{networkID} | update network configuration -*NetworkMemberApi* | [**delete_network_member**](docs/NetworkMemberApi.md#delete_network_member) | **delete** /network/{networkID}/member/{memberID} | Delete a network member -*NetworkMemberApi* | [**get_network_member**](docs/NetworkMemberApi.md#get_network_member) | **get** /network/{networkID}/member/{memberID} | Return an individual member on a network -*NetworkMemberApi* | [**get_network_member_list**](docs/NetworkMemberApi.md#get_network_member_list) | **get** /network/{networkID}/member | Returns a list of Members on the network. -*NetworkMemberApi* | [**update_network_member**](docs/NetworkMemberApi.md#update_network_member) | **post** /network/{networkID}/member/{memberID} | Modify a network member -*OrganizationsApi* | [**accept_invitation**](docs/OrganizationsApi.md#accept_invitation) | **post** /org-invitation/{inviteID} | Accept organization invitation -*OrganizationsApi* | [**decline_invitation**](docs/OrganizationsApi.md#decline_invitation) | **delete** /org-invitation/{inviteID} | Decline organization invitation -*OrganizationsApi* | [**get_invitation_by_id**](docs/OrganizationsApi.md#get_invitation_by_id) | **get** /org-invitation/{inviteID} | Get organization invitation -*OrganizationsApi* | [**get_organization**](docs/OrganizationsApi.md#get_organization) | **get** /org | Get the current user's organization -*OrganizationsApi* | [**get_organization_by_id**](docs/OrganizationsApi.md#get_organization_by_id) | **get** /org/{orgID} | Get organization by ID -*OrganizationsApi* | [**get_organization_invitation_list**](docs/OrganizationsApi.md#get_organization_invitation_list) | **get** /org-invitation | Get list of organization invitations -*OrganizationsApi* | [**get_organization_members**](docs/OrganizationsApi.md#get_organization_members) | **get** /org/{orgID}/user | Get list of organization members -*OrganizationsApi* | [**invite_user_by_email**](docs/OrganizationsApi.md#invite_user_by_email) | **post** /org-invitation | Invite a user to your organization by email -*UserApi* | [**add_api_token**](docs/UserApi.md#add_api_token) | **post** /user/{userID}/token | Add an API token -*UserApi* | [**delete_api_token**](docs/UserApi.md#delete_api_token) | **delete** /user/{userID}/token/{tokenName} | Delete API Token -*UserApi* | [**delete_user_by_id**](docs/UserApi.md#delete_user_by_id) | **delete** /user/{userID} | Delete user -*UserApi* | [**get_user_by_id**](docs/UserApi.md#get_user_by_id) | **get** /user/{userID} | Get user record -*UserApi* | [**update_user_by_id**](docs/UserApi.md#update_user_by_id) | **post** /user/{userID} | Update user record (SMS number or Display Name only) -*UtilApi* | [**get_random_token**](docs/UtilApi.md#get_random_token) | **get** /randomToken | Get a random 32 character token +*NetworkApi* | [**delete_network**](docs/NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | delete network +*NetworkApi* | [**get_network_by_id**](docs/NetworkApi.md#get_network_by_id) | **GET** /network/{networkID} | Get network by ID +*NetworkApi* | [**get_network_list**](docs/NetworkApi.md#get_network_list) | **GET** /network | Returns a list of Networks you have access to. +*NetworkApi* | [**new_network**](docs/NetworkApi.md#new_network) | **POST** /network | Create a new network. +*NetworkApi* | [**update_network**](docs/NetworkApi.md#update_network) | **POST** /network/{networkID} | update network configuration +*NetworkMemberApi* | [**delete_network_member**](docs/NetworkMemberApi.md#delete_network_member) | **DELETE** /network/{networkID}/member/{memberID} | Delete a network member +*NetworkMemberApi* | [**get_network_member**](docs/NetworkMemberApi.md#get_network_member) | **GET** /network/{networkID}/member/{memberID} | Return an individual member on a network +*NetworkMemberApi* | [**get_network_member_list**](docs/NetworkMemberApi.md#get_network_member_list) | **GET** /network/{networkID}/member | Returns a list of Members on the network. +*NetworkMemberApi* | [**update_network_member**](docs/NetworkMemberApi.md#update_network_member) | **POST** /network/{networkID}/member/{memberID} | Modify a network member +*OrganizationsApi* | [**accept_invitation**](docs/OrganizationsApi.md#accept_invitation) | **POST** /org-invitation/{inviteID} | Accept organization invitation +*OrganizationsApi* | [**decline_invitation**](docs/OrganizationsApi.md#decline_invitation) | **DELETE** /org-invitation/{inviteID} | Decline organization invitation +*OrganizationsApi* | [**get_invitation_by_id**](docs/OrganizationsApi.md#get_invitation_by_id) | **GET** /org-invitation/{inviteID} | Get organization invitation +*OrganizationsApi* | [**get_organization**](docs/OrganizationsApi.md#get_organization) | **GET** /org | Get the current user's organization +*OrganizationsApi* | [**get_organization_by_id**](docs/OrganizationsApi.md#get_organization_by_id) | **GET** /org/{orgID} | Get organization by ID +*OrganizationsApi* | [**get_organization_invitation_list**](docs/OrganizationsApi.md#get_organization_invitation_list) | **GET** /org-invitation | Get list of organization invitations +*OrganizationsApi* | [**get_organization_members**](docs/OrganizationsApi.md#get_organization_members) | **GET** /org/{orgID}/user | Get list of organization members +*OrganizationsApi* | [**invite_user_by_email**](docs/OrganizationsApi.md#invite_user_by_email) | **POST** /org-invitation | Invite a user to your organization by email +*UserApi* | [**add_api_token**](docs/UserApi.md#add_api_token) | **POST** /user/{userID}/token | Add an API token +*UserApi* | [**delete_api_token**](docs/UserApi.md#delete_api_token) | **DELETE** /user/{userID}/token/{tokenName} | Delete API Token +*UserApi* | [**delete_user_by_id**](docs/UserApi.md#delete_user_by_id) | **DELETE** /user/{userID} | Delete user +*UserApi* | [**get_user_by_id**](docs/UserApi.md#get_user_by_id) | **GET** /user/{userID} | Get user record +*UserApi* | [**update_user_by_id**](docs/UserApi.md#update_user_by_id) | **POST** /user/{userID} | Update user record (SMS number or Display Name only) +*UtilApi* | [**get_random_token**](docs/UtilApi.md#get_random_token) | **GET** /randomToken | Get a random 32 character token +*UtilApi* | [**get_status**](docs/UtilApi.md#get_status) | **GET** /status | Obtain the overall status of the account tied to the API token in use. ## Documentation For Models @@ -69,6 +70,8 @@ Class | Method | HTTP request | Description - [Permissions](docs/Permissions.md) - [RandomToken](docs/RandomToken.md) - [Route](docs/Route.md) + - [Status](docs/Status.md) + - [StatusLoginMethods](docs/StatusLoginMethods.md) - [User](docs/User.md) diff --git a/zerotier-central-api/docs/NetworkApi.md b/zerotier-central-api/docs/NetworkApi.md index 9e17ed5..c2da1d3 100644 --- a/zerotier-central-api/docs/NetworkApi.md +++ b/zerotier-central-api/docs/NetworkApi.md @@ -1,14 +1,14 @@ # \NetworkApi -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_network**](NetworkApi.md#delete_network) | **delete** /network/{networkID} | delete network -[**get_network_by_id**](NetworkApi.md#get_network_by_id) | **get** /network/{networkID} | Get network by ID -[**get_network_list**](NetworkApi.md#get_network_list) | **get** /network | Returns a list of Networks you have access to. -[**new_network**](NetworkApi.md#new_network) | **post** /network | Create a new network. -[**update_network**](NetworkApi.md#update_network) | **post** /network/{networkID} | update network configuration +[**delete_network**](NetworkApi.md#delete_network) | **DELETE** /network/{networkID} | delete network +[**get_network_by_id**](NetworkApi.md#get_network_by_id) | **GET** /network/{networkID} | Get network by ID +[**get_network_list**](NetworkApi.md#get_network_list) | **GET** /network | Returns a list of Networks you have access to. +[**new_network**](NetworkApi.md#new_network) | **POST** /network | Create a new network. +[**update_network**](NetworkApi.md#update_network) | **POST** /network/{networkID} | update network configuration diff --git a/zerotier-central-api/docs/NetworkMemberApi.md b/zerotier-central-api/docs/NetworkMemberApi.md index 64b5f2d..f00bd9f 100644 --- a/zerotier-central-api/docs/NetworkMemberApi.md +++ b/zerotier-central-api/docs/NetworkMemberApi.md @@ -1,13 +1,13 @@ # \NetworkMemberApi -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_network_member**](NetworkMemberApi.md#delete_network_member) | **delete** /network/{networkID}/member/{memberID} | Delete a network member -[**get_network_member**](NetworkMemberApi.md#get_network_member) | **get** /network/{networkID}/member/{memberID} | Return an individual member on a network -[**get_network_member_list**](NetworkMemberApi.md#get_network_member_list) | **get** /network/{networkID}/member | Returns a list of Members on the network. -[**update_network_member**](NetworkMemberApi.md#update_network_member) | **post** /network/{networkID}/member/{memberID} | Modify a network member +[**delete_network_member**](NetworkMemberApi.md#delete_network_member) | **DELETE** /network/{networkID}/member/{memberID} | Delete a network member +[**get_network_member**](NetworkMemberApi.md#get_network_member) | **GET** /network/{networkID}/member/{memberID} | Return an individual member on a network +[**get_network_member_list**](NetworkMemberApi.md#get_network_member_list) | **GET** /network/{networkID}/member | Returns a list of Members on the network. +[**update_network_member**](NetworkMemberApi.md#update_network_member) | **POST** /network/{networkID}/member/{memberID} | Modify a network member diff --git a/zerotier-central-api/docs/OrganizationsApi.md b/zerotier-central-api/docs/OrganizationsApi.md index e3cc2ae..2cef97a 100644 --- a/zerotier-central-api/docs/OrganizationsApi.md +++ b/zerotier-central-api/docs/OrganizationsApi.md @@ -1,17 +1,17 @@ # \OrganizationsApi -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**accept_invitation**](OrganizationsApi.md#accept_invitation) | **post** /org-invitation/{inviteID} | Accept organization invitation -[**decline_invitation**](OrganizationsApi.md#decline_invitation) | **delete** /org-invitation/{inviteID} | Decline organization invitation -[**get_invitation_by_id**](OrganizationsApi.md#get_invitation_by_id) | **get** /org-invitation/{inviteID} | Get organization invitation -[**get_organization**](OrganizationsApi.md#get_organization) | **get** /org | Get the current user's organization -[**get_organization_by_id**](OrganizationsApi.md#get_organization_by_id) | **get** /org/{orgID} | Get organization by ID -[**get_organization_invitation_list**](OrganizationsApi.md#get_organization_invitation_list) | **get** /org-invitation | Get list of organization invitations -[**get_organization_members**](OrganizationsApi.md#get_organization_members) | **get** /org/{orgID}/user | Get list of organization members -[**invite_user_by_email**](OrganizationsApi.md#invite_user_by_email) | **post** /org-invitation | Invite a user to your organization by email +[**accept_invitation**](OrganizationsApi.md#accept_invitation) | **POST** /org-invitation/{inviteID} | Accept organization invitation +[**decline_invitation**](OrganizationsApi.md#decline_invitation) | **DELETE** /org-invitation/{inviteID} | Decline organization invitation +[**get_invitation_by_id**](OrganizationsApi.md#get_invitation_by_id) | **GET** /org-invitation/{inviteID} | Get organization invitation +[**get_organization**](OrganizationsApi.md#get_organization) | **GET** /org | Get the current user's organization +[**get_organization_by_id**](OrganizationsApi.md#get_organization_by_id) | **GET** /org/{orgID} | Get organization by ID +[**get_organization_invitation_list**](OrganizationsApi.md#get_organization_invitation_list) | **GET** /org-invitation | Get list of organization invitations +[**get_organization_members**](OrganizationsApi.md#get_organization_members) | **GET** /org/{orgID}/user | Get list of organization members +[**invite_user_by_email**](OrganizationsApi.md#invite_user_by_email) | **POST** /org-invitation | Invite a user to your organization by email diff --git a/zerotier-central-api/docs/Status.md b/zerotier-central-api/docs/Status.md new file mode 100644 index 0000000..7901cd7 --- /dev/null +++ b/zerotier-central-api/docs/Status.md @@ -0,0 +1,19 @@ +# Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**_type** | Option<**String**> | | [optional] +**clock** | Option<**i64**> | Current time on server | [optional][readonly] +**version** | Option<**String**> | | [optional] +**api_version** | Option<**String**> | | [optional] +**uptime** | Option<**i64**> | Uptime on server | [optional][readonly] +**user** | Option<[**crate::models::User**](User.md)> | | [optional] +**read_only_mode** | Option<**bool**> | | [optional] +**login_methods** | Option<[**crate::models::StatusLoginMethods**](Status_loginMethods.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/zerotier-central-api/docs/StatusLoginMethods.md b/zerotier-central-api/docs/StatusLoginMethods.md new file mode 100644 index 0000000..dad5ce7 --- /dev/null +++ b/zerotier-central-api/docs/StatusLoginMethods.md @@ -0,0 +1,17 @@ +# StatusLoginMethods + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local** | Option<**bool**> | | [optional] +**google** | Option<**bool**> | | [optional] +**twitter** | Option<**bool**> | | [optional] +**facebook** | Option<**bool**> | | [optional] +**github** | Option<**bool**> | | [optional] +**saml** | Option<**bool**> | | [optional] +**oidc** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/zerotier-central-api/docs/UserApi.md b/zerotier-central-api/docs/UserApi.md index 8016ba7..2ffde0e 100644 --- a/zerotier-central-api/docs/UserApi.md +++ b/zerotier-central-api/docs/UserApi.md @@ -1,14 +1,14 @@ # \UserApi -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**add_api_token**](UserApi.md#add_api_token) | **post** /user/{userID}/token | Add an API token -[**delete_api_token**](UserApi.md#delete_api_token) | **delete** /user/{userID}/token/{tokenName} | Delete API Token -[**delete_user_by_id**](UserApi.md#delete_user_by_id) | **delete** /user/{userID} | Delete user -[**get_user_by_id**](UserApi.md#get_user_by_id) | **get** /user/{userID} | Get user record -[**update_user_by_id**](UserApi.md#update_user_by_id) | **post** /user/{userID} | Update user record (SMS number or Display Name only) +[**add_api_token**](UserApi.md#add_api_token) | **POST** /user/{userID}/token | Add an API token +[**delete_api_token**](UserApi.md#delete_api_token) | **DELETE** /user/{userID}/token/{tokenName} | Delete API Token +[**delete_user_by_id**](UserApi.md#delete_user_by_id) | **DELETE** /user/{userID} | Delete user +[**get_user_by_id**](UserApi.md#get_user_by_id) | **GET** /user/{userID} | Get user record +[**update_user_by_id**](UserApi.md#update_user_by_id) | **POST** /user/{userID} | Update user record (SMS number or Display Name only) diff --git a/zerotier-central-api/docs/UtilApi.md b/zerotier-central-api/docs/UtilApi.md index ae2b3f6..8108c7f 100644 --- a/zerotier-central-api/docs/UtilApi.md +++ b/zerotier-central-api/docs/UtilApi.md @@ -1,10 +1,11 @@ # \UtilApi -All URIs are relative to *https://my.zerotier.com/api* +All URIs are relative to *https://my.zerotier.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_random_token**](UtilApi.md#get_random_token) | **get** /randomToken | Get a random 32 character token +[**get_random_token**](UtilApi.md#get_random_token) | **GET** /randomToken | Get a random 32 character token +[**get_status**](UtilApi.md#get_status) | **GET** /status | Obtain the overall status of the account tied to the API token in use. @@ -34,3 +35,28 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## get_status + +> crate::models::Status get_status() +Obtain the overall status of the account tied to the API token in use. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::Status**](Status.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/zerotier-central-api/src/apis/configuration.rs b/zerotier-central-api/src/apis/configuration.rs index 5965c63..8c3eab6 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/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

* * The version of the OpenAPI document: v1 * @@ -40,7 +40,7 @@ impl Configuration { impl Default for Configuration { fn default() -> Self { Configuration { - base_path: "https://my.zerotier.com/api".to_owned(), + base_path: "https://my.zerotier.com/api/v1".to_owned(), user_agent: Some("OpenAPI-Generator/v1/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, diff --git a/zerotier-central-api/src/apis/network_api.rs b/zerotier-central-api/src/apis/network_api.rs index 9b7ee68..b48e8ee 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/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

* * The version of the OpenAPI document: v1 * @@ -67,7 +67,7 @@ pub async fn delete_network(configuration: &configuration::Configuration, networ let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); - let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -97,7 +97,7 @@ pub async fn get_network_by_id(configuration: &configuration::Configuration, net let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -126,7 +126,7 @@ pub async fn get_network_list(configuration: &configuration::Configuration, ) -> let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network", configuration.base_path); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -155,7 +155,7 @@ pub async fn new_network(configuration: &configuration::Configuration, body: ser let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network", configuration.base_path); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -185,7 +185,7 @@ pub async fn update_network(configuration: &configuration::Configuration, networ let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network/{networkID}", configuration.base_path, networkID=crate::apis::urlencode(network_id)); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); diff --git a/zerotier-central-api/src/apis/network_member_api.rs b/zerotier-central-api/src/apis/network_member_api.rs index bbc1c4c..451e888 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/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

* * The version of the OpenAPI document: v1 * @@ -61,7 +61,7 @@ pub async fn delete_network_member(configuration: &configuration::Configuration, let local_var_client = &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 mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -90,7 +90,7 @@ pub async fn get_network_member(configuration: &configuration::Configuration, ne let local_var_client = &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 mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -119,7 +119,7 @@ pub async fn get_network_member_list(configuration: &configuration::Configuratio let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/network/{networkID}/member", configuration.base_path, networkID=crate::apis::urlencode(network_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -148,7 +148,7 @@ pub async fn update_network_member(configuration: &configuration::Configuration, let local_var_client = &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 mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); diff --git a/zerotier-central-api/src/apis/organizations_api.rs b/zerotier-central-api/src/apis/organizations_api.rs index 949d7a9..aafea93 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/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

* * The version of the OpenAPI document: v1 * @@ -101,7 +101,7 @@ pub async fn accept_invitation(configuration: &configuration::Configuration, inv let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -130,7 +130,7 @@ pub async fn decline_invitation(configuration: &configuration::Configuration, in let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); - let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -159,7 +159,7 @@ pub async fn get_invitation_by_id(configuration: &configuration::Configuration, let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org-invitation/{inviteID}", configuration.base_path, inviteID=crate::apis::urlencode(invite_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -188,7 +188,7 @@ pub async fn get_organization(configuration: &configuration::Configuration, ) -> let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org", configuration.base_path); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -217,7 +217,7 @@ pub async fn get_organization_by_id(configuration: &configuration::Configuration let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org/{orgID}", configuration.base_path, orgID=crate::apis::urlencode(org_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -246,7 +246,7 @@ pub async fn get_organization_invitation_list(configuration: &configuration::Con let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org-invitation", configuration.base_path); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -275,7 +275,7 @@ pub async fn get_organization_members(configuration: &configuration::Configurati let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org/{orgID}/user", configuration.base_path, orgID=crate::apis::urlencode(org_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -304,7 +304,7 @@ pub async fn invite_user_by_email(configuration: &configuration::Configuration, let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/org-invitation", configuration.base_path); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); diff --git a/zerotier-central-api/src/apis/user_api.rs b/zerotier-central-api/src/apis/user_api.rs index 9b8f046..3b3b93c 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/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

* * The version of the OpenAPI document: v1 * @@ -72,7 +72,7 @@ pub async fn add_api_token(configuration: &configuration::Configuration, user_id let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/user/{userID}/token", configuration.base_path, userID=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -102,7 +102,7 @@ pub async fn delete_api_token(configuration: &configuration::Configuration, user let local_var_client = &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 mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -132,7 +132,7 @@ pub async fn delete_user_by_id(configuration: &configuration::Configuration, use let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -161,7 +161,7 @@ pub async fn get_user_by_id(configuration: &configuration::Configuration, user_i let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -190,7 +190,7 @@ pub async fn update_user_by_id(configuration: &configuration::Configuration, use let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/user/{userID}", configuration.base_path, userID=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); diff --git a/zerotier-central-api/src/apis/util_api.rs b/zerotier-central-api/src/apis/util_api.rs index e7f7ae3..f82719e 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/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

* * The version of the OpenAPI document: v1 * @@ -22,6 +22,13 @@ pub enum GetRandomTokenError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method `get_status` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatusError { + UnknownValue(serde_json::Value), +} + /// Get a random 32 character. Used by the web UI to generate API keys pub async fn get_random_token(configuration: &configuration::Configuration, ) -> Result> { @@ -29,7 +36,7 @@ pub async fn get_random_token(configuration: &configuration::Configuration, ) -> let local_var_client = &configuration.client; let local_var_uri_str = format!("{}/randomToken", configuration.base_path); - let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str()); + 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 { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); @@ -53,3 +60,32 @@ pub async fn get_random_token(configuration: &configuration::Configuration, ) -> } } +pub async fn get_status(configuration: &configuration::Configuration, ) -> Result> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/status", 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 { + 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 { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/zerotier-central-api/src/models/api_token.rs b/zerotier-central-api/src/models/api_token.rs index 9df9962..d70a2f6 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/auth_methods.rs b/zerotier-central-api/src/models/auth_methods.rs index 0642f10..42efc03 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/invite_status.rs b/zerotier-central-api/src/models/invite_status.rs index 3e2fd55..e062d41 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/ip_range.rs b/zerotier-central-api/src/models/ip_range.rs index d32ee0e..4565d5b 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/ipv4_assign_mode.rs b/zerotier-central-api/src/models/ipv4_assign_mode.rs index 107f023..f066b58 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/ipv6_assign_mode.rs b/zerotier-central-api/src/models/ipv6_assign_mode.rs index d1085b1..77a0d19 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/member.rs b/zerotier-central-api/src/models/member.rs index c79d468..9fc36c4 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/member_config.rs b/zerotier-central-api/src/models/member_config.rs index 34b5656..7f4a023 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/mod.rs b/zerotier-central-api/src/models/mod.rs index d147c4b..642b316 100644 --- a/zerotier-central-api/src/models/mod.rs +++ b/zerotier-central-api/src/models/mod.rs @@ -32,5 +32,9 @@ pub mod random_token; pub use self::random_token::RandomToken; pub mod route; pub use self::route::Route; +pub mod status; +pub use self::status::Status; +pub mod status_login_methods; +pub use self::status_login_methods::StatusLoginMethods; pub mod user; pub use self::user::User; diff --git a/zerotier-central-api/src/models/network.rs b/zerotier-central-api/src/models/network.rs index ff7254f..9ac5ffa 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/network_config.rs b/zerotier-central-api/src/models/network_config.rs index 7689b8c..c4e9b6e 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/network_config_dns.rs b/zerotier-central-api/src/models/network_config_dns.rs index cf88391..39544f8 100644 --- a/zerotier-central-api/src/models/network_config_dns.rs +++ b/zerotier-central-api/src/models/network_config_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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/organization.rs b/zerotier-central-api/src/models/organization.rs index b4b5d7d..5ad938c 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/organization_invitation.rs b/zerotier-central-api/src/models/organization_invitation.rs index 51b63c7..7341348 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/organization_member.rs b/zerotier-central-api/src/models/organization_member.rs index cde7596..3af0e3c 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/permissions.rs b/zerotier-central-api/src/models/permissions.rs index 6f3f300..275bc17 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/random_token.rs b/zerotier-central-api/src/models/random_token.rs index 9bd98f7..bdc805b 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/route.rs b/zerotier-central-api/src/models/route.rs index 69f87c0..a8867d6 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/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

* * The version of the OpenAPI document: v1 * diff --git a/zerotier-central-api/src/models/status.rs b/zerotier-central-api/src/models/status.rs new file mode 100644 index 0000000..3431a56 --- /dev/null +++ b/zerotier-central-api/src/models/status.rs @@ -0,0 +1,54 @@ +/* + * 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

+ * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Status { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub _type: Option, + /// Current time on server + #[serde(rename = "clock", skip_serializing_if = "Option::is_none")] + pub clock: Option, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, + #[serde(rename = "apiVersion", skip_serializing_if = "Option::is_none")] + pub api_version: Option, + /// Uptime on server + #[serde(rename = "uptime", skip_serializing_if = "Option::is_none")] + pub uptime: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "readOnlyMode", skip_serializing_if = "Option::is_none")] + pub read_only_mode: Option, + #[serde(rename = "loginMethods", skip_serializing_if = "Option::is_none")] + pub login_methods: Option>, +} + +impl Status { + pub fn new() -> Status { + Status { + id: None, + _type: None, + clock: None, + version: None, + api_version: None, + uptime: None, + user: None, + read_only_mode: None, + login_methods: None, + } + } +} + + diff --git a/zerotier-central-api/src/models/status_login_methods.rs b/zerotier-central-api/src/models/status_login_methods.rs new file mode 100644 index 0000000..8105b79 --- /dev/null +++ b/zerotier-central-api/src/models/status_login_methods.rs @@ -0,0 +1,46 @@ +/* + * 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

+ * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct StatusLoginMethods { + #[serde(rename = "local", skip_serializing_if = "Option::is_none")] + pub local: Option, + #[serde(rename = "google", skip_serializing_if = "Option::is_none")] + pub google: Option, + #[serde(rename = "twitter", skip_serializing_if = "Option::is_none")] + pub twitter: Option, + #[serde(rename = "facebook", skip_serializing_if = "Option::is_none")] + pub facebook: Option, + #[serde(rename = "github", skip_serializing_if = "Option::is_none")] + pub github: Option, + #[serde(rename = "saml", skip_serializing_if = "Option::is_none")] + pub saml: Option, + #[serde(rename = "oidc", skip_serializing_if = "Option::is_none")] + pub oidc: Option, +} + +impl StatusLoginMethods { + pub fn new() -> StatusLoginMethods { + StatusLoginMethods { + local: None, + google: None, + twitter: None, + facebook: None, + github: None, + saml: None, + oidc: None, + } + } +} + + diff --git a/zerotier-central-api/src/models/user.rs b/zerotier-central-api/src/models/user.rs index c4715a7..76d713d 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/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

* * The version of the OpenAPI document: v1 *