mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 06:26:51 +00:00
[GitHub Bot] Generated python SDK
This commit is contained in:
parent
4025dc7126
commit
ea7d7b7f54
@ -107,48 +107,9 @@ src/thousandeyes_sdk/admin/models/validation_error.py
|
||||
src/thousandeyes_sdk/admin/models/validation_error_item.py
|
||||
src/thousandeyes_sdk/admin/py.typed
|
||||
test/__init__.py
|
||||
test/test_account_group.py
|
||||
test/test_account_group_detail.py
|
||||
test/test_account_group_info.py
|
||||
test/test_account_group_request.py
|
||||
test/test_account_group_role.py
|
||||
test/test_account_groups.py
|
||||
test/test_agent.py
|
||||
test/test_agent_base.py
|
||||
test/test_audit_user_events.py
|
||||
test/test_base_role.py
|
||||
test/test_cloud_enterprise_agent_type.py
|
||||
test/test_cluster_member.py
|
||||
test/test_created_account_group.py
|
||||
test/test_created_user.py
|
||||
test/test_enterprise_agent.py
|
||||
test/test_enterprise_agent_data.py
|
||||
test/test_enterprise_agent_ipv6_policy.py
|
||||
test/test_enterprise_agent_state.py
|
||||
test/test_error.py
|
||||
test/test_error_detail.py
|
||||
test/test_error_detail_code.py
|
||||
test/test_expand.py
|
||||
test/test_extended_user.py
|
||||
test/test_interface_ip_mapping.py
|
||||
test/test_link.py
|
||||
test/test_pagination_links.py
|
||||
test/test_permission.py
|
||||
test/test_permissions.py
|
||||
test/test_resource.py
|
||||
test/test_role.py
|
||||
test/test_role_detail.py
|
||||
test/test_role_request_body.py
|
||||
test/test_roles.py
|
||||
test/test_self_links.py
|
||||
test/test_simple_agent.py
|
||||
test/test_unauthorized_error.py
|
||||
test/test_user.py
|
||||
test/test_user_account_group.py
|
||||
test/test_user_account_group_role.py
|
||||
test/test_user_detail.py
|
||||
test/test_user_event.py
|
||||
test/test_user_request.py
|
||||
test/test_users.py
|
||||
test/test_validation_error.py
|
||||
test/test_validation_error_item.py
|
||||
test/test_account_groups_api.py
|
||||
test/test_permissions_api.py
|
||||
test/test_roles_api.py
|
||||
test/test_user_events_api.py
|
||||
test/test_users_api.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -13,8 +13,7 @@ This API provides the following endpoints that define the operations to manage y
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.4
|
||||
- Package version: 1.0.0
|
||||
- API version: 7.0.6
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -28,9 +27,9 @@ Python 3.7+
|
||||
If the python package is hosted on a repository, you can install directly using:
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-admin\&subdirectory=thousandeyes-sdk-admin
|
||||
```
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
||||
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-admin\&subdirectory=thousandeyes-sdk-admin`)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
|
||||
@ -83,7 +83,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -164,7 +164,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -251,7 +251,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -335,7 +335,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -425,7 +425,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -165,7 +165,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -251,7 +251,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -335,7 +335,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -424,7 +424,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -165,7 +165,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -251,7 +251,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -335,7 +335,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -424,7 +424,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
|
||||
**var_field** | **int** | Identifies the field that triggered this particular error. | [optional]
|
||||
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
|
||||
**message** | **str** | A short, human-readable summary of the error. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "thousandeyes-sdk-admin"
|
||||
version = "1.0.0"
|
||||
dynamic = ["version"]
|
||||
authors = [
|
||||
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
|
||||
]
|
||||
@ -11,9 +11,12 @@ dependencies = [
|
||||
"python-dateutil >=2.8.2",
|
||||
"pydantic >=2",
|
||||
"typing-extensions >=4.7.1",
|
||||
"thousandeyes-sdk-client==1.0.0",
|
||||
"thousandeyes-sdk-client",
|
||||
]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "thousandeyes_sdk.client.__version__"}
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
"pytest~=7.1.3",
|
||||
|
||||
@ -7,15 +7,13 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
# import apis into sdk package
|
||||
from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi
|
||||
from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -30,6 +30,7 @@ from thousandeyes_sdk.admin.models.expand import Expand
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class AccountGroupsApi:
|
||||
@ -42,6 +43,7 @@ class AccountGroupsApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -314,6 +316,7 @@ class AccountGroupsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -605,6 +608,7 @@ class AccountGroupsApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -902,6 +906,7 @@ class AccountGroupsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1183,6 +1188,7 @@ class AccountGroupsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1495,6 +1501,7 @@ class AccountGroupsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -26,6 +26,7 @@ from thousandeyes_sdk.admin.models.permissions import Permissions
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class PermissionsApi:
|
||||
@ -38,6 +39,7 @@ class PermissionsApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -294,6 +296,7 @@ class PermissionsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -28,6 +28,7 @@ from thousandeyes_sdk.admin.models.roles import Roles
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class RolesApi:
|
||||
@ -40,6 +41,7 @@ class RolesApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -311,6 +313,7 @@ class RolesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -619,6 +622,7 @@ class RolesApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -915,6 +919,7 @@ class RolesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1196,6 +1201,7 @@ class RolesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1507,6 +1513,7 @@ class RolesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -27,6 +27,7 @@ from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class UserEventsApi:
|
||||
@ -39,6 +40,7 @@ class UserEventsApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -398,6 +400,7 @@ class UserEventsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -29,6 +29,7 @@ from thousandeyes_sdk.admin.models.users import Users
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class UsersApi:
|
||||
@ -41,6 +42,7 @@ class UsersApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -312,6 +314,7 @@ class UsersApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -620,6 +623,7 @@ class UsersApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -916,6 +920,7 @@ class UsersApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1197,6 +1202,7 @@ class UsersApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -1508,6 +1514,7 @@ class UsersApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class AccountGroup(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class AccountGroup(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -43,6 +43,7 @@ class AccountGroupDetail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -53,7 +54,7 @@ class AccountGroupDetail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -37,6 +37,7 @@ class AccountGroupInfo(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -47,7 +48,7 @@ class AccountGroupInfo(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class AccountGroupRequest(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class AccountGroupRequest(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class AccountGroupRole(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class AccountGroupRole(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class AccountGroups(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class AccountGroups(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -44,6 +44,7 @@ class Agent(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -54,7 +55,7 @@ class Agent(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -35,6 +35,7 @@ class AgentBase(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -45,7 +46,7 @@ class AgentBase(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -39,6 +39,7 @@ class AuditUserEvents(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -49,7 +50,7 @@ class AuditUserEvents(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -35,6 +35,7 @@ class BaseRole(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -45,7 +46,7 @@ class BaseRole(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -45,6 +45,7 @@ class ClusterMember(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -55,7 +56,7 @@ class ClusterMember(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -41,6 +41,7 @@ class CreatedAccountGroup(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -51,7 +52,7 @@ class CreatedAccountGroup(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -45,6 +45,7 @@ class CreatedUser(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -55,7 +56,7 @@ class CreatedUser(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -64,6 +64,7 @@ class EnterpriseAgent(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -74,7 +75,7 @@ class EnterpriseAgent(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -52,6 +52,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -62,7 +63,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -37,6 +37,7 @@ class Error(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -47,7 +48,7 @@ class Error(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -35,6 +35,7 @@ class ErrorDetail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -45,7 +46,7 @@ class ErrorDetail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -40,6 +40,7 @@ class ExtendedUser(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -50,7 +51,7 @@ class ExtendedUser(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class InterfaceIpMapping(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class InterfaceIpMapping(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -40,6 +40,7 @@ class Link(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -50,7 +51,7 @@ class Link(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class PaginationLinks(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class PaginationLinks(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class Permission(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class Permission(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class Permissions(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class Permissions(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class Resource(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class Resource(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class Role(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class Role(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -39,6 +39,7 @@ class RoleDetail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -49,7 +50,7 @@ class RoleDetail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class RoleRequestBody(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class RoleRequestBody(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class Roles(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class Roles(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class SelfLinks(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class SelfLinks(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -42,6 +42,7 @@ class SimpleAgent(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -52,7 +53,7 @@ class SimpleAgent(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -39,6 +39,7 @@ class User(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -49,7 +50,7 @@ class User(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -40,6 +40,7 @@ class UserAccountGroup(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -50,7 +51,7 @@ class UserAccountGroup(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class UserAccountGroupRole(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class UserAccountGroupRole(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -46,6 +46,7 @@ class UserDetail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -56,7 +57,7 @@ class UserDetail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -42,6 +42,7 @@ class UserEvent(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -52,7 +53,7 @@ class UserEvent(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -38,6 +38,7 @@ class UserRequest(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -48,7 +49,7 @@ class UserRequest(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class Users(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class Users(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -39,6 +39,7 @@ class ValidationError(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -49,7 +50,7 @@ class ValidationError(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -17,7 +17,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel):
|
||||
ValidationErrorItem
|
||||
""" # noqa: E501
|
||||
code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.")
|
||||
var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
|
||||
var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
|
||||
message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.")
|
||||
__properties: ClassVar[List[str]] = ["code", "field", "message"]
|
||||
|
||||
@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
591
thousandeyes-sdk-admin/test/test_account_groups_api.py
Normal file
591
thousandeyes-sdk-admin/test/test_account_groups_api.py
Normal file
@ -0,0 +1,591 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Administrative API
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.admin.models
|
||||
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi
|
||||
|
||||
|
||||
class TestAccountGroupsApi(unittest.TestCase):
|
||||
"""AccountGroupsApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = AccountGroupsApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_create_account_group_models_validation(self) -> None:
|
||||
"""Test case for create_account_group request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"accountGroupName" : "My testing account group",
|
||||
"agents" : [ "105", "719" ]
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.AccountGroupRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"isCurrentAccountGroup" : true,
|
||||
"organizationName" : "organizationName",
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"aid" : "1234",
|
||||
"users" : [ {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
}, {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.CreatedAccountGroup.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_delete_account_group_models_validation(self) -> None:
|
||||
"""Test case for delete_account_group request and response models"""
|
||||
|
||||
|
||||
def test_get_account_group_models_validation(self) -> None:
|
||||
"""Test case for get_account_group request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"isCurrentAccountGroup" : true,
|
||||
"organizationName" : "organizationName",
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"aid" : "1234",
|
||||
"users" : [ {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
}, {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
} ],
|
||||
"agents" : [ {
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"utilization" : 25,
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ],
|
||||
"hostname" : "thousandeyes.com",
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"createdDate" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"keepBrowserCache" : true,
|
||||
"interfaceIpMappings" : [ {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
}, {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
} ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"location" : "San Francisco Bay Area",
|
||||
"accountGroups" : [ {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}, {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
} ],
|
||||
"verifySslCertificates" : true,
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"utilization" : 25,
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ],
|
||||
"hostname" : "thousandeyes.com",
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"createdDate" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"keepBrowserCache" : true,
|
||||
"interfaceIpMappings" : [ {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
}, {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
} ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"location" : "San Francisco Bay Area",
|
||||
"accountGroups" : [ {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}, {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
} ],
|
||||
"verifySslCertificates" : true,
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.AccountGroupDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_get_account_groups_models_validation(self) -> None:
|
||||
"""Test case for get_account_groups request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroups" : [ {
|
||||
"isCurrentAccountGroup" : true,
|
||||
"organizationName" : "organizationName",
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"aid" : "1234"
|
||||
}, {
|
||||
"isCurrentAccountGroup" : true,
|
||||
"organizationName" : "organizationName",
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"aid" : "1234"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.AccountGroups.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_update_account_group_models_validation(self) -> None:
|
||||
"""Test case for update_account_group request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"accountGroupName" : "My testing account group",
|
||||
"agents" : [ "105", "719" ]
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.AccountGroupRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"isCurrentAccountGroup" : true,
|
||||
"organizationName" : "organizationName",
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"aid" : "1234",
|
||||
"users" : [ {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
}, {
|
||||
"uid" : "235",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2022-07-17T22:00:54Z"
|
||||
} ],
|
||||
"agents" : [ {
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"utilization" : 25,
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ],
|
||||
"hostname" : "thousandeyes.com",
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"createdDate" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"keepBrowserCache" : true,
|
||||
"interfaceIpMappings" : [ {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
}, {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
} ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"location" : "San Francisco Bay Area",
|
||||
"accountGroups" : [ {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}, {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
} ],
|
||||
"verifySslCertificates" : true,
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"utilization" : 25,
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"name" : "Cluster member name",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"utilization" : 25,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"memberId" : "10",
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ],
|
||||
"hostname" : "thousandeyes.com",
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"createdDate" : "2022-07-17T22:00:54Z",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"keepBrowserCache" : true,
|
||||
"interfaceIpMappings" : [ {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
}, {
|
||||
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
|
||||
"interfaceName" : "wlp4s0"
|
||||
} ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
|
||||
"location" : "San Francisco Bay Area",
|
||||
"accountGroups" : [ {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}, {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
} ],
|
||||
"verifySslCertificates" : true,
|
||||
"errorDetails" : [ {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
}, {
|
||||
"code" : "agent-version-outdated",
|
||||
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
|
||||
} ]
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.AccountGroupDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
68
thousandeyes-sdk-admin/test/test_permissions_api.py
Normal file
68
thousandeyes-sdk-admin/test/test_permissions_api.py
Normal file
@ -0,0 +1,68 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Administrative API
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.admin.models
|
||||
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi
|
||||
|
||||
|
||||
class TestPermissionsApi(unittest.TestCase):
|
||||
"""PermissionsApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = PermissionsApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_get_permissions_models_validation(self) -> None:
|
||||
"""Test case for get_permissions request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"permissions" : [ {
|
||||
"label" : "View reports",
|
||||
"permissionId" : "1",
|
||||
"isManagementPermission" : true,
|
||||
"permission" : "REPORT_READ"
|
||||
}, {
|
||||
"label" : "View snapshots",
|
||||
"permissionId" : "51",
|
||||
"isManagementPermission" : false,
|
||||
"permission" : "REPORT_SNAPSHOTS_READ"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.Permissions.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
201
thousandeyes-sdk-admin/test/test_roles_api.py
Normal file
201
thousandeyes-sdk-admin/test/test_roles_api.py
Normal file
@ -0,0 +1,201 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Administrative API
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.admin.models
|
||||
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
from thousandeyes_sdk.admin.api.roles_api import RolesApi
|
||||
|
||||
|
||||
class TestRolesApi(unittest.TestCase):
|
||||
"""RolesApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = RolesApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_create_role_models_validation(self) -> None:
|
||||
"""Test case for create_role request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"permissions" : [ "56", "315" ],
|
||||
"name" : "Organization Admin"
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.RoleRequestBody.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"roleId" : "35",
|
||||
"permissions" : [ {
|
||||
"label" : "View reports",
|
||||
"permissionId" : "1",
|
||||
"isManagementPermission" : true,
|
||||
"permission" : "REPORT_READ"
|
||||
}, {
|
||||
"label" : "View snapshots",
|
||||
"permissionId" : "51",
|
||||
"isManagementPermission" : false,
|
||||
"permission" : "REPORT_SNAPSHOTS_READ"
|
||||
} ],
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.RoleDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_delete_role_models_validation(self) -> None:
|
||||
"""Test case for delete_role request and response models"""
|
||||
|
||||
|
||||
def test_get_role_models_validation(self) -> None:
|
||||
"""Test case for get_role request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"roleId" : "35",
|
||||
"permissions" : [ {
|
||||
"label" : "View reports",
|
||||
"permissionId" : "1",
|
||||
"isManagementPermission" : true,
|
||||
"permission" : "REPORT_READ"
|
||||
}, {
|
||||
"label" : "View snapshots",
|
||||
"permissionId" : "51",
|
||||
"isManagementPermission" : false,
|
||||
"permission" : "REPORT_SNAPSHOTS_READ"
|
||||
} ],
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.RoleDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_get_roles_models_validation(self) -> None:
|
||||
"""Test case for get_roles request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.Roles.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_update_role_models_validation(self) -> None:
|
||||
"""Test case for update_role request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"permissions" : [ "56", "315" ],
|
||||
"name" : "Organization Admin"
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.RoleRequestBody.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"roleId" : "35",
|
||||
"permissions" : [ {
|
||||
"label" : "View reports",
|
||||
"permissionId" : "1",
|
||||
"isManagementPermission" : true,
|
||||
"permission" : "REPORT_READ"
|
||||
}, {
|
||||
"label" : "View snapshots",
|
||||
"permissionId" : "51",
|
||||
"isManagementPermission" : false,
|
||||
"permission" : "REPORT_SNAPSHOTS_READ"
|
||||
} ],
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.RoleDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
103
thousandeyes-sdk-admin/test/test_user_events_api.py
Normal file
103
thousandeyes-sdk-admin/test/test_user_events_api.py
Normal file
@ -0,0 +1,103 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Administrative API
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.admin.models
|
||||
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi
|
||||
|
||||
|
||||
class TestUserEventsApi(unittest.TestCase):
|
||||
"""UserEventsApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = UserEventsApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_get_user_events_models_validation(self) -> None:
|
||||
"""Test case for get_user_events request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"endDate" : "2022-07-18T22:00:54Z",
|
||||
"_links" : {
|
||||
"next" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"previous" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"auditEvents" : [ {
|
||||
"accountGroupName" : "API Sandbox",
|
||||
"aid" : "1234",
|
||||
"date" : "2020-07-17T21:54:54Z",
|
||||
"event" : "Report created.",
|
||||
"ipAddress" : "99.128.0.0/11",
|
||||
"uid" : "1234",
|
||||
"user" : "API Sandbox User (noreply@thousandeyes.com)",
|
||||
"resources" : [ {
|
||||
"name" : "My New report",
|
||||
"type" : "reportTitle"
|
||||
}, {
|
||||
"name" : "Other Report",
|
||||
"type" : "testName"
|
||||
} ]
|
||||
}, {
|
||||
"accountGroupName" : "API Sandbox",
|
||||
"aid" : "1234",
|
||||
"date" : "2020-07-17T22:00:54Z",
|
||||
"event" : "Login failed.",
|
||||
"ipAddress" : "99.128.0.0/11",
|
||||
"uid" : "1234",
|
||||
"user" : "API Sandbox User (noreply@thousandeyes.com)"
|
||||
} ],
|
||||
"startDate" : "2022-07-17T22:00:54Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.AuditUserEvents.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
345
thousandeyes-sdk-admin/test/test_users_api.py
Normal file
345
thousandeyes-sdk-admin/test/test_users_api.py
Normal file
@ -0,0 +1,345 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Administrative API
|
||||
|
||||
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
|
||||
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.admin.models
|
||||
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
from thousandeyes_sdk.admin.api.users_api import UsersApi
|
||||
|
||||
|
||||
class TestUsersApi(unittest.TestCase):
|
||||
"""UsersApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = UsersApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_create_user_models_validation(self) -> None:
|
||||
"""Test case for create_user request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"loginAccountGroupId" : "691",
|
||||
"accountGroupRoles" : [ {
|
||||
"roleIds" : [ "57", "1140" ],
|
||||
"accountGroupId" : "315"
|
||||
}, {
|
||||
"roleIds" : [ "57", "1140" ],
|
||||
"accountGroupId" : "315"
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"allAccountGroupRoleIds" : [ "57", "1140" ],
|
||||
"email" : "userx@thousandeyes.com"
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.UserRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"loginAccountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
},
|
||||
"uid" : "245",
|
||||
"allAccountGroupRoles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupRoles" : [ {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
}, {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2020-07-17T22:00:54Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.CreatedUser.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_delete_user_models_validation(self) -> None:
|
||||
"""Test case for delete_user request and response models"""
|
||||
|
||||
|
||||
def test_get_user_models_validation(self) -> None:
|
||||
"""Test case for get_user request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"loginAccountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
},
|
||||
"uid" : "245",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"allAccountGroupRoles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupRoles" : [ {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
}, {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2020-07-17T22:00:54Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.UserDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_get_users_models_validation(self) -> None:
|
||||
"""Test case for get_users request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"users" : [ {
|
||||
"loginAccountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
},
|
||||
"uid" : "245",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2020-07-17T22:00:54Z"
|
||||
}, {
|
||||
"loginAccountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
},
|
||||
"uid" : "245",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2020-07-17T22:00:54Z"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.Users.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_update_user_models_validation(self) -> None:
|
||||
"""Test case for update_user request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"loginAccountGroupId" : "691",
|
||||
"accountGroupRoles" : [ {
|
||||
"roleIds" : [ "57", "1140" ],
|
||||
"accountGroupId" : "315"
|
||||
}, {
|
||||
"roleIds" : [ "57", "1140" ],
|
||||
"accountGroupId" : "315"
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"allAccountGroupRoleIds" : [ "57", "1140" ],
|
||||
"email" : "userx@thousandeyes.com"
|
||||
}"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.admin.models.UserRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"loginAccountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
},
|
||||
"uid" : "245",
|
||||
"lastLogin" : "2022-07-17T22:00:54Z",
|
||||
"allAccountGroupRoles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"accountGroupRoles" : [ {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
}, {
|
||||
"roles" : [ {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
}, {
|
||||
"roleId" : "35",
|
||||
"name" : "Organization Admin",
|
||||
"isBuiltin" : true,
|
||||
"hasManagementPermissions" : true
|
||||
} ],
|
||||
"accountGroup" : {
|
||||
"accountGroupName" : "Account A",
|
||||
"aid" : "1234"
|
||||
}
|
||||
} ],
|
||||
"name" : "User X",
|
||||
"email" : "userx@thousandeyes.com",
|
||||
"dateRegistered" : "2020-07-17T22:00:54Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.admin.models.UserDetail.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
16
thousandeyes-sdk-admin/test/test_utils.py
Normal file
16
thousandeyes-sdk-admin/test/test_utils.py
Normal file
@ -0,0 +1,16 @@
|
||||
# coding: utf-8
|
||||
|
||||
import json
|
||||
import unittest
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict):
|
||||
test_case = unittest.TestCase()
|
||||
test_case.maxDiff = None
|
||||
test_case.assertIsNotNone(model)
|
||||
constructed_json = json.loads(model.to_json())
|
||||
sorted_loaded_json = json.dumps(loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
@ -117,54 +117,8 @@ src/thousandeyes_sdk/agents/models/validation_error.py
|
||||
src/thousandeyes_sdk/agents/models/validation_error_item.py
|
||||
src/thousandeyes_sdk/agents/py.typed
|
||||
test/__init__.py
|
||||
test/test_account_group.py
|
||||
test/test_agent.py
|
||||
test/test_agent_base.py
|
||||
test/test_agent_cluster_assign_request.py
|
||||
test/test_agent_cluster_unassign_request.py
|
||||
test/test_agent_details.py
|
||||
test/test_agent_details_expand.py
|
||||
test/test_agent_ipv6_policy.py
|
||||
test/test_agent_list_expand.py
|
||||
test/test_agent_proxies.py
|
||||
test/test_agent_proxy.py
|
||||
test/test_agent_request.py
|
||||
test/test_alert_email.py
|
||||
test/test_alert_integration_base.py
|
||||
test/test_alert_integration_type.py
|
||||
test/test_cloud_agent_detail.py
|
||||
test/test_cloud_enterprise_agent.py
|
||||
test/test_cloud_enterprise_agent_type.py
|
||||
test/test_cloud_enterprise_agents.py
|
||||
test/test_cluster_member.py
|
||||
test/test_enterprise_agent.py
|
||||
test/test_enterprise_agent_cluster_detail.py
|
||||
test/test_enterprise_agent_data.py
|
||||
test/test_enterprise_agent_detail.py
|
||||
test/test_enterprise_agent_ipv6_policy.py
|
||||
test/test_enterprise_agent_response_expands.py
|
||||
test/test_enterprise_agent_state.py
|
||||
test/test_error.py
|
||||
test/test_error_detail.py
|
||||
test/test_error_detail_code.py
|
||||
test/test_interface_ip_mapping.py
|
||||
test/test_labels.py
|
||||
test/test_link.py
|
||||
test/test_list_notification_rules_response.py
|
||||
test/test_notification.py
|
||||
test/test_notification_rule.py
|
||||
test/test_notification_rule_detail.py
|
||||
test/test_notification_rules.py
|
||||
test/test_proxy_auth_type.py
|
||||
test/test_proxy_type.py
|
||||
test/test_self_links.py
|
||||
test/test_simple_agent.py
|
||||
test/test_simple_enterprise_agent.py
|
||||
test/test_simple_test.py
|
||||
test/test_test_interval.py
|
||||
test/test_test_links.py
|
||||
test/test_test_self_link.py
|
||||
test/test_test_type.py
|
||||
test/test_unauthorized_error.py
|
||||
test/test_validation_error.py
|
||||
test/test_validation_error_item.py
|
||||
test/test_cloud_and_enterprise_agent_notification_rules_api.py
|
||||
test/test_cloud_and_enterprise_agents_api.py
|
||||
test/test_enterprise_agent_cluster_api.py
|
||||
test/test_proxies_api.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -5,8 +5,7 @@ Manage all agents available to your account in ThousandEyes, including both Clou
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.4
|
||||
- Package version: 1.0.0
|
||||
- API version: 7.0.6
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -20,9 +19,9 @@ Python 3.7+
|
||||
If the python package is hosted on a repository, you can install directly using:
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents
|
||||
```
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
||||
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents`)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
@ -100,13 +99,13 @@ Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rule**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rule) | **GET** /v7/agents/notification-rules/{notificationRuleId} | Retrieve agent notification rule
|
||||
*CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rules**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rules) | **GET** /v7/agents/notification-rules | List agent notification rules
|
||||
*CloudAndEnterpriseAgentsApi* | [**delete_enterprise_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
|
||||
*CloudAndEnterpriseAgentsApi* | [**get_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
|
||||
*CloudAndEnterpriseAgentsApi* | [**delete_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
|
||||
*CloudAndEnterpriseAgentsApi* | [**get_agent**](docs/CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
|
||||
*CloudAndEnterpriseAgentsApi* | [**get_agents**](docs/CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents
|
||||
*CloudAndEnterpriseAgentsApi* | [**update_enterprise_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
|
||||
*EnterpriseAgentClusterApi* | [**assign_enterprise_agent_cluster**](docs/EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
|
||||
*EnterpriseAgentClusterApi* | [**unassign_enterprise_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
|
||||
*ProxiesApi* | [**get_agent_proxies**](docs/ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies
|
||||
*CloudAndEnterpriseAgentsApi* | [**update_agent**](docs/CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
|
||||
*EnterpriseAgentClusterApi* | [**assign_agent_to_cluster**](docs/EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
|
||||
*EnterpriseAgentClusterApi* | [**unassign_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
|
||||
*ProxiesApi* | [**get_agents_proxies**](docs/ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
@ -78,7 +78,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -163,7 +163,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -4,14 +4,14 @@ All URIs are relative to *https://api.thousandeyes.com*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_enterprise_agent**](CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
|
||||
[**get_agent_details**](CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
|
||||
[**delete_agent**](CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
|
||||
[**get_agent**](CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
|
||||
[**get_agents**](CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents
|
||||
[**update_enterprise_agent_details**](CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
|
||||
[**update_agent**](CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
|
||||
|
||||
|
||||
# **delete_enterprise_agent**
|
||||
> delete_enterprise_agent(agent_id, aid=aid)
|
||||
# **delete_agent**
|
||||
> delete_agent(agent_id, aid=aid)
|
||||
|
||||
Delete Enterprise Agent
|
||||
|
||||
@ -51,9 +51,9 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Delete Enterprise Agent
|
||||
api_instance.delete_enterprise_agent(agent_id, aid=aid)
|
||||
api_instance.delete_agent(agent_id, aid=aid)
|
||||
except Exception as e:
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->delete_enterprise_agent: %s\n" % e)
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->delete_agent: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -94,8 +94,8 @@ void (empty response body)
|
||||
|
||||
[[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_agent_details**
|
||||
> AgentDetails get_agent_details(agent_id, aid=aid, expand=expand)
|
||||
# **get_agent**
|
||||
> AgentDetails get_agent(agent_id, aid=aid, expand=expand)
|
||||
|
||||
Retrieve Cloud and Enterprise Agent
|
||||
|
||||
@ -138,11 +138,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Retrieve Cloud and Enterprise Agent
|
||||
api_response = api_instance.get_agent_details(agent_id, aid=aid, expand=expand)
|
||||
print("The response of CloudAndEnterpriseAgentsApi->get_agent_details:\n")
|
||||
api_response = api_instance.get_agent(agent_id, aid=aid, expand=expand)
|
||||
print("The response of CloudAndEnterpriseAgentsApi->get_agent:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent_details: %s\n" % e)
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -258,7 +258,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -275,8 +275,8 @@ Name | Type | Description | Notes
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_enterprise_agent_details**
|
||||
> AgentDetails update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand)
|
||||
# **update_agent**
|
||||
> AgentDetails update_agent(agent_id, agent_request, aid=aid, expand=expand)
|
||||
|
||||
Update Enterprise Agent
|
||||
|
||||
@ -321,11 +321,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Update Enterprise Agent
|
||||
api_response = api_instance.update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand)
|
||||
print("The response of CloudAndEnterpriseAgentsApi->update_enterprise_agent_details:\n")
|
||||
api_response = api_instance.update_agent(agent_id, agent_request, aid=aid, expand=expand)
|
||||
print("The response of CloudAndEnterpriseAgentsApi->update_agent:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->update_enterprise_agent_details: %s\n" % e)
|
||||
print("Exception when calling CloudAndEnterpriseAgentsApi->update_agent: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -351,7 +351,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**assign_enterprise_agent_cluster**](EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
|
||||
[**unassign_enterprise_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
|
||||
[**assign_agent_to_cluster**](EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
|
||||
[**unassign_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
|
||||
|
||||
|
||||
# **assign_enterprise_agent_cluster**
|
||||
> AgentDetails assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
|
||||
# **assign_agent_to_cluster**
|
||||
> AgentDetails assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
|
||||
|
||||
Add member to Enterprise Agent cluster
|
||||
|
||||
@ -54,11 +54,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Add member to Enterprise Agent cluster
|
||||
api_response = api_instance.assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
|
||||
print("The response of EnterpriseAgentClusterApi->assign_enterprise_agent_cluster:\n")
|
||||
api_response = api_instance.assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
|
||||
print("The response of EnterpriseAgentClusterApi->assign_agent_to_cluster:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling EnterpriseAgentClusterApi->assign_enterprise_agent_cluster: %s\n" % e)
|
||||
print("Exception when calling EnterpriseAgentClusterApi->assign_agent_to_cluster: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
@ -102,8 +102,8 @@ Name | Type | Description | Notes
|
||||
|
||||
[[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)
|
||||
|
||||
# **unassign_enterprise_agent_from_cluster**
|
||||
> CloudEnterpriseAgents unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
|
||||
# **unassign_agent_from_cluster**
|
||||
> CloudEnterpriseAgents unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
|
||||
|
||||
Remove member from Enterprise Agent cluster
|
||||
|
||||
@ -148,11 +148,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Remove member from Enterprise Agent cluster
|
||||
api_response = api_instance.unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
|
||||
print("The response of EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster:\n")
|
||||
api_response = api_instance.unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
|
||||
print("The response of EnterpriseAgentClusterApi->unassign_agent_from_cluster:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster: %s\n" % e)
|
||||
print("Exception when calling EnterpriseAgentClusterApi->unassign_agent_from_cluster: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_agent_proxies**](ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies
|
||||
[**get_agents_proxies**](ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies
|
||||
|
||||
|
||||
# **get_agent_proxies**
|
||||
> AgentProxies get_agent_proxies(aid=aid)
|
||||
# **get_agents_proxies**
|
||||
> AgentProxies get_agents_proxies(aid=aid)
|
||||
|
||||
List agent proxies
|
||||
|
||||
@ -48,11 +48,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# List agent proxies
|
||||
api_response = api_instance.get_agent_proxies(aid=aid)
|
||||
print("The response of ProxiesApi->get_agent_proxies:\n")
|
||||
api_response = api_instance.get_agents_proxies(aid=aid)
|
||||
print("The response of ProxiesApi->get_agents_proxies:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling ProxiesApi->get_agent_proxies: %s\n" % e)
|
||||
print("Exception when calling ProxiesApi->get_agents_proxies: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/problem+json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
|
||||
**var_field** | **int** | Identifies the field that triggered this particular error. | [optional]
|
||||
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
|
||||
**message** | **str** | A short, human-readable summary of the error. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "thousandeyes-sdk-agents"
|
||||
version = "1.0.0"
|
||||
dynamic = ["version"]
|
||||
authors = [
|
||||
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
|
||||
]
|
||||
@ -11,9 +11,12 @@ dependencies = [
|
||||
"python-dateutil >=2.8.2",
|
||||
"pydantic >=2",
|
||||
"typing-extensions >=4.7.1",
|
||||
"thousandeyes-sdk-client==1.0.0",
|
||||
"thousandeyes-sdk-client",
|
||||
]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "thousandeyes_sdk.client.__version__"}
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
"pytest~=7.1.3",
|
||||
|
||||
@ -7,15 +7,13 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
# import apis into sdk package
|
||||
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi
|
||||
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -27,6 +27,7 @@ from thousandeyes_sdk.agents.models.notification_rule_detail import Notification
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class CloudAndEnterpriseAgentNotificationRulesApi:
|
||||
@ -39,6 +40,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@ -310,6 +312,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -591,6 +594,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -31,6 +31,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class CloudAndEnterpriseAgentsApi:
|
||||
@ -43,11 +44,12 @@ class CloudAndEnterpriseAgentsApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_enterprise_agent(
|
||||
def delete_agent(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -94,7 +96,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_enterprise_agent_serialize(
|
||||
_param = self._delete_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
@ -125,7 +127,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_enterprise_agent_with_http_info(
|
||||
def delete_agent_with_http_info(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -172,7 +174,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_enterprise_agent_serialize(
|
||||
_param = self._delete_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
@ -203,7 +205,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_enterprise_agent_without_preload_content(
|
||||
def delete_agent_without_preload_content(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -250,7 +252,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_enterprise_agent_serialize(
|
||||
_param = self._delete_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
@ -275,7 +277,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _delete_enterprise_agent_serialize(
|
||||
def _delete_agent_serialize(
|
||||
self,
|
||||
agent_id,
|
||||
aid,
|
||||
@ -313,6 +315,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -342,7 +345,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_details(
|
||||
def get_agent(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -392,7 +395,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_details_serialize(
|
||||
_param = self._get_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
expand=expand,
|
||||
@ -424,7 +427,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_details_with_http_info(
|
||||
def get_agent_with_http_info(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -474,7 +477,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_details_serialize(
|
||||
_param = self._get_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
expand=expand,
|
||||
@ -506,7 +509,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_details_without_preload_content(
|
||||
def get_agent_without_preload_content(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
@ -556,7 +559,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_details_serialize(
|
||||
_param = self._get_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
aid=aid,
|
||||
expand=expand,
|
||||
@ -582,7 +585,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_agent_details_serialize(
|
||||
def _get_agent_serialize(
|
||||
self,
|
||||
agent_id,
|
||||
aid,
|
||||
@ -627,6 +630,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -944,6 +948,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -973,7 +978,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_enterprise_agent_details(
|
||||
def update_agent(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
agent_request: AgentRequest,
|
||||
@ -1026,7 +1031,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_enterprise_agent_details_serialize(
|
||||
_param = self._update_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_request=agent_request,
|
||||
aid=aid,
|
||||
@ -1060,7 +1065,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_enterprise_agent_details_with_http_info(
|
||||
def update_agent_with_http_info(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
agent_request: AgentRequest,
|
||||
@ -1113,7 +1118,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_enterprise_agent_details_serialize(
|
||||
_param = self._update_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_request=agent_request,
|
||||
aid=aid,
|
||||
@ -1147,7 +1152,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_enterprise_agent_details_without_preload_content(
|
||||
def update_agent_without_preload_content(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
|
||||
agent_request: AgentRequest,
|
||||
@ -1200,7 +1205,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_enterprise_agent_details_serialize(
|
||||
_param = self._update_agent_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_request=agent_request,
|
||||
aid=aid,
|
||||
@ -1228,7 +1233,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _update_enterprise_agent_details_serialize(
|
||||
def _update_agent_serialize(
|
||||
self,
|
||||
agent_id,
|
||||
agent_request,
|
||||
@ -1276,6 +1281,7 @@ class CloudAndEnterpriseAgentsApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -30,6 +30,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class EnterpriseAgentClusterApi:
|
||||
@ -42,11 +43,12 @@ class EnterpriseAgentClusterApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def assign_enterprise_agent_cluster(
|
||||
def assign_agent_to_cluster(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
|
||||
agent_cluster_assign_request: AgentClusterAssignRequest,
|
||||
@ -99,7 +101,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._assign_enterprise_agent_cluster_serialize(
|
||||
_param = self._assign_agent_to_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_assign_request=agent_cluster_assign_request,
|
||||
aid=aid,
|
||||
@ -133,7 +135,7 @@ class EnterpriseAgentClusterApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def assign_enterprise_agent_cluster_with_http_info(
|
||||
def assign_agent_to_cluster_with_http_info(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
|
||||
agent_cluster_assign_request: AgentClusterAssignRequest,
|
||||
@ -186,7 +188,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._assign_enterprise_agent_cluster_serialize(
|
||||
_param = self._assign_agent_to_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_assign_request=agent_cluster_assign_request,
|
||||
aid=aid,
|
||||
@ -220,7 +222,7 @@ class EnterpriseAgentClusterApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def assign_enterprise_agent_cluster_without_preload_content(
|
||||
def assign_agent_to_cluster_without_preload_content(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
|
||||
agent_cluster_assign_request: AgentClusterAssignRequest,
|
||||
@ -273,7 +275,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._assign_enterprise_agent_cluster_serialize(
|
||||
_param = self._assign_agent_to_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_assign_request=agent_cluster_assign_request,
|
||||
aid=aid,
|
||||
@ -301,7 +303,7 @@ class EnterpriseAgentClusterApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _assign_enterprise_agent_cluster_serialize(
|
||||
def _assign_agent_to_cluster_serialize(
|
||||
self,
|
||||
agent_id,
|
||||
agent_cluster_assign_request,
|
||||
@ -349,6 +351,7 @@ class EnterpriseAgentClusterApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
@ -391,7 +394,7 @@ class EnterpriseAgentClusterApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def unassign_enterprise_agent_from_cluster(
|
||||
def unassign_agent_from_cluster(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
|
||||
agent_cluster_unassign_request: AgentClusterUnassignRequest,
|
||||
@ -444,7 +447,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._unassign_enterprise_agent_from_cluster_serialize(
|
||||
_param = self._unassign_agent_from_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_unassign_request=agent_cluster_unassign_request,
|
||||
aid=aid,
|
||||
@ -478,7 +481,7 @@ class EnterpriseAgentClusterApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def unassign_enterprise_agent_from_cluster_with_http_info(
|
||||
def unassign_agent_from_cluster_with_http_info(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
|
||||
agent_cluster_unassign_request: AgentClusterUnassignRequest,
|
||||
@ -531,7 +534,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._unassign_enterprise_agent_from_cluster_serialize(
|
||||
_param = self._unassign_agent_from_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_unassign_request=agent_cluster_unassign_request,
|
||||
aid=aid,
|
||||
@ -565,7 +568,7 @@ class EnterpriseAgentClusterApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def unassign_enterprise_agent_from_cluster_without_preload_content(
|
||||
def unassign_agent_from_cluster_without_preload_content(
|
||||
self,
|
||||
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
|
||||
agent_cluster_unassign_request: AgentClusterUnassignRequest,
|
||||
@ -618,7 +621,7 @@ class EnterpriseAgentClusterApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._unassign_enterprise_agent_from_cluster_serialize(
|
||||
_param = self._unassign_agent_from_cluster_serialize(
|
||||
agent_id=agent_id,
|
||||
agent_cluster_unassign_request=agent_cluster_unassign_request,
|
||||
aid=aid,
|
||||
@ -646,7 +649,7 @@ class EnterpriseAgentClusterApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _unassign_enterprise_agent_from_cluster_serialize(
|
||||
def _unassign_agent_from_cluster_serialize(
|
||||
self,
|
||||
agent_id,
|
||||
agent_cluster_unassign_request,
|
||||
@ -694,6 +697,7 @@ class EnterpriseAgentClusterApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies
|
||||
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.client.api_response import ApiResponse
|
||||
from thousandeyes_sdk.client.rest import RESTResponseType
|
||||
from thousandeyes_sdk.client.version import Version
|
||||
|
||||
|
||||
class ProxiesApi:
|
||||
@ -38,11 +39,12 @@ class ProxiesApi:
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_proxies(
|
||||
def get_agents_proxies(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
@ -86,7 +88,7 @@ class ProxiesApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_proxies_serialize(
|
||||
_param = self._get_agents_proxies_serialize(
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -116,7 +118,7 @@ class ProxiesApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_proxies_with_http_info(
|
||||
def get_agents_proxies_with_http_info(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
@ -160,7 +162,7 @@ class ProxiesApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_proxies_serialize(
|
||||
_param = self._get_agents_proxies_serialize(
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -190,7 +192,7 @@ class ProxiesApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agent_proxies_without_preload_content(
|
||||
def get_agents_proxies_without_preload_content(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
@ -234,7 +236,7 @@ class ProxiesApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agent_proxies_serialize(
|
||||
_param = self._get_agents_proxies_serialize(
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -258,7 +260,7 @@ class ProxiesApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_agent_proxies_serialize(
|
||||
def _get_agents_proxies_serialize(
|
||||
self,
|
||||
aid,
|
||||
_request_auth,
|
||||
@ -294,6 +296,7 @@ class ProxiesApi:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class AccountGroup(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class AccountGroup(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -44,6 +44,7 @@ class Agent(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -54,7 +55,7 @@ class Agent(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -35,6 +35,7 @@ class AgentBase(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -45,7 +46,7 @@ class AgentBase(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -33,6 +33,7 @@ class AgentClusterAssignRequest(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -43,7 +44,7 @@ class AgentClusterAssignRequest(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -33,6 +33,7 @@ class AgentClusterUnassignRequest(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -43,7 +44,7 @@ class AgentClusterUnassignRequest(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -20,7 +20,7 @@ from typing import Any, List, Optional
|
||||
from thousandeyes_sdk.agents.models.cloud_agent_detail import CloudAgentDetail
|
||||
from thousandeyes_sdk.agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail
|
||||
from thousandeyes_sdk.agents.models.enterprise_agent_detail import EnterpriseAgentDetail
|
||||
from pydantic import StrictStr, Field
|
||||
from pydantic import StrictStr, Field, model_serializer
|
||||
from typing import Union, List, Set, Optional, Dict
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
@ -126,6 +126,10 @@ class AgentDetails(BaseModel):
|
||||
else:
|
||||
return instance
|
||||
|
||||
@model_serializer(when_used="json")
|
||||
def serialize_model(self):
|
||||
return json.loads(self.to_json())
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class AgentProxies(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class AgentProxies(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -46,6 +46,7 @@ class AgentProxy(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -56,7 +57,7 @@ class AgentProxy(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -41,6 +41,7 @@ class AgentRequest(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -51,7 +52,7 @@ class AgentRequest(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -34,6 +34,7 @@ class AlertEmail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ class AlertEmail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -41,6 +41,7 @@ class AlertIntegrationBase(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -51,7 +52,7 @@ class AlertIntegrationBase(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -57,6 +57,7 @@ class CloudAgentDetail(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -67,7 +68,7 @@ class CloudAgentDetail(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -23,7 +23,7 @@ from thousandeyes_sdk.agents.models.agent import Agent
|
||||
from thousandeyes_sdk.agents.models.enterprise_agent import EnterpriseAgent
|
||||
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
||||
from typing_extensions import Literal, Self
|
||||
from pydantic import Field
|
||||
from pydantic import Field, model_serializer
|
||||
|
||||
CLOUDENTERPRISEAGENT_ANY_OF_SCHEMAS = ["Agent", "EnterpriseAgent"]
|
||||
|
||||
@ -107,6 +107,10 @@ class CloudEnterpriseAgent(BaseModel):
|
||||
else:
|
||||
return instance
|
||||
|
||||
@model_serializer(when_used="json")
|
||||
def serialize_model(self):
|
||||
return json.loads(self.to_json())
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
|
||||
|
||||
The version of the OpenAPI document: 7.0.4
|
||||
The version of the OpenAPI document: 7.0.6
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@ -36,6 +36,7 @@ class CloudEnterpriseAgents(BaseModel):
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ class CloudEnterpriseAgents(BaseModel):
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user