mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-03-21 17:25:29 +00:00
[GitHub Bot] Generated python SDK
This commit is contained in:
parent
26963344ea
commit
09a8ede15d
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -115,7 +115,7 @@ Class | Method | HTTP request | Description
|
||||
*AlertSuppressionWindowsApi* | [**get_alert_suppression_windows**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md#get_alert_suppression_windows) | **GET** /alert-suppression-windows | List alert suppression windows
|
||||
*AlertSuppressionWindowsApi* | [**update_alert_suppression_window**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md#update_alert_suppression_window) | **PUT** /alert-suppression-windows/{windowId} | Update alert suppression window
|
||||
*AlertsApi* | [**get_alert**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertsApi.md#get_alert) | **GET** /alerts/{alertId} | Retrieve alert details
|
||||
*AlertsApi* | [**get_alerts**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertsApi.md#get_alerts) | **GET** /alerts | List active alerts
|
||||
*AlertsApi* | [**get_alerts**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertsApi.md#get_alerts) | **GET** /alerts | List alerts
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
@ -5,7 +5,7 @@ All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_alert**](AlertsApi.md#get_alert) | **GET** /alerts/{alertId} | Retrieve alert details
|
||||
[**get_alerts**](AlertsApi.md#get_alerts) | **GET** /alerts | List active alerts
|
||||
[**get_alerts**](AlertsApi.md#get_alerts) | **GET** /alerts | List alerts
|
||||
|
||||
|
||||
# **get_alert**
|
||||
@ -96,9 +96,9 @@ Name | Type | Description | Notes
|
||||
# **get_alerts**
|
||||
> Alerts get_alerts(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, state=state)
|
||||
|
||||
List active alerts
|
||||
List alerts
|
||||
|
||||
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
|
||||
Returns a list of alerts. Only active (triggered) alerts are returned by default. To retrieve cleared alerts, specify `clear` in the optional `state` parameter. Note that the `state` parameter only accepts a single value, so to get both active and cleared alerts within a time range, two separate requests are needed. Time filters (`window`, `startDate`, `endDate`) are applied differently depending on state: - For `state=trigger`: filters by when the alert started. - For `state=clear`: filters by when the alert cleared. - When state is not specified: returns cleared alerts within the time range plus any currently active alerts that started before the end of the range.
|
||||
|
||||
### Example
|
||||
|
||||
@ -139,7 +139,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
state = thousandeyes_sdk.alerts.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional)
|
||||
|
||||
try:
|
||||
# List active alerts
|
||||
# List alerts
|
||||
api_response = api_instance.get_alerts(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, state=state)
|
||||
print("The response of AlertsApi->get_alerts:\n")
|
||||
pprint(api_response)
|
||||
|
||||
@ -361,9 +361,9 @@ class AlertsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> PaginationIterable:
|
||||
"""List active alerts
|
||||
"""List alerts
|
||||
|
||||
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
|
||||
Returns a list of alerts. Only active (triggered) alerts are returned by default. To retrieve cleared alerts, specify `clear` in the optional `state` parameter. Note that the `state` parameter only accepts a single value, so to get both active and cleared alerts within a time range, two separate requests are needed. Time filters (`window`, `startDate`, `endDate`) are applied differently depending on state: - For `state=trigger`: filters by when the alert started. - For `state=clear`: filters by when the alert cleared. - When state is not specified: returns cleared alerts within the time range plus any currently active alerts that started before the end of the range.
|
||||
|
||||
: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
|
||||
@ -435,9 +435,9 @@ class AlertsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> Alerts:
|
||||
"""List active alerts
|
||||
"""List alerts
|
||||
|
||||
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
|
||||
Returns a list of alerts. Only active (triggered) alerts are returned by default. To retrieve cleared alerts, specify `clear` in the optional `state` parameter. Note that the `state` parameter only accepts a single value, so to get both active and cleared alerts within a time range, two separate requests are needed. Time filters (`window`, `startDate`, `endDate`) are applied differently depending on state: - For `state=trigger`: filters by when the alert started. - For `state=clear`: filters by when the alert cleared. - When state is not specified: returns cleared alerts within the time range plus any currently active alerts that started before the end of the range.
|
||||
|
||||
: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
|
||||
@ -532,9 +532,9 @@ class AlertsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[Alerts]:
|
||||
"""List active alerts
|
||||
"""List alerts
|
||||
|
||||
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
|
||||
Returns a list of alerts. Only active (triggered) alerts are returned by default. To retrieve cleared alerts, specify `clear` in the optional `state` parameter. Note that the `state` parameter only accepts a single value, so to get both active and cleared alerts within a time range, two separate requests are needed. Time filters (`window`, `startDate`, `endDate`) are applied differently depending on state: - For `state=trigger`: filters by when the alert started. - For `state=clear`: filters by when the alert cleared. - When state is not specified: returns cleared alerts within the time range plus any currently active alerts that started before the end of the range.
|
||||
|
||||
: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
|
||||
@ -629,9 +629,9 @@ class AlertsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""List active alerts
|
||||
"""List alerts
|
||||
|
||||
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
|
||||
Returns a list of alerts. Only active (triggered) alerts are returned by default. To retrieve cleared alerts, specify `clear` in the optional `state` parameter. Note that the `state` parameter only accepts a single value, so to get both active and cleared alerts within a time range, two separate requests are needed. Time filters (`window`, `startDate`, `endDate`) are applied differently depending on state: - For `state=trigger`: filters by when the alert started. - For `state=clear`: filters by when the alert cleared. - When state is not specified: returns cleared alerts within the time range plus any currently active alerts that started before the end of the range.
|
||||
|
||||
: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
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
23
thousandeyes-sdk-connectors/.openapi-generator-ignore
Normal file
23
thousandeyes-sdk-connectors/.openapi-generator-ignore
Normal file
@ -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
|
||||
66
thousandeyes-sdk-connectors/.openapi-generator/FILES
Normal file
66
thousandeyes-sdk-connectors/.openapi-generator/FILES
Normal file
@ -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
|
||||
1
thousandeyes-sdk-connectors/.openapi-generator/VERSION
Normal file
1
thousandeyes-sdk-connectors/.openapi-generator/VERSION
Normal file
@ -0,0 +1 @@
|
||||
7.6.0
|
||||
1
thousandeyes-sdk-connectors/MANIFEST.in
Normal file
1
thousandeyes-sdk-connectors/MANIFEST.in
Normal file
@ -0,0 +1 @@
|
||||
include docs/*
|
||||
142
thousandeyes-sdk-connectors/README.md
Normal file
142
thousandeyes-sdk-connectors/README.md
Normal file
@ -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.75
|
||||
- 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 = 123456 # float | Account ID (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)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
## Documentation For Authorization
|
||||
|
||||
Endpoints do not require authorization.
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
<a href="mailto:api-team@thousandeyes.com">ThousandEyes API Team </a>
|
||||
|
||||
|
||||
31
thousandeyes-sdk-connectors/docs/Assignments.md
Normal file
31
thousandeyes-sdk-connectors/docs/Assignments.md
Normal file
@ -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)
|
||||
|
||||
|
||||
11
thousandeyes-sdk-connectors/docs/AuthenticationType.md
Normal file
11
thousandeyes-sdk-connectors/docs/AuthenticationType.md
Normal file
@ -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)
|
||||
|
||||
|
||||
31
thousandeyes-sdk-connectors/docs/BasicAuthentication.md
Normal file
31
thousandeyes-sdk-connectors/docs/BasicAuthentication.md
Normal file
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
11
thousandeyes-sdk-connectors/docs/ConnectorType.md
Normal file
11
thousandeyes-sdk-connectors/docs/ConnectorType.md
Normal file
@ -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)
|
||||
|
||||
|
||||
33
thousandeyes-sdk-connectors/docs/Error.md
Normal file
33
thousandeyes-sdk-connectors/docs/Error.md
Normal file
@ -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)
|
||||
|
||||
|
||||
35
thousandeyes-sdk-connectors/docs/GenericConnector.md
Normal file
35
thousandeyes-sdk-connectors/docs/GenericConnector.md
Normal file
@ -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** | **datetime** | The date when the connector was last modified. | [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)
|
||||
|
||||
|
||||
39
thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md
Normal file
39
thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md
Normal file
@ -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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/GenericConnectors.md
Normal file
30
thousandeyes-sdk-connectors/docs/GenericConnectors.md
Normal file
@ -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)
|
||||
|
||||
|
||||
539
thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md
Normal file
539
thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md
Normal file
@ -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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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)
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/Header.md
Normal file
30
thousandeyes-sdk-connectors/docs/Header.md
Normal file
@ -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)
|
||||
|
||||
|
||||
37
thousandeyes-sdk-connectors/docs/Link.md
Normal file
37
thousandeyes-sdk-connectors/docs/Link.md
Normal file
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
37
thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md
Normal file
37
thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md
Normal file
@ -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)
|
||||
|
||||
|
||||
11
thousandeyes-sdk-connectors/docs/OperationCategory.md
Normal file
11
thousandeyes-sdk-connectors/docs/OperationCategory.md
Normal file
@ -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)
|
||||
|
||||
|
||||
166
thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md
Normal file
166
thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md
Normal file
@ -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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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)
|
||||
|
||||
11
thousandeyes-sdk-connectors/docs/OperationStatus.md
Normal file
11
thousandeyes-sdk-connectors/docs/OperationStatus.md
Normal file
@ -0,0 +1,11 @@
|
||||
# OperationStatus
|
||||
|
||||
|
||||
## 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)
|
||||
|
||||
|
||||
11
thousandeyes-sdk-connectors/docs/OperationType.md
Normal file
11
thousandeyes-sdk-connectors/docs/OperationType.md
Normal file
@ -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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md
Normal file
30
thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md
Normal file
@ -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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/SelfLinks.md
Normal file
30
thousandeyes-sdk-connectors/docs/SelfLinks.md
Normal file
@ -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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/UnauthorizedError.md
Normal file
30
thousandeyes-sdk-connectors/docs/UnauthorizedError.md
Normal file
@ -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)
|
||||
|
||||
|
||||
34
thousandeyes-sdk-connectors/docs/ValidationError.md
Normal file
34
thousandeyes-sdk-connectors/docs/ValidationError.md
Normal file
@ -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)
|
||||
|
||||
|
||||
31
thousandeyes-sdk-connectors/docs/ValidationErrorItem.md
Normal file
31
thousandeyes-sdk-connectors/docs/ValidationErrorItem.md
Normal file
@ -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)
|
||||
|
||||
|
||||
39
thousandeyes-sdk-connectors/docs/WebhookOperation.md
Normal file
39
thousandeyes-sdk-connectors/docs/WebhookOperation.md
Normal file
@ -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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/WebhookOperations.md
Normal file
30
thousandeyes-sdk-connectors/docs/WebhookOperations.md
Normal file
@ -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)
|
||||
|
||||
|
||||
385
thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md
Normal file
385
thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md
Normal file
@ -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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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 = 123456 # float | Account ID (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** | **float**| Account ID | [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)
|
||||
|
||||
82
thousandeyes-sdk-connectors/pyproject.toml
Normal file
82
thousandeyes-sdk-connectors/pyproject.toml
Normal file
@ -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
|
||||
2
thousandeyes-sdk-connectors/setup.cfg
Normal file
2
thousandeyes-sdk-connectors/setup.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
[flake8]
|
||||
max-line-length=99
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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, StrictFloat, StrictInt, StrictStr
|
||||
from typing import List, Optional, Union
|
||||
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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = 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: Account ID
|
||||
:type aid: float
|
||||
: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
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
@ -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
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
# 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'
|
||||
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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -0,0 +1,117 @@
|
||||
# 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 datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict, Field, 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[datetime] = Field(default=None, description="The date when the connector was last modified.", 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
|
||||
|
||||
|
||||
@ -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())
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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):
|
||||
"""
|
||||
OperationStatus
|
||||
"""
|
||||
|
||||
"""
|
||||
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
0
thousandeyes-sdk-connectors/test/__init__.py
Normal file
0
thousandeyes-sdk-connectors/test/__init__.py
Normal file
282
thousandeyes-sdk-connectors/test/test_generic_connectors_api.py
Normal file
282
thousandeyes-sdk-connectors/test/test_generic_connectors_api.py
Normal file
@ -0,0 +1,282 @@
|
||||
# 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" : "2023-10-01T12:00:00Z",
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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 = """
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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" : "2023-10-01T12:00:00Z",
|
||||
"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()
|
||||
@ -0,0 +1,86 @@
|
||||
# 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 = """
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"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()
|
||||
16
thousandeyes-sdk-connectors/test/test_utils.py
Normal file
16
thousandeyes-sdk-connectors/test/test_utils.py
Normal file
@ -0,0 +1,16 @@
|
||||
# coding: utf-8
|
||||
|
||||
import json
|
||||
import unittest
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict):
|
||||
test_case = unittest.TestCase()
|
||||
test_case.maxDiff = None
|
||||
test_case.assertIsNotNone(model)
|
||||
constructed_json = json.loads(model.to_json())
|
||||
sorted_loaded_json = json.dumps(loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
285
thousandeyes-sdk-connectors/test/test_webhook_operations_api.py
Normal file
285
thousandeyes-sdk-connectors/test/test_webhook_operations_api.py
Normal file
@ -0,0 +1,285 @@
|
||||
# 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()
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
||||
**user_principal_name** | **List[str]** | Returns only agents that have at least one user principal name, starting with one of the provided strings. This is a case-insensitive prefix match. User principle name is the user login name in an Internet-style format, typically used in Active Directory environments. | [optional]
|
||||
**platform** | [**List[Platform]**](Platform.md) | Filter on the platform on which the agent is running. | [optional]
|
||||
**os_version** | **List[str]** | Case-insensitive prefix filter on the OS version. | [optional]
|
||||
**serial_number** | **List[str]** | Case-insensitive prefix filter on the serial number. | [optional]
|
||||
**location_country_iso** | **List[str]** | Filter using the ISO country code of the location. | [optional]
|
||||
**location_subdivision1_code** | **List[str]** | Filter using the code for the first level administrative division within the country. In US/Canada this is the State, in UK it's the country e.g. `ENG` | [optional]
|
||||
**location_city** | **List[str]** | This is a prefix match on the city name field. The endpoint expects this to contain the name of the city in English. e.g. 'Paris' or '' | [optional]
|
||||
|
||||
@ -18,6 +18,7 @@ import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.endpoint_agents.models.agent_license_type import AgentLicenseType
|
||||
from thousandeyes_sdk.endpoint_agents.models.platform import Platform
|
||||
from typing import Optional, Set
|
||||
@ -34,12 +35,13 @@ class AgentSearchFilters(BaseModel):
|
||||
user_principal_name: Optional[List[StrictStr]] = Field(default=None, description="Returns only agents that have at least one user principal name, starting with one of the provided strings. This is a case-insensitive prefix match. User principle name is the user login name in an Internet-style format, typically used in Active Directory environments. ", alias="userPrincipalName")
|
||||
platform: Optional[List[Platform]] = Field(default=None, description="Filter on the platform on which the agent is running. ")
|
||||
os_version: Optional[List[StrictStr]] = Field(default=None, description="Case-insensitive prefix filter on the OS version.", alias="osVersion")
|
||||
serial_number: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Case-insensitive prefix filter on the serial number.", alias="serialNumber")
|
||||
location_country_iso: Optional[List[StrictStr]] = Field(default=None, description="Filter using the ISO country code of the location. ", alias="locationCountryISO")
|
||||
location_subdivision1_code: Optional[List[StrictStr]] = Field(default=None, description="Filter using the code for the first level administrative division within the country. In US/Canada this is the State, in UK it's the country e.g. `ENG` ", alias="locationSubdivision1Code")
|
||||
location_city: Optional[List[StrictStr]] = Field(default=None, description="This is a prefix match on the city name field. The endpoint expects this to contain the name of the city in English. e.g. 'Paris' or '' ", alias="locationCity")
|
||||
license_type: Optional[List[AgentLicenseType]] = Field(default=None, description="Filter on the agent's license type ", alias="licenseType")
|
||||
any_connect_device_id: Optional[List[StrictStr]] = Field(default=None, description="IDs of devices that has the Cisco Secure Client deployed with the Internet Security module. Returns only agents that have at least one matching `anyConnectDeviceId`. ", alias="anyConnectDeviceId")
|
||||
__properties: ClassVar[List[str]] = ["id", "agentName", "computerName", "username", "userPrincipalName", "platform", "osVersion", "locationCountryISO", "locationSubdivision1Code", "locationCity", "licenseType", "anyConnectDeviceId"]
|
||||
__properties: ClassVar[List[str]] = ["id", "agentName", "computerName", "username", "userPrincipalName", "platform", "osVersion", "serialNumber", "locationCountryISO", "locationSubdivision1Code", "locationCity", "licenseType", "anyConnectDeviceId"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -100,6 +102,7 @@ class AgentSearchFilters(BaseModel):
|
||||
"userPrincipalName": obj.get("userPrincipalName"),
|
||||
"platform": obj.get("platform"),
|
||||
"osVersion": obj.get("osVersion"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"locationCountryISO": obj.get("locationCountryISO"),
|
||||
"locationSubdivision1Code": obj.get("locationSubdivision1Code"),
|
||||
"locationCity": obj.get("locationCity"),
|
||||
|
||||
@ -30,6 +30,7 @@ class AgentSearchSortKey(str, Enum):
|
||||
NAME = 'name'
|
||||
USERNAME = 'userName'
|
||||
CITY = 'city'
|
||||
SERIALNUMBER = 'serialNumber'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -382,16 +382,17 @@ class TestEndpointAgentsApi(unittest.TestCase):
|
||||
"order" : "desc"
|
||||
} ],
|
||||
"searchFilters" : {
|
||||
"serialNumber" : [ "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055" ],
|
||||
"anyConnectDeviceId" : [ "JDLKSLFEIJER004334F" ],
|
||||
"agentName" : [ "myagent-1234", "myagent-1234" ],
|
||||
"locationSubdivision1Code" : [ "ENG", "ENG" ],
|
||||
"platform" : [ "mac", "mac" ],
|
||||
"licenseType" : [ "essentials", "essentials" ],
|
||||
"osVersion" : [ "Version 10.15.2", "Version 10.15.2" ],
|
||||
"computerName" : [ "DESKTOP-45AE8", "DESKTOP-45AE8" ],
|
||||
"anyConnectDeviceId" : [ "JDLKSLFEIJER004334F" ],
|
||||
"locationCountryISO" : [ "FR", "FR" ],
|
||||
"agentName" : [ "myagent-1234", "myagent-1234" ],
|
||||
"locationSubdivision1Code" : [ "ENG", "ENG" ],
|
||||
"id" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
||||
"userPrincipalName" : [ "picard@c.com" ],
|
||||
"platform" : [ "mac", "mac" ],
|
||||
"locationCity" : [ "Paris", "Paris" ],
|
||||
"username" : [ "picard" ]
|
||||
},
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -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.74
|
||||
- API version: 7.0.75
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user