diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md index 4baac6c0..94e95df3 100644 --- a/thousandeyes-sdk-administrative/README.md +++ b/thousandeyes-sdk-administrative/README.md @@ -12,7 +12,7 @@ This API provides the following operations to manage your organization: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-administrative/test/test_account_groups_api.py b/thousandeyes-sdk-administrative/test/test_account_groups_api.py index 5bdb6a72..057314d6 100644 --- a/thousandeyes-sdk-administrative/test/test_account_groups_api.py +++ b/thousandeyes-sdk-administrative/test/test_account_groups_api.py @@ -34,7 +34,8 @@ class TestAccountGroupsApi(unittest.TestCase): { "accountGroupName" : "My testing account group", "agents" : [ "105", "719" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json) @@ -505,7 +506,8 @@ class TestAccountGroupsApi(unittest.TestCase): { "accountGroupName" : "My testing account group", "agents" : [ "105", "719" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-administrative/test/test_roles_api.py b/thousandeyes-sdk-administrative/test/test_roles_api.py index e81e9d47..119cabf6 100644 --- a/thousandeyes-sdk-administrative/test/test_roles_api.py +++ b/thousandeyes-sdk-administrative/test/test_roles_api.py @@ -34,7 +34,8 @@ class TestRolesApi(unittest.TestCase): { "permissions" : [ "56", "315" ], "name" : "Organization Admin" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json) @@ -155,7 +156,8 @@ class TestRolesApi(unittest.TestCase): { "permissions" : [ "56", "315" ], "name" : "Organization Admin" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json) diff --git a/thousandeyes-sdk-administrative/test/test_users_api.py b/thousandeyes-sdk-administrative/test/test_users_api.py index 62f7885c..b61773d2 100644 --- a/thousandeyes-sdk-administrative/test/test_users_api.py +++ b/thousandeyes-sdk-administrative/test/test_users_api.py @@ -43,7 +43,8 @@ class TestUsersApi(unittest.TestCase): "name" : "User X", "allAccountGroupRoleIds" : [ "57", "1140" ], "email" : "userx@thousandeyes.com" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json) @@ -336,7 +337,8 @@ class TestUsersApi(unittest.TestCase): "name" : "User X", "allAccountGroupRoleIds" : [ "57", "1140" ], "email" : "userx@thousandeyes.com" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-agents/README.md b/thousandeyes-sdk-agents/README.md index 29abe896..a985a117 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py index b2ef76e2..8b2ba20e 100644 --- a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py @@ -208,7 +208,8 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase): "agentName" : "thousandeyes-stg-va-254", "enabled" : true, "accountGroups" : [ "1234", "1" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py index 24aa109f..2217382a 100644 --- a/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py +++ b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py @@ -33,7 +33,8 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase): request_body_json = """ { "agents" : [ "281474976710706" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentClusterAssignRequest.from_json(request_body_json) @@ -149,7 +150,8 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase): request_body_json = """ { "members" : [ "281474976710706" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentClusterUnassignRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py b/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py index 11c2de53..396efcac 100644 --- a/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py +++ b/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py @@ -33,7 +33,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase): request_body_json = """ { "testIds" : [ "281474976710706" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) @@ -149,7 +150,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase): request_body_json = """ { "testIds" : [ "281474976710706" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) @@ -265,7 +267,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase): request_body_json = """ { "testIds" : [ "281474976710706" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-alerts/README.md b/thousandeyes-sdk-alerts/README.md index 6183c05f..99cd4295 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -12,7 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-alerts/docs/RuleDetail.md b/thousandeyes-sdk-alerts/docs/RuleDetail.md index d52cfec0..1f45dec3 100644 --- a/thousandeyes-sdk-alerts/docs/RuleDetail.md +++ b/thousandeyes-sdk-alerts/docs/RuleDetail.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **visited_sites_filter** | **List[str]** | A list of website domains visited during the session. This is applicable when `alertGroupType` is `browser-session`. | [optional] **notifications** | [**AlertNotification**](AlertNotification.md) | | [optional] **tests** | [**List[AlertSimpleTest]**](AlertSimpleTest.md) | | [optional] [readonly] +**test_ids** | **List[str]** | Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint). | [optional] [readonly] **links** | [**SelfLinks**](SelfLinks.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py index ea7d9ebd..ac2fd68a 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py @@ -56,8 +56,9 @@ class RuleDetail(BaseModel): visited_sites_filter: Optional[List[StrictStr]] = Field(default=None, description="A list of website domains visited during the session. This is applicable when `alertGroupType` is `browser-session`.", alias="visitedSitesFilter") notifications: Optional[AlertNotification] = None tests: Optional[List[AlertSimpleTest]] = None + test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds") links: Optional[SelfLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "_links"] + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "testIds", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -92,10 +93,12 @@ class RuleDetail(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "rule_id", "tests", + "test_ids", ]) _dict = self.model_dump( @@ -150,6 +153,7 @@ class RuleDetail(BaseModel): "visitedSitesFilter": obj.get("visitedSitesFilter"), "notifications": AlertNotification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, "tests": [AlertSimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "testIds": obj.get("testIds"), "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/thousandeyes-sdk-alerts/test/test_alert_rules_api.py b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py index 9d407556..8a1eb4ef 100644 --- a/thousandeyes-sdk-alerts/test/test_alert_rules_api.py +++ b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py @@ -88,7 +88,8 @@ class TestAlertRulesApi(unittest.TestCase): } ] }, "direction" : "to-target" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) @@ -201,6 +202,7 @@ class TestAlertRulesApi(unittest.TestCase): "sensitivityLevel" : "medium", "alertGroupType" : "endpoint", "notifyOnClear" : true, + "testIds" : [ "281474976710706", "271659" ], "roundsViolatingOutOf" : 5, "roundsViolatingRequired" : 2, "isDefault" : true, @@ -441,7 +443,8 @@ class TestAlertRulesApi(unittest.TestCase): } ] }, "direction" : "to-target" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) diff --git a/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py index 5e50c8f8..8e0de84e 100644 --- a/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py +++ b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py @@ -50,7 +50,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase): "name" : "Monthly maintenance", "startDate" : "2017-07-01T05:00:00Z", "status" : "ended" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) @@ -369,7 +370,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase): "name" : "Monthly maintenance", "startDate" : "2017-07-01T05:00:00Z", "status" : "ended" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-bgp-monitors/README.md b/thousandeyes-sdk-bgp-monitors/README.md index 1eec1c95..d6190ef2 100644 --- a/thousandeyes-sdk-bgp-monitors/README.md +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -9,7 +9,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-connectors/.openapi-generator-ignore b/thousandeyes-sdk-connectors/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-connectors/.openapi-generator/FILES b/thousandeyes-sdk-connectors/.openapi-generator/FILES new file mode 100644 index 00000000..cc4969b3 --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator/FILES @@ -0,0 +1,66 @@ +.openapi-generator-ignore +MANIFEST.in +README.md +docs/Assignments.md +docs/AuthenticationType.md +docs/BasicAuthentication.md +docs/BearerTokenAuthentication.md +docs/ConnectorType.md +docs/Error.md +docs/GenericConnector.md +docs/GenericConnectorAuth.md +docs/GenericConnectors.md +docs/GenericConnectorsApi.md +docs/Header.md +docs/Link.md +docs/OauthClientCredentialsAuthentication.md +docs/OauthCodeAuthentication.md +docs/OperationCategory.md +docs/OperationConnectorsApi.md +docs/OperationStatus.md +docs/OperationType.md +docs/OtherTokenAuthentication.md +docs/SelfLinks.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorItem.md +docs/WebhookOperation.md +docs/WebhookOperations.md +docs/WebhookOperationsApi.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/connectors/__init__.py +src/thousandeyes_sdk/connectors/api/__init__.py +src/thousandeyes_sdk/connectors/api/generic_connectors_api.py +src/thousandeyes_sdk/connectors/api/operation_connectors_api.py +src/thousandeyes_sdk/connectors/api/webhook_operations_api.py +src/thousandeyes_sdk/connectors/models/__init__.py +src/thousandeyes_sdk/connectors/models/assignments.py +src/thousandeyes_sdk/connectors/models/authentication_type.py +src/thousandeyes_sdk/connectors/models/basic_authentication.py +src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py +src/thousandeyes_sdk/connectors/models/connector_type.py +src/thousandeyes_sdk/connectors/models/error.py +src/thousandeyes_sdk/connectors/models/generic_connector.py +src/thousandeyes_sdk/connectors/models/generic_connector_auth.py +src/thousandeyes_sdk/connectors/models/generic_connectors.py +src/thousandeyes_sdk/connectors/models/header.py +src/thousandeyes_sdk/connectors/models/link.py +src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py +src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py +src/thousandeyes_sdk/connectors/models/operation_category.py +src/thousandeyes_sdk/connectors/models/operation_status.py +src/thousandeyes_sdk/connectors/models/operation_type.py +src/thousandeyes_sdk/connectors/models/other_token_authentication.py +src/thousandeyes_sdk/connectors/models/self_links.py +src/thousandeyes_sdk/connectors/models/unauthorized_error.py +src/thousandeyes_sdk/connectors/models/validation_error.py +src/thousandeyes_sdk/connectors/models/validation_error_item.py +src/thousandeyes_sdk/connectors/models/webhook_operation.py +src/thousandeyes_sdk/connectors/models/webhook_operations.py +src/thousandeyes_sdk/connectors/py.typed +test/__init__.py +test/test_generic_connectors_api.py +test/test_operation_connectors_api.py +test/test_utils.py +test/test_webhook_operations_api.py diff --git a/thousandeyes-sdk-connectors/.openapi-generator/VERSION b/thousandeyes-sdk-connectors/.openapi-generator/VERSION new file mode 100644 index 00000000..93c8ddab --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-connectors/MANIFEST.in b/thousandeyes-sdk-connectors/MANIFEST.in new file mode 100644 index 00000000..9a2248f5 --- /dev/null +++ b/thousandeyes-sdk-connectors/MANIFEST.in @@ -0,0 +1 @@ +include docs/* diff --git a/thousandeyes-sdk-connectors/README.md b/thousandeyes-sdk-connectors/README.md new file mode 100644 index 00000000..92395c3d --- /dev/null +++ b/thousandeyes-sdk-connectors/README.md @@ -0,0 +1,142 @@ +# thousandeyes-sdk-connectors +Manage connectors and operations. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.79 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.8+ + +## Installation & Usage +### pip install + +Install directly via PyPi: + +```sh +pip install thousandeyes-sdk-connectors +``` +(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-connectors`) + +Then import the package: +```python +import thousandeyes_sdk.connectors +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.connectors +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the installation procedure and then run the following: + +```python + +import thousandeyes_sdk.core +import thousandeyes_sdk.connectors +from thousandeyes_sdk.core.exceptions import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = '1234' # str | 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. (optional) + + try: + # Create connector + api_response = api_instance.create_generic_connector(generic_connector, aid=aid) + print("The response of GenericConnectorsApi->create_generic_connector:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GenericConnectorsApi* | [**create_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector +*GenericConnectorsApi* | [**delete_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector +*GenericConnectorsApi* | [**get_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector +*GenericConnectorsApi* | [**get_generic_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors +*GenericConnectorsApi* | [**list_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +*GenericConnectorsApi* | [**set_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +*GenericConnectorsApi* | [**update_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector +*OperationConnectorsApi* | [**get_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +*OperationConnectorsApi* | [**set_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation +*WebhookOperationsApi* | [**create_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation +*WebhookOperationsApi* | [**delete_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +*WebhookOperationsApi* | [**get_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +*WebhookOperationsApi* | [**get_webhook_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations +*WebhookOperationsApi* | [**update_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation + + +## Documentation For Models + + - [Assignments](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Assignments.md) + - [AuthenticationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/AuthenticationType.md) + - [BasicAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BasicAuthentication.md) + - [BearerTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md) + - [ConnectorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConnectorType.md) + - [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Error.md) + - [GenericConnector](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnector.md) + - [GenericConnectorAuth](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md) + - [GenericConnectors](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectors.md) + - [Header](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Header.md) + - [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Link.md) + - [OauthClientCredentialsAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md) + - [OauthCodeAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md) + - [OperationCategory](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationCategory.md) + - [OperationStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationStatus.md) + - [OperationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationType.md) + - [OtherTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md) + - [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/SelfLinks.md) + - [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/UnauthorizedError.md) + - [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationError.md) + - [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md) + - [WebhookOperation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperation.md) + - [WebhookOperations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperations.md) + + + +## Documentation For Authorization + +Endpoints do not require authorization. + + +## Author + +ThousandEyes API Team + + diff --git a/thousandeyes-sdk-connectors/docs/Assignments.md b/thousandeyes-sdk-connectors/docs/Assignments.md new file mode 100644 index 00000000..885fcc61 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Assignments.md @@ -0,0 +1,31 @@ +# Assignments + +A list of assigned items. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | **List[str]** | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.assignments import Assignments + +# TODO update the JSON string below +json = "{}" +# create an instance of Assignments from a JSON string +assignments_instance = Assignments.from_json(json) +# print the JSON string representation of the object +print(Assignments.to_json()) + +# convert the object into a dict +assignments_dict = assignments_instance.to_dict() +# create an instance of Assignments from a dict +assignments_from_dict = Assignments.from_dict(assignments_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/AuthenticationType.md b/thousandeyes-sdk-connectors/docs/AuthenticationType.md new file mode 100644 index 00000000..282ee3f8 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/AuthenticationType.md @@ -0,0 +1,11 @@ +# AuthenticationType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/BasicAuthentication.md b/thousandeyes-sdk-connectors/docs/BasicAuthentication.md new file mode 100644 index 00000000..d8a97eb9 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/BasicAuthentication.md @@ -0,0 +1,31 @@ +# BasicAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**password** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicAuthentication from a JSON string +basic_authentication_instance = BasicAuthentication.from_json(json) +# print the JSON string representation of the object +print(BasicAuthentication.to_json()) + +# convert the object into a dict +basic_authentication_dict = basic_authentication_instance.to_dict() +# create an instance of BasicAuthentication from a dict +basic_authentication_from_dict = BasicAuthentication.from_dict(basic_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md b/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md new file mode 100644 index 00000000..dc090376 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md @@ -0,0 +1,30 @@ +# BearerTokenAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of BearerTokenAuthentication from a JSON string +bearer_token_authentication_instance = BearerTokenAuthentication.from_json(json) +# print the JSON string representation of the object +print(BearerTokenAuthentication.to_json()) + +# convert the object into a dict +bearer_token_authentication_dict = bearer_token_authentication_instance.to_dict() +# create an instance of BearerTokenAuthentication from a dict +bearer_token_authentication_from_dict = BearerTokenAuthentication.from_dict(bearer_token_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ConnectorType.md b/thousandeyes-sdk-connectors/docs/ConnectorType.md new file mode 100644 index 00000000..2c0d566d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ConnectorType.md @@ -0,0 +1,11 @@ +# ConnectorType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/Error.md b/thousandeyes-sdk-connectors/docs/Error.md new file mode 100644 index 00000000..30694ef1 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnector.md b/thousandeyes-sdk-connectors/docs/GenericConnector.md new file mode 100644 index 00000000..fb364fbe --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnector.md @@ -0,0 +1,35 @@ +# GenericConnector + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] [readonly] +**type** | [**ConnectorType**](ConnectorType.md) | | +**name** | **str** | | +**target** | **str** | | +**authentication** | [**GenericConnectorAuth**](GenericConnectorAuth.md) | | [optional] +**last_modified_date** | **int** | The date when the connector was last modified (Unix timestamp in milliseconds). | [optional] [readonly] +**headers** | [**List[Header]**](Header.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnector from a JSON string +generic_connector_instance = GenericConnector.from_json(json) +# print the JSON string representation of the object +print(GenericConnector.to_json()) + +# convert the object into a dict +generic_connector_dict = generic_connector_instance.to_dict() +# create an instance of GenericConnector from a dict +generic_connector_from_dict = GenericConnector.from_dict(generic_connector_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md b/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md new file mode 100644 index 00000000..e77f7732 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md @@ -0,0 +1,39 @@ +# GenericConnectorAuth + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**password** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | +**token** | **str** | | +**refresh_token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_auth_url** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**code** | **str** | | +**redirect_uri** | **str** | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnectorAuth from a JSON string +generic_connector_auth_instance = GenericConnectorAuth.from_json(json) +# print the JSON string representation of the object +print(GenericConnectorAuth.to_json()) + +# convert the object into a dict +generic_connector_auth_dict = generic_connector_auth_instance.to_dict() +# create an instance of GenericConnectorAuth from a dict +generic_connector_auth_from_dict = GenericConnectorAuth.from_dict(generic_connector_auth_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectors.md b/thousandeyes-sdk-connectors/docs/GenericConnectors.md new file mode 100644 index 00000000..ba2881ba --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectors.md @@ -0,0 +1,30 @@ +# GenericConnectors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[GenericConnector]**](GenericConnector.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnectors from a JSON string +generic_connectors_instance = GenericConnectors.from_json(json) +# print the JSON string representation of the object +print(GenericConnectors.to_json()) + +# convert the object into a dict +generic_connectors_dict = generic_connectors_instance.to_dict() +# create an instance of GenericConnectors from a dict +generic_connectors_from_dict = GenericConnectors.from_dict(generic_connectors_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md b/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md new file mode 100644 index 00000000..819d4347 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md @@ -0,0 +1,539 @@ +# thousandeyes_sdk.connectors.GenericConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_generic_connector**](GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector +[**delete_generic_connector**](GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector +[**get_generic_connector**](GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector +[**get_generic_connectors**](GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors +[**list_generic_connector_operations**](GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +[**set_generic_connector_operations**](GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +[**update_generic_connector**](GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector + + +# **create_generic_connector** +> GenericConnector create_generic_connector(generic_connector, aid=aid) + +Create connector + +Creates a new connector. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = '1234' # str | 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. (optional) + + try: + # Create connector + api_response = api_instance.create_generic_connector(generic_connector, aid=aid) + print("The response of GenericConnectorsApi->create_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generic_connector** | [**GenericConnector**](GenericConnector.md)| | + **aid** | **str**| 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. | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created connector. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_generic_connector** +> delete_generic_connector(id, aid=aid) + +Delete connector + +Deletes the connector specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = '1234' # str | 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. (optional) + + try: + # Delete connector + api_instance.delete_generic_connector(id, aid=aid) + except Exception as e: + print("Exception when calling GenericConnectorsApi->delete_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_generic_connector** +> GenericConnector get_generic_connector(id, aid=aid) + +Retrieve connector + +Retrieves details of a connector by its ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = '1234' # str | 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. (optional) + + try: + # Retrieve connector + api_response = api_instance.get_generic_connector(id, aid=aid) + print("The response of GenericConnectorsApi->get_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->get_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connector details. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_generic_connectors** +> GenericConnectors get_generic_connectors(aid=aid) + +List connectors + +Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + aid = '1234' # str | 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. (optional) + + try: + # List connectors + api_response = api_instance.get_generic_connectors(aid=aid) + print("The response of GenericConnectorsApi->get_generic_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->get_generic_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aid** | **str**| 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. | [optional] + +### Return type + +[**GenericConnectors**](GenericConnectors.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of connectors. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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) + +# **list_generic_connector_operations** +> Assignments list_generic_connector_operations(id, aid=aid) + +List operation IDs assigned to a connector + +Returns a list of operation IDs assigned to a connector. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = '1234' # str | 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. (optional) + + try: + # List operation IDs assigned to a connector + api_response = api_instance.list_generic_connector_operations(id, aid=aid) + print("The response of GenericConnectorsApi->list_generic_connector_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->list_generic_connector_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of assigned operation IDs. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_generic_connector_operations** +> Assignments set_generic_connector_operations(id, request_body, aid=aid) + +Assign operations to a connector + +Assigns operations to a connector. This replaces any existing assignments. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"] # List[str] | List of operation IDs to assign to the connector. + aid = '1234' # str | 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. (optional) + + try: + # Assign operations to a connector + api_response = api_instance.set_generic_connector_operations(id, request_body, aid=aid) + print("The response of GenericConnectorsApi->set_generic_connector_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->set_generic_connector_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **request_body** | [**List[str]**](str.md)| List of operation IDs to assign to the connector. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operations assigned successfully. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_generic_connector** +> GenericConnector update_generic_connector(id, generic_connector, aid=aid) + +Update connector + +Updates the connector specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = '1234' # str | 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. (optional) + + try: + # Update connector + api_response = api_instance.update_generic_connector(id, generic_connector, aid=aid) + print("The response of GenericConnectorsApi->update_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->update_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **generic_connector** | [**GenericConnector**](GenericConnector.md)| | + **aid** | **str**| 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. | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated connector. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/thousandeyes-sdk-connectors/docs/Header.md b/thousandeyes-sdk-connectors/docs/Header.md new file mode 100644 index 00000000..7041fe2f --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Header.md @@ -0,0 +1,30 @@ +# Header + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | The value of the header. Note that this value is obfuscated in the response, even when overwritten. | + +## Example + +```python +from thousandeyes_sdk.connectors.models.header import Header + +# TODO update the JSON string below +json = "{}" +# create an instance of Header from a JSON string +header_instance = Header.from_json(json) +# print the JSON string representation of the object +print(Header.to_json()) + +# convert the object into a dict +header_dict = header_instance.to_dict() +# create an instance of Header from a dict +header_from_dict = Header.from_dict(header_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/Link.md b/thousandeyes-sdk-connectors/docs/Link.md new file mode 100644 index 00000000..d094966b --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md b/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md new file mode 100644 index 00000000..d112fd9c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md @@ -0,0 +1,33 @@ +# OauthClientCredentialsAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OauthClientCredentialsAuthentication from a JSON string +oauth_client_credentials_authentication_instance = OauthClientCredentialsAuthentication.from_json(json) +# print the JSON string representation of the object +print(OauthClientCredentialsAuthentication.to_json()) + +# convert the object into a dict +oauth_client_credentials_authentication_dict = oauth_client_credentials_authentication_instance.to_dict() +# create an instance of OauthClientCredentialsAuthentication from a dict +oauth_client_credentials_authentication_from_dict = OauthClientCredentialsAuthentication.from_dict(oauth_client_credentials_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md b/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md new file mode 100644 index 00000000..dbff687d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md @@ -0,0 +1,37 @@ +# OauthCodeAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] +**refresh_token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_auth_url** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**code** | **str** | | +**redirect_uri** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OauthCodeAuthentication from a JSON string +oauth_code_authentication_instance = OauthCodeAuthentication.from_json(json) +# print the JSON string representation of the object +print(OauthCodeAuthentication.to_json()) + +# convert the object into a dict +oauth_code_authentication_dict = oauth_code_authentication_instance.to_dict() +# create an instance of OauthCodeAuthentication from a dict +oauth_code_authentication_from_dict = OauthCodeAuthentication.from_dict(oauth_code_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationCategory.md b/thousandeyes-sdk-connectors/docs/OperationCategory.md new file mode 100644 index 00000000..fd4c520c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationCategory.md @@ -0,0 +1,11 @@ +# OperationCategory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md b/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md new file mode 100644 index 00000000..b9202d46 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md @@ -0,0 +1,166 @@ +# thousandeyes_sdk.connectors.OperationConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_operation_connectors**](OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +[**set_operation_connectors**](OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation + + +# **get_operation_connectors** +> Assignments get_operation_connectors(type, id, aid=aid) + +Retrieve connectors assigned to an operation + +Returns a list of connectors assigned to a specific operation. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.OperationConnectorsApi(api_client) + type = 'webhooks' # str | The operation type. + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = '1234' # str | 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. (optional) + + try: + # Retrieve connectors assigned to an operation + api_response = api_instance.get_operation_connectors(type, id, aid=aid) + print("The response of OperationConnectorsApi->get_operation_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OperationConnectorsApi->get_operation_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| The operation type. | + **id** | **str**| The operation ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**404** | Not found | - | +**200** | A list of assigned connectors. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_operation_connectors** +> Assignments set_operation_connectors(type, id, request_body, aid=aid) + +Assign connectors to an operation + +Assigns one or more connectors to an operation. This replaces any existing assignments. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.OperationConnectorsApi(api_client) + type = 'webhooks' # str | The operation type. + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"] # List[str] | List of connector IDs to assign to the operation. + aid = '1234' # str | 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. (optional) + + try: + # Assign connectors to an operation + api_response = api_instance.set_operation_connectors(type, id, request_body, aid=aid) + print("The response of OperationConnectorsApi->set_operation_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OperationConnectorsApi->set_operation_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| The operation type. | + **id** | **str**| The operation ID. | + **request_body** | [**List[str]**](str.md)| List of connector IDs to assign to the operation. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**404** | Not found | - | +**200** | Operation Connectors updated successfully. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/thousandeyes-sdk-connectors/docs/OperationStatus.md b/thousandeyes-sdk-connectors/docs/OperationStatus.md new file mode 100644 index 00000000..93b8fe34 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationStatus.md @@ -0,0 +1,12 @@ +# OperationStatus + +The connectivity status of the operation to its target endpoint. Indicates whether the operation can successfully connect and communicate with the target URL. Values: 'pending' (initial state, not yet tested), 'connected' (successfully connected), 'failing' (connection or execution issues), 'unverified' (not yet verified/tested). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationType.md b/thousandeyes-sdk-connectors/docs/OperationType.md new file mode 100644 index 00000000..8ad96b35 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationType.md @@ -0,0 +1,11 @@ +# OperationType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md b/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md new file mode 100644 index 00000000..902256cb --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md @@ -0,0 +1,30 @@ +# OtherTokenAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OtherTokenAuthentication from a JSON string +other_token_authentication_instance = OtherTokenAuthentication.from_json(json) +# print the JSON string representation of the object +print(OtherTokenAuthentication.to_json()) + +# convert the object into a dict +other_token_authentication_dict = other_token_authentication_instance.to_dict() +# create an instance of OtherTokenAuthentication from a dict +other_token_authentication_from_dict = OtherTokenAuthentication.from_dict(other_token_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/SelfLinks.md b/thousandeyes-sdk-connectors/docs/SelfLinks.md new file mode 100644 index 00000000..cdf7fd8c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/SelfLinks.md @@ -0,0 +1,30 @@ +# SelfLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.self_links import SelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinks from a JSON string +self_links_instance = SelfLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinks.to_json()) + +# convert the object into a dict +self_links_dict = self_links_instance.to_dict() +# create an instance of SelfLinks from a dict +self_links_from_dict = SelfLinks.from_dict(self_links_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/UnauthorizedError.md b/thousandeyes-sdk-connectors/docs/UnauthorizedError.md new file mode 100644 index 00000000..cc560259 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ValidationError.md b/thousandeyes-sdk-connectors/docs/ValidationError.md new file mode 100644 index 00000000..ae1b252d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ValidationError.md @@ -0,0 +1,34 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] +**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md b/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md new file mode 100644 index 00000000..25f5a1e6 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md @@ -0,0 +1,31 @@ +# ValidationErrorItem + + +## Properties + +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** | **str** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorItem from a JSON string +validation_error_item_instance = ValidationErrorItem.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorItem.to_json()) + +# convert the object into a dict +validation_error_item_dict = validation_error_item_instance.to_dict() +# create an instance of ValidationErrorItem from a dict +validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/WebhookOperation.md b/thousandeyes-sdk-connectors/docs/WebhookOperation.md new file mode 100644 index 00000000..4ec1df44 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperation.md @@ -0,0 +1,39 @@ +# WebhookOperation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] [readonly] +**name** | **str** | | +**enabled** | **bool** | | [optional] +**category** | [**OperationCategory**](OperationCategory.md) | | +**status** | [**OperationStatus**](OperationStatus.md) | | +**path** | **str** | | [optional] +**payload** | **str** | Handlebars template for the payload. | [optional] +**headers** | [**List[Header]**](Header.md) | | [optional] +**var_query_params** | **str** | Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value. | [optional] +**type** | [**OperationType**](OperationType.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookOperation from a JSON string +webhook_operation_instance = WebhookOperation.from_json(json) +# print the JSON string representation of the object +print(WebhookOperation.to_json()) + +# convert the object into a dict +webhook_operation_dict = webhook_operation_instance.to_dict() +# create an instance of WebhookOperation from a dict +webhook_operation_from_dict = WebhookOperation.from_dict(webhook_operation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/WebhookOperations.md b/thousandeyes-sdk-connectors/docs/WebhookOperations.md new file mode 100644 index 00000000..4da048f4 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperations.md @@ -0,0 +1,30 @@ +# WebhookOperations + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[WebhookOperation]**](WebhookOperation.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookOperations from a JSON string +webhook_operations_instance = WebhookOperations.from_json(json) +# print the JSON string representation of the object +print(WebhookOperations.to_json()) + +# convert the object into a dict +webhook_operations_dict = webhook_operations_instance.to_dict() +# create an instance of WebhookOperations from a dict +webhook_operations_from_dict = WebhookOperations.from_dict(webhook_operations_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md b/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md new file mode 100644 index 00000000..5654fe8f --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md @@ -0,0 +1,385 @@ +# thousandeyes_sdk.connectors.WebhookOperationsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_webhook_operation**](WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation +[**delete_webhook_operation**](WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +[**get_webhook_operation**](WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +[**get_webhook_operations**](WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations +[**update_webhook_operation**](WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation + + +# **create_webhook_operation** +> WebhookOperation create_webhook_operation(webhook_operation, aid=aid) + +Create webhook operation + +Creates a new webhook operation. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation | + aid = '1234' # str | 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. (optional) + + try: + # Create webhook operation + api_response = api_instance.create_webhook_operation(webhook_operation, aid=aid) + print("The response of WebhookOperationsApi->create_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->create_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| | + **aid** | **str**| 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. | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created webhook operation. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_webhook_operation** +> delete_webhook_operation(id, aid=aid) + +Delete webhook operation + +Deletes the webhook operation specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = '1234' # str | 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. (optional) + + try: + # Delete webhook operation + api_instance.delete_webhook_operation(id, aid=aid) + except Exception as e: + print("Exception when calling WebhookOperationsApi->delete_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_webhook_operation** +> WebhookOperation get_webhook_operation(id, aid=aid) + +Retrieve webhook operation + +Retrieves details of a webhook operation by its ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = '1234' # str | 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. (optional) + + try: + # Retrieve webhook operation + api_response = api_instance.get_webhook_operation(id, aid=aid) + print("The response of WebhookOperationsApi->get_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->get_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **aid** | **str**| 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. | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook operation with the given id. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_webhook_operations** +> WebhookOperations get_webhook_operations(aid=aid) + +List webhook operations + +Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + aid = '1234' # str | 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. (optional) + + try: + # List webhook operations + api_response = api_instance.get_webhook_operations(aid=aid) + print("The response of WebhookOperationsApi->get_webhook_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->get_webhook_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aid** | **str**| 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. | [optional] + +### Return type + +[**WebhookOperations**](WebhookOperations.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of webhook operations. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[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_webhook_operation** +> WebhookOperation update_webhook_operation(id, webhook_operation, aid=aid) + +Update webhook operation + +Updates the webhook operation specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation | + aid = '1234' # str | 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. (optional) + + try: + # Update webhook operation + api_response = api_instance.update_webhook_operation(id, webhook_operation, aid=aid) + print("The response of WebhookOperationsApi->update_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->update_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| | + **aid** | **str**| 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. | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated webhook operation. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/thousandeyes-sdk-connectors/pyproject.toml b/thousandeyes-sdk-connectors/pyproject.toml new file mode 100644 index 00000000..c06761cc --- /dev/null +++ b/thousandeyes-sdk-connectors/pyproject.toml @@ -0,0 +1,82 @@ +[project] +name = "thousandeyes-sdk-connectors" +dynamic = ["version"] +readme = "README.md" +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "ThousandEyes SDK Integrations API" +license = { file = "LICENSE" } +requires-python = ">= 3.8" +dependencies = [ + "urllib3 >= 2.0.0", + "python-dateutil >=2.8.2", + "pydantic >=2.1.0", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {file = ".version"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-connectors/setup.cfg b/thousandeyes-sdk-connectors/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/thousandeyes-sdk-connectors/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py new file mode 100644 index 00000000..d6f978e4 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + + +# import models into sdk package +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.error import Error +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.link import Link +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.connectors.models.validation_error import ValidationError +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py new file mode 100644 index 00000000..929e0ab8 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py new file mode 100644 index 00000000..a9318217 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py @@ -0,0 +1,2150 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class GenericConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + 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("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def create_generic_connector( + self, + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Create connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def create_generic_connector_with_http_info( + self, + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GenericConnector]: + """Create connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def create_generic_connector_without_preload_content( + self, + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_generic_connector_serialize( + self, + generic_connector, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if generic_connector is not None: + _body_params = generic_connector + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/connectors/generic', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def delete_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def delete_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_generic_connector_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/connectors/generic/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Retrieve connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GenericConnector]: + """Retrieve connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_generic_connector_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_generic_connectors( + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnectors: + """List connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_generic_connectors_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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GenericConnectors]: + """List connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_generic_connectors_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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_generic_connectors_serialize( + self, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_generic_connector_operations( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """List operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def list_generic_connector_operations_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignments]: + """List operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def list_generic_connector_operations_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_generic_connector_operations_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic/{id}/operations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_generic_connector_operations( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Assign operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def set_generic_connector_operations_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignments]: + """Assign operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def set_generic_connector_operations_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assign operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_generic_connector_operations_serialize( + self, + id, + request_body, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/connectors/generic/{id}/operations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Update connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def update_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GenericConnector]: + """Update connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def update_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_generic_connector_serialize( + self, + id, + generic_connector, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if generic_connector is not None: + _body_params = generic_connector + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/connectors/generic/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py new file mode 100644 index 00000000..38db14d2 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py @@ -0,0 +1,688 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.assignments import Assignments + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class OperationConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + 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("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def get_operation_connectors( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Retrieve connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_operation_connectors_with_http_info( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignments]: + """Retrieve connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_operation_connectors_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_operation_connectors_serialize( + self, + type, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if type is not None: + _path_params['type'] = type + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/problem+json', + 'application/hal+json', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/{type}/{id}/connectors', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_operation_connectors( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Assign connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def set_operation_connectors_with_http_info( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignments]: + """Assign connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def set_operation_connectors_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assign connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_operation_connectors_serialize( + self, + type, + id, + request_body, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if type is not None: + _path_params['type'] = type + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/problem+json', + 'application/hal+json', + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/operations/{type}/{id}/connectors', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py new file mode 100644 index 00000000..2b6f575b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py @@ -0,0 +1,1534 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class WebhookOperationsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + 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("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def create_webhook_operation( + self, + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Create webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def create_webhook_operation_with_http_info( + self, + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebhookOperation]: + """Create webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def create_webhook_operation_without_preload_content( + self, + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_webhook_operation_serialize( + self, + webhook_operation, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if webhook_operation is not None: + _body_params = webhook_operation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/operations/webhooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def delete_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def delete_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_webhook_operation_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/operations/webhooks/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Retrieve webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebhookOperation]: + """Retrieve webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_operation_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/webhooks/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_webhook_operations( + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperations: + """List webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_webhook_operations_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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebhookOperations]: + """List webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_webhook_operations_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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_operations_serialize( + self, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/webhooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Update webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def update_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebhookOperation]: + """Update webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def update_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + 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[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: 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. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_webhook_operation_serialize( + self, + id, + webhook_operation, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if webhook_operation is not None: + _body_params = webhook_operation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/operations/webhooks/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py new file mode 100644 index 00000000..aefaf6f9 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.error import Error +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.link import Link +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.connectors.models.validation_error import ValidationError +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py new file mode 100644 index 00000000..d58ed65b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Assignments(BaseModel): + """ + A list of assigned items. + """ # noqa: E501 + items: Optional[List[StrictStr]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assignments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Assignments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": obj.get("items"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py new file mode 100644 index 00000000..5af775d0 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AuthenticationType(str, Enum): + """ + AuthenticationType + """ + + """ + allowed enum values + """ + BASIC = 'basic' + BEARER_MINUS_TOKEN = 'bearer-token' + OAUTH_MINUS_AUTH_MINUS_CODE = 'oauth-auth-code' + OAUTH_MINUS_CLIENT_MINUS_CREDENTIALS = 'oauth-client-credentials' + OTHER_MINUS_TOKEN = 'other-token' + CONJUR_MINUS_HOST = 'conjur-host' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AuthenticationType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py new file mode 100644 index 00000000..bf8c4ee7 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class BasicAuthentication(BaseModel): + """ + BasicAuthentication + """ # noqa: E501 + username: StrictStr + password: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["username", "password", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BasicAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BasicAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py new file mode 100644 index 00000000..2c78357a --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class BearerTokenAuthentication(BaseModel): + """ + BearerTokenAuthentication + """ # noqa: E501 + token: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BearerTokenAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BearerTokenAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py new file mode 100644 index 00000000..c543b221 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ConnectorType(str, Enum): + """ + ConnectorType + """ + + """ + allowed enum values + """ + GENERIC = 'generic' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConnectorType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py new file mode 100644 index 00000000..7d531d22 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py new file mode 100644 index 00000000..66f5c334 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.header import Header +from typing import Optional, Set +from typing_extensions import Self + +class GenericConnector(BaseModel): + """ + GenericConnector + """ # noqa: E501 + id: Optional[StrictStr] = None + type: ConnectorType + name: StrictStr + target: StrictStr + authentication: Optional[GenericConnectorAuth] = None + last_modified_date: Optional[StrictInt] = Field(default=None, description="The date when the connector was last modified (Unix timestamp in milliseconds).", alias="lastModifiedDate") + headers: Optional[List[Header]] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "target", "authentication", "lastModifiedDate", "headers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GenericConnector from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "last_modified_date", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of authentication + if self.authentication: + _dict['authentication'] = self.authentication.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in headers (list) + _items = [] + if self.headers: + for _item in self.headers: + if _item: + _items.append(_item.to_dict()) + _dict['headers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenericConnector from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "target": obj.get("target"), + "authentication": GenericConnectorAuth.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None, + "lastModifiedDate": obj.get("lastModifiedDate"), + "headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py new file mode 100644 index 00000000..8fb9651c --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from pydantic import StrictStr, Field, model_serializer +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GENERICCONNECTORAUTH_ONE_OF_SCHEMAS = ["BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication"] + +class GenericConnectorAuth(BaseModel): + """ + GenericConnectorAuth + """ + # data type: BasicAuthentication + oneof_schema_1_validator: Optional[BasicAuthentication] = None + # data type: BearerTokenAuthentication + oneof_schema_2_validator: Optional[BearerTokenAuthentication] = None + # data type: OtherTokenAuthentication + oneof_schema_3_validator: Optional[OtherTokenAuthentication] = None + # data type: OauthCodeAuthentication + oneof_schema_4_validator: Optional[OauthCodeAuthentication] = None + # data type: OauthClientCredentialsAuthentication + oneof_schema_5_validator: Optional[OauthClientCredentialsAuthentication] = None + actual_instance: Optional[Union[BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]] = None + one_of_schemas: Set[str] = { "BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GenericConnectorAuth.model_construct() + error_messages = [] + match = 0 + # validate data type: BasicAuthentication + if not isinstance(v, BasicAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `BasicAuthentication`") + else: + match += 1 + # validate data type: BearerTokenAuthentication + if not isinstance(v, BearerTokenAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `BearerTokenAuthentication`") + else: + match += 1 + # validate data type: OtherTokenAuthentication + if not isinstance(v, OtherTokenAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OtherTokenAuthentication`") + else: + match += 1 + # validate data type: OauthCodeAuthentication + if not isinstance(v, OauthCodeAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OauthCodeAuthentication`") + else: + match += 1 + # validate data type: OauthClientCredentialsAuthentication + if not isinstance(v, OauthClientCredentialsAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OauthClientCredentialsAuthentication`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into BasicAuthentication + try: + instance.actual_instance = BasicAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into BearerTokenAuthentication + try: + instance.actual_instance = BearerTokenAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OtherTokenAuthentication + try: + instance.actual_instance = OtherTokenAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OauthCodeAuthentication + try: + instance.actual_instance = OauthCodeAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OauthClientCredentialsAuthentication + try: + instance.actual_instance = OauthClientCredentialsAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + 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: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py new file mode 100644 index 00000000..de18de73 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class GenericConnectors(BaseModel): + """ + GenericConnectors + """ # noqa: E501 + items: Optional[List[GenericConnector]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GenericConnectors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenericConnectors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [GenericConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py new file mode 100644 index 00000000..ac7b1127 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Header(BaseModel): + """ + Header + """ # noqa: E501 + name: StrictStr + value: StrictStr = Field(description="The value of the header. Note that this value is obfuscated in the response, even when overwritten.") + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Header from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Header from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py new file mode 100644 index 00000000..73f1d4ee --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Link from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py new file mode 100644 index 00000000..fc85f2b2 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OauthClientCredentialsAuthentication(BaseModel): + """ + OauthClientCredentialsAuthentication + """ # noqa: E501 + token: Optional[StrictStr] = None + oauth_client_id: StrictStr = Field(alias="oauthClientId") + oauth_token_url: StrictStr = Field(alias="oauthTokenUrl") + oauth_client_secret: StrictStr = Field(alias="oauthClientSecret") + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "oauthClientId", "oauthTokenUrl", "oauthClientSecret", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OauthClientCredentialsAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OauthClientCredentialsAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "oauthClientId": obj.get("oauthClientId"), + "oauthTokenUrl": obj.get("oauthTokenUrl"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py new file mode 100644 index 00000000..f302384a --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OauthCodeAuthentication(BaseModel): + """ + OauthCodeAuthentication + """ # noqa: E501 + token: Optional[StrictStr] = None + refresh_token: Optional[StrictStr] = Field(default=None, alias="refreshToken") + oauth_client_id: StrictStr = Field(alias="oauthClientId") + oauth_auth_url: StrictStr = Field(alias="oauthAuthUrl") + oauth_token_url: StrictStr = Field(alias="oauthTokenUrl") + oauth_client_secret: StrictStr = Field(alias="oauthClientSecret") + code: StrictStr + redirect_uri: StrictStr = Field(alias="redirectUri") + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "refreshToken", "oauthClientId", "oauthAuthUrl", "oauthTokenUrl", "oauthClientSecret", "code", "redirectUri", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OauthCodeAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OauthCodeAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "refreshToken": obj.get("refreshToken"), + "oauthClientId": obj.get("oauthClientId"), + "oauthAuthUrl": obj.get("oauthAuthUrl"), + "oauthTokenUrl": obj.get("oauthTokenUrl"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "code": obj.get("code"), + "redirectUri": obj.get("redirectUri"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py new file mode 100644 index 00000000..299d11a0 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OperationCategory(str, Enum): + """ + OperationCategory + """ + + """ + allowed enum values + """ + ALERTS = 'alerts' + RECOMMENDATIONS = 'recommendations' + TRAFFIC_MINUS_MONITORING = 'traffic-monitoring' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationCategory from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py new file mode 100644 index 00000000..72c09a30 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OperationStatus(str, Enum): + """ + The connectivity status of the operation to its target endpoint. Indicates whether the operation can successfully connect and communicate with the target URL. Values: 'pending' (initial state, not yet tested), 'connected' (successfully connected), 'failing' (connection or execution issues), 'unverified' (not yet verified/tested). + """ + + """ + allowed enum values + """ + PENDING = 'pending' + CONNECTED = 'connected' + FAILING = 'failing' + UNVERIFIED = 'unverified' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationStatus from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py new file mode 100644 index 00000000..7dcc0cd3 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OperationType(str, Enum): + """ + OperationType + """ + + """ + allowed enum values + """ + WEBHOOK = 'webhook' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py new file mode 100644 index 00000000..6e68853b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OtherTokenAuthentication(BaseModel): + """ + OtherTokenAuthentication + """ # noqa: E501 + token: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OtherTokenAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OtherTokenAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py new file mode 100644 index 00000000..0f91f22f --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + A links object containing the self link. + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py new file mode 100644 index 00000000..53c10fcb --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnauthorizedError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py new file mode 100644 index 00000000..4bd4575b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict['errors'] = _items + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance"), + "errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py new file mode 100644 index 00000000..81afd489 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 + +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[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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py new file mode 100644 index 00000000..73271864 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class WebhookOperation(BaseModel): + """ + WebhookOperation + """ # noqa: E501 + id: Optional[StrictStr] = None + name: StrictStr + enabled: Optional[StrictBool] = None + category: OperationCategory + status: OperationStatus + path: Optional[StrictStr] = None + payload: Optional[StrictStr] = Field(default=None, description="Handlebars template for the payload.") + headers: Optional[List[Header]] = None + var_query_params: Optional[StrictStr] = Field(default=None, description="Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value.", alias="queryParams") + type: Optional[OperationType] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "name", "enabled", "category", "status", "path", "payload", "headers", "queryParams", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookOperation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in headers (list) + _items = [] + if self.headers: + for _item in self.headers: + if _item: + _items.append(_item.to_dict()) + _dict['headers'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "enabled": obj.get("enabled"), + "category": obj.get("category"), + "status": obj.get("status"), + "path": obj.get("path"), + "payload": obj.get("payload"), + "headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None, + "queryParams": obj.get("queryParams"), + "type": obj.get("type"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py new file mode 100644 index 00000000..39644e6d --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from typing import Optional, Set +from typing_extensions import Self + +class WebhookOperations(BaseModel): + """ + WebhookOperations + """ # noqa: E501 + items: Optional[List[WebhookOperation]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookOperations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookOperations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [WebhookOperation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/py.typed b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-connectors/test/__init__.py b/thousandeyes-sdk-connectors/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py new file mode 100644 index 00000000..959ede9f --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi + + +class TestGenericConnectorsApi(unittest.TestCase): + """GenericConnectorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = GenericConnectorsApi() + + def tearDown(self) -> None: + pass + + def test_create_generic_connector_models_validation(self) -> None: + """Test case for create_generic_connector request and response models""" + request_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_generic_connector_models_validation(self) -> None: + """Test case for delete_generic_connector request and response models""" + + + def test_get_generic_connector_models_validation(self) -> None: + """Test case for get_generic_connector request and response models""" + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_generic_connectors_models_validation(self) -> None: + """Test case for get_generic_connectors 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" + } + }, + "items" : [ { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }, { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnectors.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_list_generic_connector_operations_models_validation(self) -> None: + """Test case for list_generic_connector_operations 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" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_set_generic_connector_operations_models_validation(self) -> None: + """Test case for set_generic_connector_operations request and response models""" + request_body_json = """ + ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"] + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = json.loads(request_body_json) + self.assertEqual(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" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_generic_connector_models_validation(self) -> None: + """Test case for update_generic_connector request and response models""" + request_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py new file mode 100644 index 00000000..4c38cda4 --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi + + +class TestOperationConnectorsApi(unittest.TestCase): + """OperationConnectorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = OperationConnectorsApi() + + def tearDown(self) -> None: + pass + + def test_get_operation_connectors_models_validation(self) -> None: + """Test case for get_operation_connectors 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" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_set_operation_connectors_models_validation(self) -> None: + """Test case for set_operation_connectors request and response models""" + request_body_json = """ + ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"] + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = json.loads(request_body_json) + self.assertEqual(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" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-connectors/test/test_utils.py b/thousandeyes-sdk-connectors/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_utils.py @@ -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) diff --git a/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py new file mode 100644 index 00000000..719fe11b --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + + +class TestWebhookOperationsApi(unittest.TestCase): + """WebhookOperationsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebhookOperationsApi() + + def tearDown(self) -> None: + pass + + def test_create_webhook_operation_models_validation(self) -> None: + """Test case for create_webhook_operation request and response models""" + request_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_webhook_operation_models_validation(self) -> None: + """Test case for delete_webhook_operation request and response models""" + + + def test_get_webhook_operation_models_validation(self) -> None: + """Test case for get_webhook_operation request and response models""" + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_webhook_operations_models_validation(self) -> None: + """Test case for get_webhook_operations 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" + } + }, + "items" : [ { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }, { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperations.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_webhook_operation_models_validation(self) -> None: + """Test case for update_webhook_operation request and response models""" + request_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_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" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-credentials/README.md b/thousandeyes-sdk-credentials/README.md index 5a955caa..13940608 100644 --- a/thousandeyes-sdk-credentials/README.md +++ b/thousandeyes-sdk-credentials/README.md @@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-credentials/test/test_credentials_api.py b/thousandeyes-sdk-credentials/test/test_credentials_api.py index be748492..409cd1a3 100644 --- a/thousandeyes-sdk-credentials/test/test_credentials_api.py +++ b/thousandeyes-sdk-credentials/test/test_credentials_api.py @@ -34,7 +34,8 @@ class TestCredentialsApi(unittest.TestCase): { "name" : "Example Credential 1", "value" : "Example Credential 1 Password" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) @@ -154,7 +155,8 @@ class TestCredentialsApi(unittest.TestCase): { "name" : "Example Credential 1", "value" : "Example Credential 1 Password" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index 07d167f2..21fe4f5b 100644 --- a/thousandeyes-sdk-dashboards/README.md +++ b/thousandeyes-sdk-dashboards/README.md @@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-dashboards/docs/ApiNumbersCardData.md b/thousandeyes-sdk-dashboards/docs/ApiNumbersCardData.md index aba0a518..8b166fcf 100644 --- a/thousandeyes-sdk-dashboards/docs/ApiNumbersCardData.md +++ b/thousandeyes-sdk-dashboards/docs/ApiNumbersCardData.md @@ -7,6 +7,7 @@ The data displayed on a numbers card. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **card_id** | **str** | Identifier of the card. | [optional] +**card_name** | **str** | Name of the card. | [optional] **start_date** | **datetime** | UTC start date of the data shown in the API output (ISO date-time format). | [optional] **end_date** | **datetime** | UTC end date of the data shown in the API output (ISO date-time format). | [optional] **previous_value** | **float** | Previous value if `compareToPreviousValue == true` in configuration. | [optional] diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py index 758b07ae..61e3f101 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py @@ -29,6 +29,7 @@ class ApiNumbersCardData(BaseModel): The data displayed on a numbers card. """ # noqa: E501 card_id: Optional[StrictStr] = Field(default=None, description="Identifier of the card.", alias="cardId") + card_name: Optional[StrictStr] = Field(default=None, description="Name of the card.", alias="cardName") start_date: Optional[datetime] = Field(default=None, description="UTC start date of the data shown in the API output (ISO date-time format).", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="UTC end date of the data shown in the API output (ISO date-time format).", alias="endDate") previous_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Previous value if `compareToPreviousValue == true` in configuration.", alias="previousValue") @@ -39,7 +40,7 @@ class ApiNumbersCardData(BaseModel): status: Optional[StrictStr] = Field(default=None, description="Message for not fully configured card or no data.") alert_suppression_windows: Optional[List[ApiDashboardAsw]] = Field(default=None, alias="alertSuppressionWindows") links: Optional[SelfLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["cardId", "startDate", "endDate", "previousValue", "binSize", "timestamp", "numberOfDataPoints", "value", "status", "alertSuppressionWindows", "_links"] + __properties: ClassVar[List[str]] = ["cardId", "cardName", "startDate", "endDate", "previousValue", "binSize", "timestamp", "numberOfDataPoints", "value", "status", "alertSuppressionWindows", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -104,6 +105,7 @@ class ApiNumbersCardData(BaseModel): _obj = cls.model_validate({ "cardId": obj.get("cardId"), + "cardName": obj.get("cardName"), "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), "previousValue": obj.get("previousValue"), diff --git a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py index feb8157a..b91f4bef 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py @@ -39,7 +39,8 @@ class TestDashboardSnapshotsApi(unittest.TestCase): "timezone" : "PST", "startDate" : "2023-05-16T10:14:28Z", "expirationDate" : "2023-05-16T10:14:28Z" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.GenerateDashboardSnapshotRequest.from_json(request_body_json) @@ -385,6 +386,7 @@ class TestDashboardSnapshotsApi(unittest.TestCase): "totalAlerts" : 500, "cards" : [ { "numberOfDataPoints" : 24192, + "cardName" : "Card Name", "endDate" : "2023-05-16T10:14:28Z", "_links" : { "self" : { @@ -426,6 +428,7 @@ class TestDashboardSnapshotsApi(unittest.TestCase): "status" : "No data" }, { "numberOfDataPoints" : 24192, + "cardName" : "Card Name", "endDate" : "2023-05-16T10:14:28Z", "_links" : { "self" : { @@ -1293,7 +1296,8 @@ class TestDashboardSnapshotsApi(unittest.TestCase): { "snapshotExpirationDate" : "2023-05-16T10:14:28Z", "expirationDate" : "2023-05-16 10:14:28" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.UpdateSnapshotExpirationDateApiRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py index 212ba928..da5fd91d 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py @@ -151,7 +151,8 @@ class TestDashboardsApi(unittest.TestCase): "modifiedBy" : "1", "isGlobalOverride" : true, "aid" : "1234" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) @@ -483,6 +484,7 @@ class TestDashboardsApi(unittest.TestCase): "totalAlerts" : 500, "cards" : [ { "numberOfDataPoints" : 24192, + "cardName" : "Card Name", "endDate" : "2023-05-16T10:14:28Z", "_links" : { "self" : { @@ -524,6 +526,7 @@ class TestDashboardsApi(unittest.TestCase): "status" : "No data" }, { "numberOfDataPoints" : 24192, + "cardName" : "Card Name", "endDate" : "2023-05-16T10:14:28Z", "_links" : { "self" : { @@ -1137,6 +1140,7 @@ class TestDashboardsApi(unittest.TestCase): response_body_json = """ { "numberOfDataPoints" : 24192, + "cardName" : "Card Name", "endDate" : "2023-05-16T10:14:28Z", "_links" : { "self" : { @@ -1373,7 +1377,8 @@ class TestDashboardsApi(unittest.TestCase): "modifiedBy" : "1", "isGlobalOverride" : true, "aid" : "1234" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py index 394b9b8a..90bf02ae 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py @@ -57,7 +57,8 @@ class TestDashboardsFiltersApi(unittest.TestCase): } ], "name" : "cea-filter", "description" : "Global filter for CEA widgets" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) @@ -325,7 +326,8 @@ class TestDashboardsFiltersApi(unittest.TestCase): } ], "name" : "cea-filter", "description" : "Global filter for CEA widgets" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-emulation/README.md b/thousandeyes-sdk-emulation/README.md index 99d202e4..e4f97a03 100644 --- a/thousandeyes-sdk-emulation/README.md +++ b/thousandeyes-sdk-emulation/README.md @@ -9,7 +9,7 @@ To access Emulation API operations, the following permissions are required: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-emulation/test/test_emulation_api.py b/thousandeyes-sdk-emulation/test/test_emulation_api.py index b02595dd..c52e8fbf 100644 --- a/thousandeyes-sdk-emulation/test/test_emulation_api.py +++ b/thousandeyes-sdk-emulation/test/test_emulation_api.py @@ -35,7 +35,8 @@ class TestEmulationApi(unittest.TestCase): "width" : 1024, "category" : "desktop", "height" : 768 - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.emulation.models.EmulatedDevice.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES index f94b6775..4ebd82d0 100644 --- a/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES @@ -13,9 +13,12 @@ docs/AgentThresholdFilters.md docs/AgentTransfer.md docs/AgentTransferRequest.md docs/AgentTransferStatus.md +docs/BatteryLevel.md +docs/BatteryMetrics.md docs/BrowserType.md docs/BulkAgentTransferRequest.md docs/BulkAgentTransferResponse.md +docs/CellularProfile.md docs/ConditionalOperator.md docs/ConnectionString.md docs/EndpointAgent.md @@ -69,9 +72,12 @@ src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py +src/thousandeyes_sdk/endpoint_agents/models/battery_level.py +src/thousandeyes_sdk/endpoint_agents/models/battery_metrics.py src/thousandeyes_sdk/endpoint_agents/models/browser_type.py src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py +src/thousandeyes_sdk/endpoint_agents/models/cellular_profile.py src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py src/thousandeyes_sdk/endpoint_agents/models/connection_string.py src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py diff --git a/thousandeyes-sdk-endpoint-agents/README.md b/thousandeyes-sdk-endpoint-agents/README.md index 55caef08..5d3dd2f0 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -5,7 +5,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -122,9 +122,12 @@ Class | Method | HTTP request | Description - [AgentTransfer](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransfer.md) - [AgentTransferRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransferRequest.md) - [AgentTransferStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransferStatus.md) + - [BatteryLevel](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BatteryLevel.md) + - [BatteryMetrics](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BatteryMetrics.md) - [BrowserType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BrowserType.md) - [BulkAgentTransferRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BulkAgentTransferRequest.md) - [BulkAgentTransferResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BulkAgentTransferResponse.md) + - [CellularProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/CellularProfile.md) - [ConditionalOperator](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ConditionalOperator.md) - [ConnectionString](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ConnectionString.md) - [EndpointAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md) diff --git a/thousandeyes-sdk-endpoint-agents/docs/BatteryLevel.md b/thousandeyes-sdk-endpoint-agents/docs/BatteryLevel.md new file mode 100644 index 00000000..5703a2fe --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/docs/BatteryLevel.md @@ -0,0 +1,12 @@ +# BatteryLevel + +Battery level indicator. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-agents/docs/BatteryMetrics.md b/thousandeyes-sdk-endpoint-agents/docs/BatteryMetrics.md new file mode 100644 index 00000000..edae7110 --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/docs/BatteryMetrics.md @@ -0,0 +1,31 @@ +# BatteryMetrics + +Battery metrics for the endpoint agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**battery_level** | [**BatteryLevel**](BatteryLevel.md) | | +**battery_level_normalized_percent** | **float** | Battery level as a normalized percentage (0-1). | + +## Example + +```python +from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of BatteryMetrics from a JSON string +battery_metrics_instance = BatteryMetrics.from_json(json) +# print the JSON string representation of the object +print(BatteryMetrics.to_json()) + +# convert the object into a dict +battery_metrics_dict = battery_metrics_instance.to_dict() +# create an instance of BatteryMetrics from a dict +battery_metrics_from_dict = BatteryMetrics.from_dict(battery_metrics_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-agents/docs/CellularProfile.md b/thousandeyes-sdk-endpoint-agents/docs/CellularProfile.md new file mode 100644 index 00000000..f4ba632d --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/docs/CellularProfile.md @@ -0,0 +1,39 @@ +# CellularProfile + +Cellular network profile information for a mobile endpoint agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**carrier_name** | **str** | Carrier name | [optional] +**network_gen** | **str** | Cellular network generation. | [optional] +**network_subtype** | **str** | A real network subtype. It may be different from an advertised network type. | [optional] +**advertised_network_gen** | **str** | Cellular network generation. | [optional] +**advertised_network_subtype** | **str** | Advertised Network subtype | [optional] +**rssi** | **float** | Received Signal Strength Indicator in dBm. Values are always negative. | [optional] +**rsrp** | **float** | Reference Signal Received Power in dBm. Values are always negative. | [optional] +**rscp** | **float** | Received Signal Code Power in dBm. Values are always negative or zero. | [optional] +**rsrq** | **float** | Reference Signal Received Quality in dBm. Values are always negative. | [optional] +**sinr** | **float** | Signal to Interference and Noise Ratio in dBm. It can be negative or positive. | [optional] + +## Example + +```python +from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile + +# TODO update the JSON string below +json = "{}" +# create an instance of CellularProfile from a JSON string +cellular_profile_instance = CellularProfile.from_json(json) +# print the JSON string representation of the object +print(CellularProfile.to_json()) + +# convert the object into a dict +cellular_profile_dict = cellular_profile_instance.to_dict() +# create an instance of CellularProfile from a dict +cellular_profile_from_dict = CellularProfile.from_dict(cellular_profile_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md index 33b794f2..6da19439 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md +++ b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md @@ -35,6 +35,8 @@ Name | Type | Description | Notes **license_type** | [**AgentLicenseType**](AgentLicenseType.md) | | [optional] **tcp_driver_available** | **bool** | Status of TCP test support on the agent. | [optional] [readonly] **npcap_version** | **str** | For Windows agents, the version of the NPCAP driver that the agent has loaded. | [optional] [readonly] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] **links** | [**SelfLinks**](SelfLinks.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md index 77fc9231..563ad6b8 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md +++ b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md @@ -97,7 +97,7 @@ void (empty response body) Bulk transfer agents -Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. +Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk. ### Example diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py index afc6e64a..4367b10e 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py @@ -31,9 +31,12 @@ from thousandeyes_sdk.endpoint_agents.models.agent_threshold_filters import Agen from thousandeyes_sdk.endpoint_agents.models.agent_transfer import AgentTransfer from thousandeyes_sdk.endpoint_agents.models.agent_transfer_request import AgentTransferRequest from thousandeyes_sdk.endpoint_agents.models.agent_transfer_status import AgentTransferStatus +from thousandeyes_sdk.endpoint_agents.models.battery_level import BatteryLevel +from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics from thousandeyes_sdk.endpoint_agents.models.browser_type import BrowserType from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_request import BulkAgentTransferRequest from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import BulkAgentTransferResponse +from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_agents.models.conditional_operator import ConditionalOperator from thousandeyes_sdk.endpoint_agents.models.connection_string import ConnectionString from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py index 5ebe60ec..c20d12f0 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py @@ -383,7 +383,7 @@ class EndpointAgentsTransferApi: ) -> BulkAgentTransferResponse: """Bulk transfer agents - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk. :param aid: 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. :type aid: str @@ -460,7 +460,7 @@ class EndpointAgentsTransferApi: ) -> ApiResponse[BulkAgentTransferResponse]: """Bulk transfer agents - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk. :param aid: 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. :type aid: str @@ -537,7 +537,7 @@ class EndpointAgentsTransferApi: ) -> RESTResponseType: """Bulk transfer agents - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk. :param aid: 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. :type aid: str diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py index f7a5d1d5..27f572d6 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py @@ -25,9 +25,12 @@ from thousandeyes_sdk.endpoint_agents.models.agent_threshold_filters import Agen from thousandeyes_sdk.endpoint_agents.models.agent_transfer import AgentTransfer from thousandeyes_sdk.endpoint_agents.models.agent_transfer_request import AgentTransferRequest from thousandeyes_sdk.endpoint_agents.models.agent_transfer_status import AgentTransferStatus +from thousandeyes_sdk.endpoint_agents.models.battery_level import BatteryLevel +from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics from thousandeyes_sdk.endpoint_agents.models.browser_type import BrowserType from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_request import BulkAgentTransferRequest from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import BulkAgentTransferResponse +from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_agents.models.conditional_operator import ConditionalOperator from thousandeyes_sdk.endpoint_agents.models.connection_string import ConnectionString from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_level.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_level.py new file mode 100644 index 00000000..f911b60e --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_level.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BatteryLevel(str, Enum): + """ + Battery level indicator. + """ + + """ + allowed enum values + """ + HIGH = 'high' + MEDIUM = 'medium' + LOW = 'low' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BatteryLevel from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_metrics.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_metrics.py new file mode 100644 index 00000000..5e0f15ad --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/battery_metrics.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from thousandeyes_sdk.endpoint_agents.models.battery_level import BatteryLevel +from typing import Optional, Set +from typing_extensions import Self + +class BatteryMetrics(BaseModel): + """ + Battery metrics for the endpoint agent. + """ # noqa: E501 + battery_level: BatteryLevel = Field(alias="batteryLevel") + battery_level_normalized_percent: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Battery level as a normalized percentage (0-1).", alias="batteryLevelNormalizedPercent") + __properties: ClassVar[List[str]] = ["batteryLevel", "batteryLevelNormalizedPercent"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BatteryMetrics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BatteryMetrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "batteryLevel": obj.get("batteryLevel"), + "batteryLevelNormalizedPercent": obj.get("batteryLevelNormalizedPercent") + }) + return _obj + + diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/cellular_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/cellular_profile.py new file mode 100644 index 00000000..561c48d0 --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/cellular_profile.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CellularProfile(BaseModel): + """ + Cellular network profile information for a mobile endpoint agent. + """ # noqa: E501 + carrier_name: Optional[StrictStr] = Field(default=None, description="Carrier name", alias="carrierName") + network_gen: Optional[StrictStr] = Field(default=None, description="Cellular network generation.", alias="networkGen") + network_subtype: Optional[StrictStr] = Field(default=None, description="A real network subtype. It may be different from an advertised network type.", alias="networkSubtype") + advertised_network_gen: Optional[StrictStr] = Field(default=None, description="Cellular network generation.", alias="advertisedNetworkGen") + advertised_network_subtype: Optional[StrictStr] = Field(default=None, description="Advertised Network subtype", alias="advertisedNetworkSubtype") + rssi: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Received Signal Strength Indicator in dBm. Values are always negative.") + rsrp: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reference Signal Received Power in dBm. Values are always negative.") + rscp: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Received Signal Code Power in dBm. Values are always negative or zero.") + rsrq: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reference Signal Received Quality in dBm. Values are always negative.") + sinr: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Signal to Interference and Noise Ratio in dBm. It can be negative or positive.") + __properties: ClassVar[List[str]] = ["carrierName", "networkGen", "networkSubtype", "advertisedNetworkGen", "advertisedNetworkSubtype", "rssi", "rsrp", "rscp", "rsrq", "sinr"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CellularProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CellularProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "carrierName": obj.get("carrierName"), + "networkGen": obj.get("networkGen"), + "networkSubtype": obj.get("networkSubtype"), + "advertisedNetworkGen": obj.get("advertisedNetworkGen"), + "advertisedNetworkSubtype": obj.get("advertisedNetworkSubtype"), + "rssi": obj.get("rssi"), + "rsrp": obj.get("rsrp"), + "rscp": obj.get("rscp"), + "rsrq": obj.get("rsrq"), + "sinr": obj.get("sinr") + }) + return _obj + + diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py index 58746c04..942d7800 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py @@ -20,6 +20,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_agents.models.agent_license_type import AgentLicenseType +from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation from thousandeyes_sdk.endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails from thousandeyes_sdk.endpoint_agents.models.endpoint_client import EndpointClient @@ -65,8 +67,10 @@ class EndpointAgent(BaseModel): license_type: Optional[AgentLicenseType] = Field(default=None, alias="licenseType") tcp_driver_available: Optional[StrictBool] = Field(default=None, description="Status of TCP test support on the agent.", alias="tcpDriverAvailable") npcap_version: Optional[StrictStr] = Field(default=None, description="For Windows agents, the version of the NPCAP driver that the agent has loaded.", alias="npcapVersion") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") links: Optional[SelfLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "serialNumber", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"] + __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "serialNumber", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "batteryMetrics", "cellularProfile", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -184,6 +188,12 @@ class EndpointAgent(BaseModel): # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() @@ -228,6 +238,8 @@ class EndpointAgent(BaseModel): "licenseType": obj.get("licenseType"), "tcpDriverAvailable": obj.get("tcpDriverAvailable"), "npcapVersion": obj.get("npcapVersion"), + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py index 3fc03ecf..606b103b 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py @@ -96,11 +96,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -265,11 +281,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -408,7 +440,8 @@ class TestEndpointAgentsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentSearchRequest.from_json(request_body_json) @@ -489,11 +522,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -648,11 +697,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -818,11 +883,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1011,11 +1092,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1170,11 +1267,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1306,7 +1419,8 @@ class TestEndpointAgentsApi(unittest.TestCase): { "licenseType" : "essentials", "name" : "Office Printer" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentUpdate.from_json(request_body_json) @@ -1373,11 +1487,27 @@ class TestEndpointAgentsApi(unittest.TestCase): "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py index e86a3c77..72d263c3 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py @@ -33,7 +33,8 @@ class TestEndpointAgentsTransferApi(unittest.TestCase): request_body_json = """ { "toAid" : "1234" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentTransferRequest.from_json(request_body_json) @@ -53,7 +54,8 @@ class TestEndpointAgentsTransferApi(unittest.TestCase): "fromAid" : "1234", "toAid" : "12345" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_agents.models.BulkAgentTransferRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-instant-tests/README.md b/thousandeyes-sdk-endpoint-instant-tests/README.md index 5728a842..bfd213db 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -13,7 +13,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py index e380a2f5..5ed04a57 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py @@ -41,7 +41,8 @@ class TestAgentToServerEndpointInstantScheduledTestsApi(unittest.TestCase): "endpointAgentLabels" : [ "567", "214" ], "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointAgentToServerInstantTest.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py index 55355059..fa8af5dc 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py @@ -52,7 +52,8 @@ class TestHTTPServerEndpointInstantScheduledTestsApi(unittest.TestCase): "testName" : "Test name", "username" : "username", "sslVersionId" : "0" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointHttpServerInstantTest.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index 344dec67..1d7e8a1e 100644 --- a/thousandeyes-sdk-endpoint-labels/README.md +++ b/thousandeyes-sdk-endpoint-labels/README.md @@ -4,7 +4,7 @@ Manage labels applied to endpoint agents using this API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py b/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py index adef3773..72b8cba8 100644 --- a/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py +++ b/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py @@ -45,7 +45,8 @@ class TestEndpointAgentLabelsApi(unittest.TestCase): "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], "key" : "vpn-client-network" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_labels.models.LabelRequest.from_json(request_body_json) @@ -227,7 +228,8 @@ class TestEndpointAgentLabelsApi(unittest.TestCase): "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], "key" : "vpn-client-network" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_labels.models.Label.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES index 004e8739..121ee00a 100644 --- a/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES @@ -4,6 +4,9 @@ README.md docs/ApplicationMetrics.md docs/ApplicationScoreQuality.md docs/AsnDetails.md +docs/BatteryLevel.md +docs/BatteryMetrics.md +docs/CellularProfile.md docs/ConditionalOperator.md docs/CpuUtilization.md docs/DynamicBaseEndpointTestResult.md @@ -174,6 +177,9 @@ src/thousandeyes_sdk/endpoint_test_results/models/__init__.py src/thousandeyes_sdk/endpoint_test_results/models/application_metrics.py src/thousandeyes_sdk/endpoint_test_results/models/application_score_quality.py src/thousandeyes_sdk/endpoint_test_results/models/asn_details.py +src/thousandeyes_sdk/endpoint_test_results/models/battery_level.py +src/thousandeyes_sdk/endpoint_test_results/models/battery_metrics.py +src/thousandeyes_sdk/endpoint_test_results/models/cellular_profile.py src/thousandeyes_sdk/endpoint_test_results/models/conditional_operator.py src/thousandeyes_sdk/endpoint_test_results/models/cpu_utilization.py src/thousandeyes_sdk/endpoint_test_results/models/dynamic_base_endpoint_test_result.py diff --git a/thousandeyes-sdk-endpoint-test-results/README.md b/thousandeyes-sdk-endpoint-test-results/README.md index 9be5519d..ce4c0640 100644 --- a/thousandeyes-sdk-endpoint-test-results/README.md +++ b/thousandeyes-sdk-endpoint-test-results/README.md @@ -3,7 +3,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -125,6 +125,9 @@ Class | Method | HTTP request | Description - [ApplicationMetrics](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/ApplicationMetrics.md) - [ApplicationScoreQuality](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/ApplicationScoreQuality.md) - [AsnDetails](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/AsnDetails.md) + - [BatteryLevel](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/BatteryLevel.md) + - [BatteryMetrics](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/BatteryMetrics.md) + - [CellularProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/CellularProfile.md) - [ConditionalOperator](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/ConditionalOperator.md) - [CpuUtilization](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/CpuUtilization.md) - [DynamicBaseEndpointTestResult](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/DynamicBaseEndpointTestResult.md) diff --git a/thousandeyes-sdk-endpoint-test-results/docs/BatteryLevel.md b/thousandeyes-sdk-endpoint-test-results/docs/BatteryLevel.md new file mode 100644 index 00000000..5703a2fe --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/docs/BatteryLevel.md @@ -0,0 +1,12 @@ +# BatteryLevel + +Battery level indicator. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-test-results/docs/BatteryMetrics.md b/thousandeyes-sdk-endpoint-test-results/docs/BatteryMetrics.md new file mode 100644 index 00000000..3ba65639 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/docs/BatteryMetrics.md @@ -0,0 +1,31 @@ +# BatteryMetrics + +Battery metrics for the endpoint agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**battery_level** | [**BatteryLevel**](BatteryLevel.md) | | +**battery_level_normalized_percent** | **float** | Battery level as a normalized percentage (0-1). | + +## Example + +```python +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of BatteryMetrics from a JSON string +battery_metrics_instance = BatteryMetrics.from_json(json) +# print the JSON string representation of the object +print(BatteryMetrics.to_json()) + +# convert the object into a dict +battery_metrics_dict = battery_metrics_instance.to_dict() +# create an instance of BatteryMetrics from a dict +battery_metrics_from_dict = BatteryMetrics.from_dict(battery_metrics_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-test-results/docs/CellularProfile.md b/thousandeyes-sdk-endpoint-test-results/docs/CellularProfile.md new file mode 100644 index 00000000..02ecf723 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/docs/CellularProfile.md @@ -0,0 +1,39 @@ +# CellularProfile + +Cellular network profile information for a mobile endpoint agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**carrier_name** | **str** | Carrier name | [optional] +**network_gen** | **str** | Cellular network generation. | [optional] +**network_subtype** | **str** | A real network subtype. It may be different from an advertised network type. | [optional] +**advertised_network_gen** | **str** | Cellular network generation. | [optional] +**advertised_network_subtype** | **str** | Advertised Network subtype | [optional] +**rssi** | **float** | Received Signal Strength Indicator in dBm. Values are always negative. | [optional] +**rsrp** | **float** | Reference Signal Received Power in dBm. Values are always negative. | [optional] +**rscp** | **float** | Received Signal Code Power in dBm. Values are always negative or zero. | [optional] +**rsrq** | **float** | Reference Signal Received Quality in dBm. Values are always negative. | [optional] +**sinr** | **float** | Signal to Interference and Noise Ratio in dBm. It can be negative or positive. | [optional] + +## Example + +```python +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile + +# TODO update the JSON string below +json = "{}" +# create an instance of CellularProfile from a JSON string +cellular_profile_instance = CellularProfile.from_json(json) +# print the JSON string representation of the object +print(CellularProfile.to_json()) + +# convert the object into a dict +cellular_profile_dict = cellular_profile_instance.to_dict() +# create an instance of CellularProfile from a dict +cellular_profile_from_dict = CellularProfile.from_dict(cellular_profile_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-endpoint-test-results/docs/EndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/EndpointTestResult.md index 6469a741..f79d8f29 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/EndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/EndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResult.md index 06314f9d..63529b3b 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **score** | [**EndpointHttpDataPointScore**](EndpointHttpDataPointScore.md) | | [optional] **connect_time** | **int** | Time required to establish a TCP connection to the server in milliseconds. | [optional] [readonly] **dns_time** | **int** | Time required to resolve DNS in milliseconds. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md index a54f20eb..955da4be 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md @@ -22,6 +22,9 @@ Name | Type | Description | Notes **proxy_score** | [**EndpointProbeProxyScore**](EndpointProbeProxyScore.md) | | [optional] **connection_score** | [**EndpointProbeConnectionScore**](EndpointProbeConnectionScore.md) | | [optional] **agent_score** | [**EndpointProbeAgentScore**](EndpointProbeAgentScore.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **coordinates** | [**RealUserEndpointTestCoordinates**](RealUserEndpointTestCoordinates.md) | | [optional] **network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] **icmp_traceroute** | [**Traceroute**](Traceroute.md) | | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md index 8139ac31..871cf85d 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md @@ -22,6 +22,9 @@ Name | Type | Description | Notes **proxy_score** | [**EndpointProbeProxyScore**](EndpointProbeProxyScore.md) | | [optional] **connection_score** | [**EndpointProbeConnectionScore**](EndpointProbeConnectionScore.md) | | [optional] **agent_score** | [**EndpointProbeAgentScore**](EndpointProbeAgentScore.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicEndpointTestResult.md index 4a46b09d..da0c074d 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **avg_latency** | **float** | Average RTT for packets sent to destination. | [optional] [readonly] **error_details** | **str** | Error details, if an error was encountered. | [optional] [readonly] **jitter** | **float** | Standard deviation of latency. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResult.md index adfa5e87..67269924 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **avg_latency** | **float** | Average RTT for packets sent to destination. | [optional] [readonly] **error_details** | **str** | Error details, if an error was encountered. | [optional] [readonly] **jitter** | **float** | Standard deviation of latency. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisBaseEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisBaseEndpointTestResult.md index b043aeef..5f95d2fa 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisBaseEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisBaseEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] **server** | **str** | Target server, including port. | [optional] [readonly] **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicEndpointTestResult.md index db9d7884..4dfadb5b 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] **server** | **str** | Target server, including port. | [optional] [readonly] **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResult.md index 5b5ef5ef..3a266bf2 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] **server** | **str** | Target server, including port. | [optional] [readonly] **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicEndpointTestResult.md index 37123032..fe5092f4 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] **server** | **str** | Target server, including port. | [optional] [readonly] **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResult.md index f4939fd1..83bb7820 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResult.md @@ -15,6 +15,9 @@ Name | Type | Description | Notes **original_target_profile** | [**TargetProfile**](TargetProfile.md) | | [optional] **user_profile** | [**UserProfile**](UserProfile.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional] +**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] **asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] **server** | **str** | Target server, including port. | [optional] [readonly] **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py index 692df1d4..f6984f17 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py @@ -25,6 +25,9 @@ from thousandeyes_sdk.endpoint_test_results.api.real_user_endpoint_test_results_ from thousandeyes_sdk.endpoint_test_results.models.application_metrics import ApplicationMetrics from thousandeyes_sdk.endpoint_test_results.models.application_score_quality import ApplicationScoreQuality from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_level import BatteryLevel +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.conditional_operator import ConditionalOperator from thousandeyes_sdk.endpoint_test_results.models.cpu_utilization import CpuUtilization from thousandeyes_sdk.endpoint_test_results.models.dynamic_base_endpoint_test_result import DynamicBaseEndpointTestResult diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py index fb020255..9ab3092d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py @@ -16,6 +16,9 @@ from thousandeyes_sdk.endpoint_test_results.models.application_metrics import ApplicationMetrics from thousandeyes_sdk.endpoint_test_results.models.application_score_quality import ApplicationScoreQuality from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_level import BatteryLevel +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.conditional_operator import ConditionalOperator from thousandeyes_sdk.endpoint_test_results.models.cpu_utilization import CpuUtilization from thousandeyes_sdk.endpoint_test_results.models.dynamic_base_endpoint_test_result import DynamicBaseEndpointTestResult diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_level.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_level.py new file mode 100644 index 00000000..053d8460 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_level.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BatteryLevel(str, Enum): + """ + Battery level indicator. + """ + + """ + allowed enum values + """ + HIGH = 'high' + MEDIUM = 'medium' + LOW = 'low' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BatteryLevel from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_metrics.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_metrics.py new file mode 100644 index 00000000..fda56e28 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/battery_metrics.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from thousandeyes_sdk.endpoint_test_results.models.battery_level import BatteryLevel +from typing import Optional, Set +from typing_extensions import Self + +class BatteryMetrics(BaseModel): + """ + Battery metrics for the endpoint agent. + """ # noqa: E501 + battery_level: BatteryLevel = Field(alias="batteryLevel") + battery_level_normalized_percent: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Battery level as a normalized percentage (0-1).", alias="batteryLevelNormalizedPercent") + __properties: ClassVar[List[str]] = ["batteryLevel", "batteryLevelNormalizedPercent"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BatteryMetrics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BatteryMetrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "batteryLevel": obj.get("batteryLevel"), + "batteryLevelNormalizedPercent": obj.get("batteryLevelNormalizedPercent") + }) + return _obj + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cellular_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cellular_profile.py new file mode 100644 index 00000000..0cea8ad8 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cellular_profile.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CellularProfile(BaseModel): + """ + Cellular network profile information for a mobile endpoint agent. + """ # noqa: E501 + carrier_name: Optional[StrictStr] = Field(default=None, description="Carrier name", alias="carrierName") + network_gen: Optional[StrictStr] = Field(default=None, description="Cellular network generation.", alias="networkGen") + network_subtype: Optional[StrictStr] = Field(default=None, description="A real network subtype. It may be different from an advertised network type.", alias="networkSubtype") + advertised_network_gen: Optional[StrictStr] = Field(default=None, description="Cellular network generation.", alias="advertisedNetworkGen") + advertised_network_subtype: Optional[StrictStr] = Field(default=None, description="Advertised Network subtype", alias="advertisedNetworkSubtype") + rssi: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Received Signal Strength Indicator in dBm. Values are always negative.") + rsrp: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reference Signal Received Power in dBm. Values are always negative.") + rscp: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Received Signal Code Power in dBm. Values are always negative or zero.") + rsrq: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reference Signal Received Quality in dBm. Values are always negative.") + sinr: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Signal to Interference and Noise Ratio in dBm. It can be negative or positive.") + __properties: ClassVar[List[str]] = ["carrierName", "networkGen", "networkSubtype", "advertisedNetworkGen", "advertisedNetworkSubtype", "rssi", "rsrp", "rscp", "rsrq", "sinr"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + 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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CellularProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CellularProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "carrierName": obj.get("carrierName"), + "networkGen": obj.get("networkGen"), + "networkSubtype": obj.get("networkSubtype"), + "advertisedNetworkGen": obj.get("advertisedNetworkGen"), + "advertisedNetworkSubtype": obj.get("advertisedNetworkSubtype"), + "rssi": obj.get("rssi"), + "rsrp": obj.get("rsrp"), + "rscp": obj.get("rscp"), + "rsrq": obj.get("rsrq"), + "sinr": obj.get("sinr") + }) + return _obj + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_result.py index a88674fc..3038a32d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_result.py @@ -18,7 +18,10 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -40,7 +43,10 @@ class EndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile"] + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform"] model_config = ConfigDict( populate_by_name=True, @@ -105,6 +111,12 @@ class EndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() return _dict @classmethod @@ -126,7 +138,10 @@ class EndpointTestResult(BaseModel): "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform") }) return _obj diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_result.py index 36036922..ce7b92ef 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_result.py @@ -18,10 +18,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_http_data_point_score import EndpointHttpDataPointScore from thousandeyes_sdk.endpoint_test_results.models.http_endpoint_test_result_headers import HttpEndpointTestResultHeaders from thousandeyes_sdk.endpoint_test_results.models.http_error_type import HttpErrorType from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -43,6 +46,9 @@ class HttpEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None score: Optional[EndpointHttpDataPointScore] = None connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server in milliseconds.", alias="connectTime") dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds.", alias="dnsTime") @@ -59,7 +65,7 @@ class HttpEndpointTestResult(BaseModel): wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds.", alias="waitTime") wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes.", alias="wireSize") throughput: Optional[StrictInt] = Field(default=None, description="Amount of data transmitted, in bytes.") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "score", "connectTime", "dnsTime", "errorType", "errorDetails", "headers", "numRedirects", "receiveTime", "redirectTime", "responseCode", "responseTime", "sslTime", "totalTime", "waitTime", "wireSize", "throughput"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "score", "connectTime", "dnsTime", "errorType", "errorDetails", "headers", "numRedirects", "receiveTime", "redirectTime", "responseCode", "responseTime", "sslTime", "totalTime", "waitTime", "wireSize", "throughput"] model_config = ConfigDict( populate_by_name=True, @@ -150,6 +156,12 @@ class HttpEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of score if self.score: _dict['score'] = self.score.to_dict() @@ -178,6 +190,9 @@ class HttpEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "score": EndpointHttpDataPointScore.from_dict(obj["score"]) if obj.get("score") is not None else None, "connectTime": obj.get("connectTime"), "dnsTime": obj.get("dnsTime"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py index 721a4322..c376c957 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py @@ -19,6 +19,8 @@ import json from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_agent_score import EndpointProbeAgentScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_connection_score import EndpointProbeConnectionScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_gateway_score import EndpointProbeGatewayScore @@ -27,6 +29,7 @@ from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_vpn_score impo from thousandeyes_sdk.endpoint_test_results.models.network_ping import NetworkPing from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile from thousandeyes_sdk.endpoint_test_results.models.network_topology_type import NetworkTopologyType +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.real_user_endpoint_test_coordinates import RealUserEndpointTestCoordinates from thousandeyes_sdk.endpoint_test_results.models.system_metric_details import SystemMetricDetails from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics @@ -56,11 +59,14 @@ class LocalNetworkTopologyResult(BaseModel): proxy_score: Optional[EndpointProbeProxyScore] = Field(default=None, alias="proxyScore") connection_score: Optional[EndpointProbeConnectionScore] = Field(default=None, alias="connectionScore") agent_score: Optional[EndpointProbeAgentScore] = Field(default=None, alias="agentScore") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None coordinates: Optional[RealUserEndpointTestCoordinates] = None network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") icmp_traceroute: Optional[Traceroute] = Field(default=None, alias="icmpTraceroute") icmp_traceroutes: Optional[List[Traceroute]] = Field(default=None, alias="icmpTraceroutes") - __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore", "coordinates", "networkProfile", "icmpTraceroute", "icmpTraceroutes"] + __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore", "batteryMetrics", "cellularProfile", "platform", "coordinates", "networkProfile", "icmpTraceroute", "icmpTraceroutes"] model_config = ConfigDict( populate_by_name=True, @@ -143,6 +149,12 @@ class LocalNetworkTopologyResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of agent_score if self.agent_score: _dict['agentScore'] = self.agent_score.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of coordinates if self.coordinates: _dict['coordinates'] = self.coordinates.to_dict() @@ -188,6 +200,9 @@ class LocalNetworkTopologyResult(BaseModel): "proxyScore": EndpointProbeProxyScore.from_dict(obj["proxyScore"]) if obj.get("proxyScore") is not None else None, "connectionScore": EndpointProbeConnectionScore.from_dict(obj["connectionScore"]) if obj.get("connectionScore") is not None else None, "agentScore": EndpointProbeAgentScore.from_dict(obj["agentScore"]) if obj.get("agentScore") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "coordinates": RealUserEndpointTestCoordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None, "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, "icmpTraceroute": Traceroute.from_dict(obj["icmpTraceroute"]) if obj.get("icmpTraceroute") is not None else None, diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py index 00c4e818..4718c1ac 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py @@ -19,6 +19,8 @@ import json from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_agent_score import EndpointProbeAgentScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_connection_score import EndpointProbeConnectionScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_gateway_score import EndpointProbeGatewayScore @@ -26,6 +28,7 @@ from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_proxy_score im from thousandeyes_sdk.endpoint_test_results.models.endpoint_probe_vpn_score import EndpointProbeVpnScore from thousandeyes_sdk.endpoint_test_results.models.network_ping import NetworkPing from thousandeyes_sdk.endpoint_test_results.models.network_topology_type import NetworkTopologyType +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metric_details import SystemMetricDetails from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.tcp_connect import TcpConnect @@ -53,7 +56,10 @@ class LocalNetworkTopologyResultBase(BaseModel): proxy_score: Optional[EndpointProbeProxyScore] = Field(default=None, alias="proxyScore") connection_score: Optional[EndpointProbeConnectionScore] = Field(default=None, alias="connectionScore") agent_score: Optional[EndpointProbeAgentScore] = Field(default=None, alias="agentScore") - __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore"] + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None + __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore", "batteryMetrics", "cellularProfile", "platform"] model_config = ConfigDict( populate_by_name=True, @@ -136,6 +142,12 @@ class LocalNetworkTopologyResultBase(BaseModel): # override the default output from pydantic by calling `to_dict()` of agent_score if self.agent_score: _dict['agentScore'] = self.agent_score.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() return _dict @classmethod @@ -164,7 +176,10 @@ class LocalNetworkTopologyResultBase(BaseModel): "gatewayScore": EndpointProbeGatewayScore.from_dict(obj["gatewayScore"]) if obj.get("gatewayScore") is not None else None, "proxyScore": EndpointProbeProxyScore.from_dict(obj["proxyScore"]) if obj.get("proxyScore") is not None else None, "connectionScore": EndpointProbeConnectionScore.from_dict(obj["connectionScore"]) if obj.get("connectionScore") is not None else None, - "agentScore": EndpointProbeAgentScore.from_dict(obj["agentScore"]) if obj.get("agentScore") is not None else None + "agentScore": EndpointProbeAgentScore.from_dict(obj["agentScore"]) if obj.get("agentScore") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform") }) return _obj diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_endpoint_test_result.py index 97de1571..1ed33164 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_endpoint_test_result.py @@ -18,11 +18,14 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.dynamic_endpoint_test_webex import DynamicEndpointTestWebex from thousandeyes_sdk.endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_result_protocol import EndpointTestResultProtocol from thousandeyes_sdk.endpoint_test_results.models.endpoint_zta_metrics import EndpointZtaMetrics from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse @@ -46,6 +49,9 @@ class NetworkDynamicEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") @@ -60,7 +66,7 @@ class NetworkDynamicEndpointTestResult(BaseModel): tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicEndpointTestWebex] = None - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "avgLatency", "errorDetails", "jitter", "score", "ztaMetrics", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "avgLatency", "errorDetails", "jitter", "score", "ztaMetrics", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] model_config = ConfigDict( populate_by_name=True, @@ -139,6 +145,12 @@ class NetworkDynamicEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of score if self.score: _dict['score'] = self.score.to_dict() @@ -174,6 +186,9 @@ class NetworkDynamicEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "avgLatency": obj.get("avgLatency"), "errorDetails": obj.get("errorDetails"), "jitter": obj.get("jitter"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_result.py index df40bca1..f8f44ed3 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_result.py @@ -18,9 +18,12 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore from thousandeyes_sdk.endpoint_test_results.models.endpoint_zta_metrics import EndpointZtaMetrics from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -42,6 +45,9 @@ class NetworkEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") @@ -51,7 +57,7 @@ class NetworkEndpointTestResult(BaseModel): loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination.") max_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum RTT for packets sent to destination.", alias="maxLatency") min_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum RTT for packets sent to destination.", alias="minLatency") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "avgLatency", "errorDetails", "jitter", "score", "ztaMetrics", "isIcmpBlocked", "loss", "maxLatency", "minLatency"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "avgLatency", "errorDetails", "jitter", "score", "ztaMetrics", "isIcmpBlocked", "loss", "maxLatency", "minLatency"] model_config = ConfigDict( populate_by_name=True, @@ -130,6 +136,12 @@ class NetworkEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of score if self.score: _dict['score'] = self.score.to_dict() @@ -162,6 +174,9 @@ class NetworkEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "avgLatency": obj.get("avgLatency"), "errorDetails": obj.get("errorDetails"), "jitter": obj.get("jitter"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_endpoint_test_result.py index 0ca55f8d..fd4a629c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_endpoint_test_result.py @@ -19,7 +19,10 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -41,11 +44,14 @@ class PathVisBaseEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source endpoint agent.", alias="sourcePrefix") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "asnDetails", "server", "sourceIp", "sourcePrefix"] model_config = ConfigDict( populate_by_name=True, @@ -116,6 +122,12 @@ class PathVisBaseEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() @@ -141,6 +153,9 @@ class PathVisBaseEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "server": obj.get("server"), "sourceIp": obj.get("sourceIp"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_endpoint_test_result.py index 69dbfef8..8b32f781 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_endpoint_test_result.py @@ -19,10 +19,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.dynamic_endpoint_test_webex import DynamicEndpointTestWebex from thousandeyes_sdk.endpoint_test_results.models.endpoint_path_vis_route import EndpointPathVisRoute from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_result_protocol import EndpointTestResultProtocol from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse @@ -46,6 +49,9 @@ class PathVisDetailDynamicEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") @@ -57,7 +63,7 @@ class PathVisDetailDynamicEndpointTestResult(BaseModel): tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicEndpointTestWebex] = None - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] model_config = ConfigDict( populate_by_name=True, @@ -128,6 +134,12 @@ class PathVisDetailDynamicEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() @@ -170,6 +182,9 @@ class PathVisDetailDynamicEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "server": obj.get("server"), "sourceIp": obj.get("sourceIp"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_result.py index d39ae282..f9a6a8e1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_result.py @@ -19,8 +19,11 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_path_vis_route import EndpointPathVisRoute from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -42,13 +45,16 @@ class PathVisDetailEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source endpoint agent.", alias="sourcePrefix") path_traces: Optional[List[EndpointPathVisRoute]] = Field(default=None, description="Shows iterations of path trace, with each iteration specified by a pathId.", alias="pathTraces") vpn_path_traces: Optional[List[EndpointPathVisRoute]] = Field(default=None, description="Shows iterations of the VPN path trace, with each iteration specified by a pathId.", alias="vpnPathTraces") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces"] model_config = ConfigDict( populate_by_name=True, @@ -119,6 +125,12 @@ class PathVisDetailEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() @@ -158,6 +170,9 @@ class PathVisDetailEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "server": obj.get("server"), "sourceIp": obj.get("sourceIp"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_endpoint_test_result.py index 22b5f7db..6507c9b8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_endpoint_test_result.py @@ -19,10 +19,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.dynamic_endpoint_test_webex import DynamicEndpointTestWebex from thousandeyes_sdk.endpoint_test_results.models.endpoint_path_trace import EndpointPathTrace from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_result_protocol import EndpointTestResultProtocol from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse @@ -46,6 +49,9 @@ class PathVisDynamicEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") @@ -57,7 +63,7 @@ class PathVisDynamicEndpointTestResult(BaseModel): webex: Optional[DynamicEndpointTestWebex] = None location: Optional[StrictStr] = Field(default=None, description="Geographic location of the path visualization.") path_traces: Optional[List[EndpointPathTrace]] = Field(default=None, description="Shows an iteration of path trace, with each iteration specified by a pathId.", alias="pathTraces") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex", "location", "pathTraces"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex", "location", "pathTraces"] model_config = ConfigDict( populate_by_name=True, @@ -130,6 +136,12 @@ class PathVisDynamicEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() @@ -165,6 +177,9 @@ class PathVisDynamicEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "server": obj.get("server"), "sourceIp": obj.get("sourceIp"), diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_result.py index 668dcce2..f15af78c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_result.py @@ -19,8 +19,11 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails +from thousandeyes_sdk.endpoint_test_results.models.battery_metrics import BatteryMetrics +from thousandeyes_sdk.endpoint_test_results.models.cellular_profile import CellularProfile from thousandeyes_sdk.endpoint_test_results.models.endpoint_path_trace import EndpointPathTrace from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile +from thousandeyes_sdk.endpoint_test_results.models.platform import Platform from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile from thousandeyes_sdk.endpoint_test_results.models.user_profile import UserProfile @@ -42,13 +45,16 @@ class PathVisEndpointTestResult(BaseModel): original_target_profile: Optional[TargetProfile] = Field(default=None, alias="originalTargetProfile") user_profile: Optional[UserProfile] = Field(default=None, alias="userProfile") vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics") + cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile") + platform: Optional[Platform] = None asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source endpoint agent.", alias="sourcePrefix") location: Optional[StrictStr] = Field(default=None, description="Geographic location of the path visualization.") path_traces: Optional[List[EndpointPathTrace]] = Field(default=None, description="Shows an iteration of path trace, with each iteration specified by a pathId.", alias="pathTraces") - __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "location", "pathTraces"] + __properties: ClassVar[List[str]] = ["aid", "testId", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "userProfile", "vpnProfile", "batteryMetrics", "cellularProfile", "platform", "asnDetails", "server", "sourceIp", "sourcePrefix", "location", "pathTraces"] model_config = ConfigDict( populate_by_name=True, @@ -121,6 +127,12 @@ class PathVisEndpointTestResult(BaseModel): # override the default output from pydantic by calling `to_dict()` of vpn_profile if self.vpn_profile: _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of battery_metrics + if self.battery_metrics: + _dict['batteryMetrics'] = self.battery_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of cellular_profile + if self.cellular_profile: + _dict['cellularProfile'] = self.cellular_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of asn_details if self.asn_details: _dict['asnDetails'] = self.asn_details.to_dict() @@ -153,6 +165,9 @@ class PathVisEndpointTestResult(BaseModel): "originalTargetProfile": TargetProfile.from_dict(obj["originalTargetProfile"]) if obj.get("originalTargetProfile") is not None else None, "userProfile": UserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None, + "cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None, + "platform": obj.get("platform"), "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "server": obj.get("server"), "sourceIp": obj.get("sourceIp"), diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py index d1c76853..b9eb4aeb 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py @@ -131,11 +131,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -241,11 +258,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -372,7 +406,8 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpEndpointTestsDataRoundsSearch.from_json(request_body_json) @@ -419,11 +454,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -529,11 +581,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -660,7 +729,8 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpEndpointTestsDataRoundsSearch.from_json(request_body_json) @@ -707,11 +777,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -817,11 +904,28 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py index ae7e3d79..59164253 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py @@ -57,7 +57,8 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointNetworkTopologyResultRequest.from_json(request_body_json) @@ -100,9 +101,26 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): "score" : 100.0, "quality" : "great" }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -243,9 +261,26 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): "score" : 100.0, "quality" : "great" }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -450,6 +485,10 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): "location" : "Slovenia", "longitude" : 14.5144444 }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "icmpTraceroutes" : [ { "destination" : "13.32.22.232", "hops" : [ { @@ -497,7 +536,20 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): } ], "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -712,6 +764,10 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): "location" : "Slovenia", "longitude" : 14.5144444 }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "icmpTraceroutes" : [ { "destination" : "13.32.22.232", "hops" : [ { @@ -759,7 +815,20 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase): } ], "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py index c1946ef9..0bfc2789 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py @@ -56,7 +56,8 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.DynamicEndpointTestsDataRoundSearch.from_json(request_body_json) @@ -132,10 +133,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "remotePort" : 80, "remoteIpAddress" : "120.98.134.7" }, - "udpProbeMode" : "unknown", "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", - "isIcmpBlocked" : true, - "avgLatency" : 167.04, "minLatency" : 167.0, "vpnProfile" : { "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], @@ -144,41 +142,33 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, - "tcpProbeMode" : "auto", + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" }, "loss" : 0.0, "protocol" : "tcp", - "systemMetrics" : { - "cpuUtilization" : { - "min" : 0.22, - "median" : 0.61, - "max" : 0.75, - "mean" : 0.55, - "count" : 150, - "stdDev" : 0.01 - }, - "physicalMemoryTotalBytes" : 1024, - "startTimeMs" : 1581508857327, - "physicalMemoryUsedBytes" : { - "min" : 1.2, - "median" : 1.85, - "max" : 2.5, - "mean" : 1.77, - "count" : 155, - "stdDev" : 0.25 - }, - "endTimeMs" : 1581508867333 - }, - "jitter" : 0.076808, - "application" : "webex", - "serverIp" : "185.199.108.153", "networkProfile" : { "previousInterface" : { "publicIpAddress" : "84.255.241.1", @@ -238,6 +228,35 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "errorMessage" : "ERR_NAME_NOT_RESOLVED", "type" : "zta_service" } ], + "roundId" : 1384309800, + "udpProbeMode" : "unknown", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "tcpProbeMode" : "auto", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", "testId" : "584739201", "webex" : { "remoteSipSessionId" : "22581707460321454", @@ -246,7 +265,6 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "correlationId" : "22581707460321454" }, "aid" : "1234", - "roundId" : 1384309800, "errorDetails" : "Error" }, { "originalTargetProfile" : { @@ -254,10 +272,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "remotePort" : 80, "remoteIpAddress" : "120.98.134.7" }, - "udpProbeMode" : "unknown", "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", - "isIcmpBlocked" : true, - "avgLatency" : 167.04, "minLatency" : 167.0, "vpnProfile" : { "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], @@ -266,41 +281,33 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, - "tcpProbeMode" : "auto", + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" }, "loss" : 0.0, "protocol" : "tcp", - "systemMetrics" : { - "cpuUtilization" : { - "min" : 0.22, - "median" : 0.61, - "max" : 0.75, - "mean" : 0.55, - "count" : 150, - "stdDev" : 0.01 - }, - "physicalMemoryTotalBytes" : 1024, - "startTimeMs" : 1581508857327, - "physicalMemoryUsedBytes" : { - "min" : 1.2, - "median" : 1.85, - "max" : 2.5, - "mean" : 1.77, - "count" : 155, - "stdDev" : 0.25 - }, - "endTimeMs" : 1581508867333 - }, - "jitter" : 0.076808, - "application" : "webex", - "serverIp" : "185.199.108.153", "networkProfile" : { "previousInterface" : { "publicIpAddress" : "84.255.241.1", @@ -360,6 +367,35 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "errorMessage" : "ERR_NAME_NOT_RESOLVED", "type" : "zta_service" } ], + "roundId" : 1384309800, + "udpProbeMode" : "unknown", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "tcpProbeMode" : "auto", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", "testId" : "584739201", "webex" : { "remoteSipSessionId" : "22581707460321454", @@ -368,7 +404,6 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "correlationId" : "22581707460321454" }, "aid" : "1234", - "roundId" : 1384309800, "errorDetails" : "Error" } ], "startDate" : "2022-07-17T22:00:54Z" @@ -462,12 +497,29 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -657,12 +709,29 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -936,12 +1005,29 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -1059,12 +1145,29 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py index 2bdb6f4f..b3affdd7 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py @@ -55,7 +55,8 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointTestsDataRoundsSearch.from_json(request_body_json) @@ -143,10 +144,27 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -255,10 +273,27 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -385,7 +420,8 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "operator" : "gte" } ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.MultiTestIdEndpointTestsDataRoundsSearch.from_json(request_body_json) @@ -424,10 +460,27 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -536,10 +589,27 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -723,11 +793,28 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -908,11 +995,28 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -1177,11 +1281,28 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -1290,11 +1411,28 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase): "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py index 36d931da..4f814624 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py @@ -48,7 +48,8 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase): "networkId" : [ "660b34109d12", "660b34109d15" ], "gateway" : [ "78.153.54.204", "78.153.54.206" ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultsRequest.from_json(request_body_json) @@ -185,7 +186,8 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase): "networkId" : [ "660b34109d12", "660b34109d15" ], "gateway" : [ "78.153.54.204", "78.153.54.206" ] } - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultsRequest.from_json(request_body_json) @@ -260,7 +262,8 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase): "vpnTarget" : [ "78.153.54.204", "78.153.54.206" ], "networkId" : [ "660b34109d12", "660b34109d15" ], "gateway" : [ "78.153.54.204", "78.153.54.206" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultRequestFilter.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index 965059a8..f3c5ff97 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py index 28c426ab..e8fb9d47 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py @@ -44,7 +44,8 @@ class TestAgentToServerEndpointDynamicTestsApi(unittest.TestCase): "tcpProbeMode" : "auto", "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTestRequest.from_json(request_body_json) @@ -293,7 +294,8 @@ class TestAgentToServerEndpointDynamicTestsApi(unittest.TestCase): "interval" : 60, "tcpProbeMode" : "auto", "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointDynamicTestUpdate.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py index 0b5b48f4..c6a8872e 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py @@ -44,7 +44,8 @@ class TestAgentToServerEndpointScheduledTestsApi(unittest.TestCase): "endpointAgentLabels" : [ "567", "214" ], "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTestRequest.from_json(request_body_json) @@ -298,7 +299,8 @@ class TestAgentToServerEndpointScheduledTestsApi(unittest.TestCase): "interval" : 60, "tcpProbeMode" : "auto", "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointNetworkTestUpdate.from_json(request_body_json) diff --git a/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py index 00e7a65c..cac6ff5f 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py @@ -54,7 +54,8 @@ class TestHTTPServerEndpointScheduledTestsApi(unittest.TestCase): "testName" : "Test name", "username" : "username", "sslVersionId" : "0" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTestRequest.from_json(request_body_json) @@ -351,7 +352,8 @@ class TestHTTPServerEndpointScheduledTestsApi(unittest.TestCase): "tcpProbeMode" : "auto", "url" : "https://example.com:443", "testName" : "Test name" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpTestUpdate.from_json(request_body_json) diff --git a/thousandeyes-sdk-event-detection/README.md b/thousandeyes-sdk-event-detection/README.md index 1c7a438e..f1e43750 100644 --- a/thousandeyes-sdk-event-detection/README.md +++ b/thousandeyes-sdk-event-detection/README.md @@ -12,7 +12,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index 03af87c1..60522b86 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -6,7 +6,7 @@ The response does not include the immediate test results. Use the Test Results e This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py index cd91ded0..87563e3e 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py @@ -82,7 +82,8 @@ class TestAgentToAgentInstantTestsApi(unittest.TestCase): "targetAgentId" : "2954", "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.AgentToAgentInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py index 25176248..e46ea79d 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py @@ -83,7 +83,8 @@ class TestAgentToServerInstantTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "pingPayloadSize" : 112, "continuousMode" : false - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.AgentToServerInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py index 9c1dc0bf..acf7e266 100644 --- a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py @@ -175,7 +175,8 @@ class TestAPIInstantTestsApi(unittest.TestCase): "overrideProxyId" : "281474976710706", "sslVersionId" : "0", "targetTime" : 1 - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.ApiInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py index 45410e1c..3f0f6edb 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py @@ -83,7 +83,8 @@ class TestDNSServerInstantTestsApi(unittest.TestCase): "modifiedDate" : "2022-07-17T22:00:54Z", "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.DnsServerInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py index c051a606..1b63bf9e 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py @@ -72,7 +72,8 @@ class TestDNSTraceInstantTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.DnsTraceInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py index 92d1003c..d7f0e214 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py @@ -71,7 +71,8 @@ class TestDNSSECInstantTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.DnsSecInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py index a5368f53..04af7995 100644 --- a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py @@ -87,7 +87,8 @@ class TestFTPServerInstantTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "useActiveFtp" : false, "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.FtpServerInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py index 7f6cf37b..eecaa1a1 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py @@ -138,7 +138,8 @@ class TestHTTPPageLoadInstantTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.PageLoadInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py index c3e9d55e..f59afc04 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py @@ -131,7 +131,8 @@ class TestHTTPServerInstantTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.HttpServerInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py index 89545629..42f46ce3 100644 --- a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py @@ -88,7 +88,8 @@ class TestSIPServerInstantTestsApi(unittest.TestCase): "sipTimeLimit" : 5, "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.SipServerInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py index 734dcd71..379e509f 100644 --- a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py @@ -78,7 +78,8 @@ class TestVoiceInstantTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.VoiceInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py index b4057d88..ce9f6d02 100644 --- a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py @@ -140,7 +140,8 @@ class TestWebTransactionInstantTestsApi(unittest.TestCase): "sslVersionId" : "0", "username" : "username", "targetTime" : 1 - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.instant_tests.models.WebTransactionInstantTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index a3a9fb05..fccb64a6 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -14,7 +14,7 @@ For more information about Internet Insights, see the [Internet Insights](https: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py b/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py index d6438653..db7f5485 100644 --- a/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py +++ b/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py @@ -38,7 +38,8 @@ class TestInternetInsightsCatalogProvidersApi(unittest.TestCase): "location" : "San Jose, US", "asn" : "Amazon.com, Inc.", "included" : true - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderFilter.from_json(request_body_json) diff --git a/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py b/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py index d3479114..aef822f5 100644 --- a/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py +++ b/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py @@ -38,7 +38,8 @@ class TestInternetInsightsOutagesApi(unittest.TestCase): "providerName" : [ "Telia", "Amazon" ], "interfaceNetwork" : [ "Telianet", "Cloudflare" ], "applicationName" : [ "slack", "facebook" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.internet_insights.models.ApiOutageFilter.from_json(request_body_json) diff --git a/thousandeyes-sdk-snapshots/README.md b/thousandeyes-sdk-snapshots/README.md index c897b360..628aa766 100644 --- a/thousandeyes-sdk-snapshots/README.md +++ b/thousandeyes-sdk-snapshots/README.md @@ -3,7 +3,7 @@ Creates a new test snapshot in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py b/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py index d24a35cb..40e30876 100644 --- a/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py +++ b/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py @@ -36,7 +36,8 @@ class TestTestSnapshotsApi(unittest.TestCase): "displayName" : "Snapshot created through API", "isPublic" : false, "startDate" : "2023-06-06T00:00:00Z" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.snapshots.models.SnapshotRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index 11e67c19..1803e0a8 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -15,7 +15,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [product docu This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api.py b/thousandeyes-sdk-streaming/test/test_streaming_api.py index 59e0393b..6d3f8b49 100644 --- a/thousandeyes-sdk-streaming/test/test_streaming_api.py +++ b/thousandeyes-sdk-streaming/test/test_streaming_api.py @@ -82,7 +82,8 @@ class TestStreamingApi(unittest.TestCase): "Content-Type" : "*****" }, "enabled" : true - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.streaming.models.Stream.from_json(request_body_json) @@ -442,7 +443,8 @@ class TestStreamingApi(unittest.TestCase): "Content-Type" : "*****" }, "enabled" : true - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.streaming.models.PutStream.from_json(request_body_json) diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index e56eb10a..fb0b0d1e 100644 --- a/thousandeyes-sdk-tags/README.md +++ b/thousandeyes-sdk-tags/README.md @@ -16,7 +16,7 @@ Things to note with the ThousandEyes Tags API: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py index 98b27d6b..a07e740b 100644 --- a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py +++ b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py @@ -39,7 +39,8 @@ class TestTagAssignmentApi(unittest.TestCase): "id" : "123", "type" : "test" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) @@ -84,7 +85,8 @@ class TestTagAssignmentApi(unittest.TestCase): } ], "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) @@ -128,7 +130,8 @@ class TestTagAssignmentApi(unittest.TestCase): "id" : "123", "type" : "test" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) @@ -158,7 +161,8 @@ class TestTagAssignmentApi(unittest.TestCase): } ], "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) diff --git a/thousandeyes-sdk-tags/test/test_tags_api.py b/thousandeyes-sdk-tags/test/test_tags_api.py index 9c3e77b8..78e07d7f 100644 --- a/thousandeyes-sdk-tags/test/test_tags_api.py +++ b/thousandeyes-sdk-tags/test/test_tags_api.py @@ -53,7 +53,8 @@ class TestTagsApi(unittest.TestCase): "value" : "sfo", "key" : "branch", "createDate" : "2022-03-01T23:31:11Z" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) @@ -218,7 +219,8 @@ class TestTagsApi(unittest.TestCase): "key" : "branch", "createDate" : "2022-03-01T23:31:11Z" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(request_body_json) @@ -523,7 +525,8 @@ class TestTagsApi(unittest.TestCase): "value" : "sfo", "key" : "branch", "createDate" : "2022-03-01T23:31:11Z" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index 543356e9..fc90f5a6 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,7 +3,7 @@ Get test result metrics for Network and Application Synthetics tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index f5b9b5d9..970432f2 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -4,7 +4,7 @@ This API allows you to list, create, edit, and delete Network and Application Sy This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py index d1defa65..4e4f5cff 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py @@ -89,7 +89,8 @@ class TestAgentToAgentTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestRequest.from_json(request_body_json) @@ -575,7 +576,8 @@ class TestAgentToAgentTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py index 21881048..e3dc9fb4 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py @@ -91,7 +91,8 @@ class TestAgentToServerTestsApi(unittest.TestCase): "pingPayloadSize" : 112, "continuousMode" : false, "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.AgentToServerTestRequest.from_json(request_body_json) @@ -583,7 +584,8 @@ class TestAgentToServerTestsApi(unittest.TestCase): "pingPayloadSize" : 112, "continuousMode" : false, "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.AgentToServerTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_api_tests_api.py b/thousandeyes-sdk-tests/test/test_api_tests_api.py index 89b06fda..71a7a3c1 100644 --- a/thousandeyes-sdk-tests/test/test_api_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_api_tests_api.py @@ -196,7 +196,8 @@ class TestAPITestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json) @@ -1159,7 +1160,8 @@ class TestAPITestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_bgp_tests_api.py b/thousandeyes-sdk-tests/test/test_bgp_tests_api.py index 69243584..4041952f 100644 --- a/thousandeyes-sdk-tests/test/test_bgp_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_bgp_tests_api.py @@ -68,7 +68,8 @@ class TestBGPTestsApi(unittest.TestCase): "alertsEnabled" : true, "testName" : "ThousandEyes Test", "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.BgpTestRequest.from_json(request_body_json) @@ -410,7 +411,8 @@ class TestBGPTestsApi(unittest.TestCase): "alertsEnabled" : true, "testName" : "ThousandEyes Test", "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.UpdateBgpTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py index ecbd2e7b..dee043cd 100644 --- a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py @@ -90,7 +90,8 @@ class TestDNSServerTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsServerTestRequest.from_json(request_body_json) @@ -605,7 +606,8 @@ class TestDNSServerTestsApi(unittest.TestCase): "testId" : "281474976710706", "sharedWithAccounts" : [ "1234", "12345" ], "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsServerTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py index 85a716f5..5fa8e411 100644 --- a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py @@ -76,7 +76,8 @@ class TestDNSTraceTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "alertsEnabled" : true, "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsTraceTestRequest.from_json(request_body_json) @@ -471,7 +472,8 @@ class TestDNSTraceTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "alertsEnabled" : true, "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsTraceTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py index 4f89ce51..45623d7c 100644 --- a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py @@ -75,7 +75,8 @@ class TestDNSSECTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "alertsEnabled" : true, "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsSecTestRequest.from_json(request_body_json) @@ -465,7 +466,8 @@ class TestDNSSECTestsApi(unittest.TestCase): "sharedWithAccounts" : [ "1234", "12345" ], "alertsEnabled" : true, "testName" : "ThousandEyes Test" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.DnsSecTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py index a49e3cea..a0b8fbbc 100644 --- a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py @@ -94,7 +94,8 @@ class TestFTPServerTestsApi(unittest.TestCase): "useActiveFtp" : false, "username" : "username", "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.FtpServerTestRequest.from_json(request_body_json) @@ -605,7 +606,8 @@ class TestFTPServerTestsApi(unittest.TestCase): "useActiveFtp" : false, "username" : "username", "monitors" : [ "17410", "5" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.FtpServerTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py index 46b990da..8fc85bdd 100644 --- a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py @@ -138,7 +138,8 @@ class TestHTTPServerTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.HttpServerTestRequest.from_json(request_body_json) @@ -869,7 +870,8 @@ class TestHTTPServerTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.HttpServerTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py index a3b521f8..1c03d242 100644 --- a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py @@ -147,7 +147,8 @@ class TestPageLoadTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.PageLoadTestRequest.from_json(request_body_json) @@ -923,7 +924,8 @@ class TestPageLoadTestsApi(unittest.TestCase): "httpTargetTime" : 100, "sslVersionId" : "0", "username" : "username" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.PageLoadTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py index c2abcdc1..08e3f6cc 100644 --- a/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py +++ b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py @@ -37,7 +37,8 @@ class TestPathVisualizationInterfaceGroupsApi(unittest.TestCase): "groupId" : "281474976710706", "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], "aid" : "1234" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) @@ -105,7 +106,8 @@ class TestPathVisualizationInterfaceGroupsApi(unittest.TestCase): "groupId" : "281474976710706", "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], "aid" : "1234" - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py index 64b19e44..f86bfba1 100644 --- a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py @@ -109,7 +109,8 @@ class TestSIPServerTestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.SipServerTestRequest.from_json(request_body_json) @@ -631,7 +632,8 @@ class TestSIPServerTestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.SipServerTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_voice_tests_api.py b/thousandeyes-sdk-tests/test/test_voice_tests_api.py index f34300e7..4ce721e6 100644 --- a/thousandeyes-sdk-tests/test/test_voice_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_voice_tests_api.py @@ -99,7 +99,8 @@ class TestVoiceTestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.VoiceTestRequest.from_json(request_body_json) @@ -579,7 +580,8 @@ class TestVoiceTestsApi(unittest.TestCase): "countryId" : "GB", "network" : "Level 3 Communications, Inc. (AS 3356)" } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.VoiceTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py index b41331cd..fc321b0d 100644 --- a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py @@ -148,7 +148,8 @@ class TestWebTransactionTestsApi(unittest.TestCase): "sslVersionId" : "0", "username" : "username", "targetTime" : 1 - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.WebTransactionTestRequest.from_json(request_body_json) @@ -927,7 +928,8 @@ class TestWebTransactionTestsApi(unittest.TestCase): "sslVersionId" : "0", "username" : "username", "targetTime" : 1 - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.tests.models.WebTransactionTestRequest.from_json(request_body_json) diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index 0e0e3946..f0fa745d 100644 --- a/thousandeyes-sdk-usage/README.md +++ b/thousandeyes-sdk-usage/README.md @@ -18,7 +18,7 @@ Refer to the Usage API operations for detailed usage instructions and optional p This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.75 +- API version: 7.0.79 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-usage/test/test_quotas_api.py b/thousandeyes-sdk-usage/test/test_quotas_api.py index eda8715b..fbfa8998 100644 --- a/thousandeyes-sdk-usage/test/test_quotas_api.py +++ b/thousandeyes-sdk-usage/test/test_quotas_api.py @@ -51,7 +51,8 @@ class TestQuotasApi(unittest.TestCase): "aid" : "1234" } ] } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasAssign.from_json(request_body_json) @@ -94,7 +95,8 @@ class TestQuotasApi(unittest.TestCase): "orgId" : "1234", "value" : 10000 } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.usage.models.QuotasAssignRequest.from_json(request_body_json) @@ -174,7 +176,8 @@ class TestQuotasApi(unittest.TestCase): "orgId" : "1234", "accountGroups" : [ "1234", "12345" ] } ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasUnassign.from_json(request_body_json) @@ -186,7 +189,8 @@ class TestQuotasApi(unittest.TestCase): request_body_json = """ { "organizations" : [ "1234", "12345" ] - }""" + } + """ request_loaded_json = json.loads(request_body_json) request_from_json = thousandeyes_sdk.usage.models.QuotasUnassign.from_json(request_body_json)